GATE Computer ScienceHardGATE CS (PYQ pattern)

Which of the following decision problems can be solved by an algorithm that always halts?

  1. A. Given a CFG, is the language it generates regular?
  2. B. Given a CFG, is it ambiguous?
  3. C. Given a DPDA, is the language it accepts regular?
  4. D. Given two CFGs G₁, G₂, is L(G₁) ∩ L(G₂) empty?

Correct answer: C. Given a DPDA, is the language it accepts regular?

Regularity of a deterministic context-free language is decidable (Stearns). For general CFGs regularity, ambiguity and emptiness of the intersection are undecidable.

More Theory of Computation questions

Exams that ask this topic