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
Article Tags :
Recommended Articles