Professional Documents
Culture Documents
— SOLUTION —
Question 1 [5 points]
Let L1 = {1, 11, 111, 1111, . . .} and L2 = {0, 00, 000, 0000, . . .}. Design a Turing machine M
that accepts the strings from L1 ∪ L2 .
Question 2 [5 points]
Prove or disprove following:
Let A1 , A2 , . . . , An be a finite collection of (possibly infinite) regular languages defined over
some alphabet Σ such that all Ai ’s are pair-wise disjoint. Then, the language ni=1 Ai can be
S
Solution: The above statement is True and we can construct a deterministic Turing
machine that accepts the union of regular languages A1 , A2 , . . . , An .
Since A1 , A2 , . . . , An are regular languages therefore they can be decided by Turing ma-
chines M1 , M2 , . . . , Mn , respectively. We can construct a deterministic Turing machine
M for the language ni=1 Ai as following:
S
M = “On input w:
The above Turing machine M is deterministic and decides (not just recognize) the lan-
guage ni=1 Ai .
S