Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

COS2601 Assignment 03 Due August 2026

Rating
-
Sold
-
Pages
53
Grade
A+
Uploaded on
27-07-2026
Written in
2025/2026

Comprehensive Study Material; Expert Verified & Exam-Ready This assignment package has been carefully developed to support serious academic preparation. Each solution is thoroughly researched, clearly explained, and backed by credible references giving you not just the answers, but a genuine understanding of the underlying concepts. The material is structured for clarity, making even complex topics approachable without sacrificing depth or accuracy. Whether you're consolidating your knowledge or preparing under time pressure, these resources are designed to help you walk into any exam with confidence.

Show more Read less
Institution
Course

Content preview

UNIVERSITY OF SOUTH AFRICA
Department of Computer Science


⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄⋄


COS2601: Theoretical Computer Science II

Assignment | Year Module

⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄⋄




COS2601
Module Code:
Theoretical Computer Science II
Module Name:
3
Assignment Number:




Submitted in partial fulfilment of the require-
ments for Theoretical Computer Science II, UNISA

,UNISA | COS2601 Theoretical Computer Science II



Question 1 [10 marks]


1(a) Let S be a set of strings on {a, b} with S = {ba, bb, baa, bab, aba}. For each of the follow-
ing strings, state whether or not it is a word in S ∗ . Justify your answer.


(i) baabababb


The set is:



S = {ba, bb, baa, bab, aba}


A word belongs to S ∗ if it can be formed by concatenating zero or more words from S.

Consider:



baabababb


We try to divide it into words from S:



baabababb = baa · bab · b


The first two parts are valid:



baa ∈ S




bab ∈ S


However:



b∈
/S


Therefore, this decomposition does not work.

Try another possible decomposition:


Page 2 of 53

,UNISA | COS2601 Theoretical Computer Science II




baabababb = ba · aba · babb


Although:



ba ∈ S


and



aba ∈ S


we have:



babb ∈
/S


No decomposition into complete words from S is possible.



/ S∗
baabababb ∈


(ii) babbaab


Consider:



babbaab


We can write:



babbaab = bab · baa · b


Although:



bab ∈ S



Page 3 of 53

, UNISA | COS2601 Theoretical Computer Science II


and



baa ∈ S


the remaining string is:



b∈
/S


Therefore:



/ S∗
babbaab ∈


Thus, neither of the two given strings is a word in S ∗ .


1(b) Provide an example of two sets of strings S and T on {a, b} such that:


S⊈T


and



S ∗ ∩ T ∗ = (S ∩ T )∗


Take:



S = {a}


and



T = {b}


Clearly:



S⊈T

Page 4 of 53

Connected book

Written for

Institution
Course

Document information

Uploaded on
July 27, 2026
Number of pages
53
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$7.52
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
BeeNotes teachmetutor
Follow You need to be logged in order to follow users or courses
Sold
323
Member since
1 year
Number of followers
0
Documents
923
Last sold
1 day ago
BeeNotes

BeeNotes: Buzzing Brilliance for Your Studies Discover BeeNotes, where hard-working lecture notes fuel your academic success. Our clear, concise study materials simplify complex topics and help you ace exams. Join the hive and unlock your potential with BeeNotes today!

4.1

40 reviews

5
24
4
4
3
8
2
1
1
3

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions