Computer Science EngineeringModerate

Context-free grammars correspond to which type in the Chomsky hierarchy?

  1. A. Type 2
  2. B. Type 0
  3. C. Type 1
  4. D. Type 3

Correct answer: A. Type 2

Type 2 grammars have a single non-terminal on the left of every production, i.e. context-free grammars.

More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions

Exams that ask this topic