GATE Computer ScienceVery hardGATE CS (PYQ pattern)
Which of the following problems is decidable?
- A. Given a CFG G and a DFA D, is L(D) ⊆ L(G)?
- B. Given CFGs G₁ and G₂, is L(G₁) ∩ L(G₂) = ∅?
- C. Given a CFG G, is the complement of L(G) context-free?
- D. Given a CFG G and a DFA D, is L(G) ⊆ L(D)?
Correct answer: D. Given a CFG G and a DFA D, is L(G) ⊆ L(D)?
L(G) ⊆ L(D) ⇔ L(G) ∩ complement(L(D)) = ∅, and that intersection is a CFL whose emptiness is decidable. The reverse inclusion contains 'is L(G) = Σ*?' (take D accepting Σ*), which is undecidable. CFG intersection emptiness reduces from PCP, and whether a complement is context-free is undecidable as well.
More Theory of Computation questions
- Which of the following problems is undecidable?
- Let TOTAL = { ⟨M⟩ : the Turing machine M halts on every input }. Which statement about TOTAL is correct?
- Let A = { ⟨M⟩ : the TM M halts on at least one input } and B = { ⟨M⟩ : M halts on no input }. Which statement is correct?
- Which of the following statements about many-one reductions A ≤ B are correct? I. If B is decidable then A is decidable. II. If A is…
- Which of the following languages is context-sensitive but NOT context-free?
- An ε-NFA has 6 states. When it is converted to a DFA by the subset construction, what is the maximum possible number of states in the…