Skip to main content

GATE CSE 2025Theory of Computation › Decidability, Turing Machines & ComputabilityVerified

GATE CSE 2025 PYQ: ​​​​Let G 1 , G 2 G_{1}, G_{2} G 1 ​ , G 2 ​ be Context Free Grammars (CFGs) and R R R be a regular…

​​​​Let G1,G2G_{1}, G_{2} be Context Free Grammars (CFGs) and RR be a regular expression. For a grammar GG, let L(G)L(G) denote the language generated by GG.

Which ONE among the following questions is decidable?

  1. A
    Is L(G1)=L(G2)?L\left(G_{1}\right)=L\left(G_{2}\right) ?
  2. B
    Is L(G1)∩L(G2)=∅L\left(G_{1}\right) \cap L\left(G_{2}\right)=\emptyset ?
  3. C
    Is L(G1)=L(R)?L\left(G_{1}\right)=L(R) ?
  4. D
    Is L(G1)=∅L\left(G_{1}\right)=\emptyset ?
    Correct answer

Answer

(D) Is L ( G 1 ) = ∅ L\left(G_{1}\right)=\emptyset L ( G 1 ​ ) = ∅ ?

Approach

Recall which decision problems for context-free grammars are decidable. For a single CFG, emptiness, membership, and finiteness are decidable; equivalence and universality are undecidable. Problems involving two CFGs, or a CFG compared with an arbitrary regular language, are generally undecidable.

Only option D is a decidable problem. The emptiness problem for a context-free grammar is decidable, while CFG equivalence, disjointness of two CFLs, and equality of a CFG with a regular language are all undecidable.

Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.