GATE Computer ScienceEasyGATE CS (PYQ pattern)

Which of the following productions cannot appear in a context-sensitive (non-contracting) grammar?

  1. A. AB → CD
  2. B. aAb → aaab
  3. C. AB → a
  4. D. A → BCD

Correct answer: C. AB → a

Non-contracting grammars require the right side to be at least as long as the left side; AB → a shrinks the sentential form (type 0 only).

More Theory of Computation questions

Exams that ask this topic