Which of the following three statements are true? Prove your answer.
View worked solution
Answer: A;B
Statements (i) and (ii) are true, while statement (iii) is false.
-
The union of two recursive languages is recursive (True):
If and are recursive languages, there exist Turing machines and that decide them (i.e., they always halt and either accept or reject). We can construct a decider for as follows: on input , run on . If accepts, accept. If rejects, run on . If accepts, accept; otherwise, reject. Since both and are guaranteed to halt, always halts and decides . Thus, recursive languages are closed under union. -
The language is not regular (True):
Assume is regular. Let be the pumping length. Choose a prime . The string . By the Pumping Lemma, such that , , and for all .
The length of is given by .
If we choose , the length becomes . Since and , both factors and are greater than or equal to . Thus, is composite, meaning , which contradicts the Pumping Lemma. Hence, is not regular. -
Regular languages are closed under infinite union (False):
Any single-string language is finite and therefore regular. However, the infinite union of such regular languages, , results in the non-regular language . Thus, regular languages are not closed under infinite union.
Free practice · Your answers on this page are not saved.
