GATE Computer ScienceEasyGATE CS (PYQ pattern)

Which of the following languages is context-sensitive but NOT context-free?

  1. A. { aⁿbⁿcⁿ : n ≥ 1 }
  2. B. { aⁿbⁿcᵐ : n, m ≥ 1 }
  3. C. { aⁿbᵐ : n ≠ m }
  4. D. { w wᴿ : w ∈ {a, b}* }

Correct answer: A. { aⁿbⁿcⁿ : n ≥ 1 }

aⁿbⁿcⁿ fails the CFL pumping lemma but is accepted by a linear bounded automaton. The other three are context-free.

More Theory of Computation questions

Exams that ask this topic