All mock tests are FREE till 31 December — register to save your progress

The set A= { 0n1n2n | n= 1, 2, 3,..............} is an example of a grammar that is :

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: A. Context-sensitive

Explanation

Three equal counts can't be checked by a PDA, but a context-sensitive grammar generates the language.

More Theory of Computation and Compilers questions