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
Last Updated :
13 May, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...