GATE | GATE-CS-2003 | Question 15

If the strings of a language L can be effectively enumerated in lexicographic (i.e., alphabetic) order, which of the following statements is true ?
(A) L is necessarily finite
(B) L is regular but not necessarily finite
(C) L is context free but not necessarily regular
(D) L is recursive but not necessarily context free


Answer: (D)

Explanation:
The strings of a language L can be effectively enumerated means a Turing machine exists for language L which will enumerate all valid strings of the language.

If the string is in lexicographic order then TM will accept the string and halt in the final state.
But, if the string is not lexicographic order then TM will reject the string and halt in non-final state.

Thus, L is recursive language.

We can not construct PDA for language L. So, the given language is not context free.

 
Thus, option (D) is correct.

 
Please comment below if you find anything wrong in the above post.


Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.