GATE Computer ScienceVery hardGATE CS (PYQ pattern)

Which of the following problems are decidable? I. Is L(G) empty for a given CFG G? II. Is L(G1) ∩ L(G2) empty for given CFGs G1 and G2? III. Is L(G) a regular language for a given CFG G? IV. Is L(M) finite for a given DFA M?

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

Correct answer: A. I and IV only

Emptiness of a CFG is decidable (mark productive variables) and finiteness of a DFA language is decidable (look for a reachable-and-co-reachable cycle). Intersection-emptiness of two CFGs and regularity of a CFG are both undecidable.

More Theory of Computation questions

Exams that ask this topic