GATE Computer ScienceVery hardGATE CSE

Let L = { a^i b^j c^k : i ≠ j or j ≠ k, i, j, k ≥ 0 }. Which statement is correct?

  1. A. L is context-free but not deterministic context-free
  2. B. L is regular
  3. C. L is deterministic context-free but not regular
  4. D. L is not context-free

Correct answer: A. L is context-free but not deterministic context-free

L is a union of two CFLs, so it is context-free. If L were a DCFL, its complement intersected with a*b*c* would give { a^n b^n c^n }, a DCFL, which is not even context-free; contradiction.

More Theory of Computation questions

Exams that ask this topic