Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Otro

COS2601 Assignment 2 Solutions 2026

Puntuación
-
Vendido
-
Páginas
10
Subido en
10-07-2026
Escrito en
2025/2026

COS2601 Assignment 2 Solutions 2026 UNISA 0-7-9-3-2-2-6-4-2-7

Institución
Grado

Vista previa del contenido

COS2601 Assignment 2 Solutions 2026
UNISA
Theory of Computability — Full Worked Solutions

, QUESTION 1 [10]
(a) S = {ba, bb, baa, bab, aba}. Determine whether each string is a word in S*.
(i) baabababb
A string is a word in S* if it can be written as a concatenation of one or more elements of S. We
attempt to factorise the string using only elements of S:
baabababb = baa · ba · ba · bb
Check each factor is an element of S: baa ∈ S ✓, ba ∈ S ✓, ba ∈ S ✓, bb ∈ S ✓.
Verifying the concatenation reproduces the original string:
baa + ba + ba + bb = baabababb ✓
Conclusion: baabababb IS a word in S*, since it equals baa·ba·ba·bb, a concatenation of elements
of S.
(ii) babbaab
We attempt every possible factorisation of babbaab using elements of S = {ba, bb, baa, bab, aba}.
The string begins 'ba...', so the first factor can only be ba, baa or bab (the only elements of S starting
with 'ba'):
• First factor bab (positions 1–3) → remainder = baab. This remainder must itself factor into S*. Its
own first factor can only be ba or baa (bab does not match, since position 6 is 'a' not 'b'). ba (pos 4–5)
leaves remainder 'ab', which is not in S. baa (pos 4–6) leaves remainder 'b', which is not in S (single
letters are never elements of S). Dead end.
• First factor baa (positions 1–3) is impossible, since position 3 of the string is 'b', not 'a' — baa
requires the 3rd symbol to be 'a'.
• First factor ba (positions 1–2) → remainder = bbaab. Its first factor can only be bb (the only element
of S beginning 'bb'; ba/baa/bab are impossible since position 4 is 'b' not 'a'). bb (pos 3–4) leaves
remainder 'aab'. The only element of S starting with 'a' is aba, but aab ≠ aba (3rd symbol differs).
Dead end.
Every possible first factor leads to a dead end, so no factorisation of babbaab into elements of S
exists.
Conclusion: babbaab is NOT a word in S*.
(b) Example of two sets S, T on {a,b} such that S ⊄ T and S*∩T* = (S∩T)*.
Let S = {a, aa} and T = {a}.
Check S ⊄ T: aa ∈ S but aa ∉ T, so S is not a subset of T. ✓
Compute each side:
• S∩T = {a}, so (S∩T)* = a*
• S* : since S = {a, aa}, every string of a's can be built from a and aa, so S* = a*
• T* = a* (since T = {a})
• S*∩T* = a* ∩ a* = a*
Conclusion: S*∩T* = a* = (S∩T)*, while S ⊄ T, as required.
(c) S = {a, bb, bab}. List all words in S* of exactly 5 letters.
Every word of S* is a concatenation of copies of a (length 1), bb (length 2) and bab (length 3). We
need all combinations of these lengths that sum to 5, and for each combination, every ordering of the
pieces:
Case 1+1+1+1+1 (five a's):
aaaaa

Escuela, estudio y materia

Institución
Grado

Información del documento

Subido en
10 de julio de 2026
Número de páginas
10
Escrito en
2025/2026
Tipo
OTRO
Personaje
Desconocido

Temas

$4.70
Accede al documento completo:

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
TsireT Teachme2-tutor
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
62
Miembro desde
1 año
Número de seguidores
1
Documentos
50
Última venta
1 mes hace
intell

4.8

9 reseñas

5
7
4
2
3
0
2
0
1
0

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes