- GATE CS
- 2026–27 pattern practice
- Theory of Computation
- Undecidability
- Medium
For context-free grammars, which problem is decidable?
Computability
Pick an option to check your answer.
Answer: D. Solution
Emptiness is decidable: mark the generating non-terminals iteratively and check whether the start symbol becomes generating.
Why not the others
- Whether L(G1) = L(G2) — equivalence of CFGs is undecidable.
- Whether G is ambiguous — ambiguity is undecidable (by reduction from the Post Correspondence Problem).
- Whether — universality is undecidable for CFGs.