GATE Computer ScienceHardGATE CSE

Consider these statements. I. Deterministic context-free languages are closed under complementation. II. Deterministic context-free languages are closed under union. III. The intersection of a context-free language with a regular language is context-free. IV. Deterministic context-free languages are closed under reversal. Which statements are true?

  1. A. I and III only
  2. B. I, II and III only
  3. C. II and IV only
  4. D. III and IV only

Correct answer: A. I and III only

DCFLs are closed under complement but not union or reversal; CFL ∩ regular is always CFL.

More Theory of Computation questions

Exams that ask this topic