UGC-NET | UGC NET CS 2018 July – II | Question 38

The set A={ 0n 1n 2 n | n=1, 2, 3, ……… } is an example of a grammar that is:
(A) Context sensitive
(B) Context free
(C) Regular
(D) None of the above

Answer: (A)

Explanation: Here we need more than one stack to compare all the string having equal number of 1’s , 2’s and 3’s simultaneously.
Since this given language is context sensitive language. It is neither regular language nor context free language.

Option (A) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up

Improved By : ANKITKUMAR34

Article Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.