Skip to content
Official PYQ · 2025

GATE CS 2025 Set 2 Q15 — Undecidability

Explain with AI

​​​​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?

Choose one option
View worked solution

Answer: D

To determine which of the given questions is decidable, we analyze the decidability properties of Context-Free Languages (CFLs) represented by Context-Free Grammars (CFGs):

  • Option A: Is L(G1)=L(G2)L(G_1) = L(G_2)?
    The equivalence problem for two CFGs is undecidable. There is no algorithm to determine if two arbitrary CFGs generate the exact same language.
  • Option B: Is L(G1)∩L(G2)=∅L(G_1) \cap L(G_2) = \emptyset?
    The disjointness problem for two CFGs is undecidable. This can be shown by reduction from the Post Correspondence Problem (PCP).
  • Option C: Is L(G1)=L(R)L(G_1) = L(R)?
    The problem of checking whether a CFG generates a given regular language is undecidable. In particular, testing if L(G1)=Σ∗L(G_1) = \Sigma^* (where Σ∗\Sigma^* is regular) is a well-known undecidable problem.
  • Option D: Is L(G1)=∅L(G_1) = \emptyset?
    The emptiness problem for CFGs is decidable. We can determine if a CFG generates any terminal string by identifying "productive" variables (variables that can eventually derive a string of terminals). If the start symbol SS is productive, then L(G1)≠∅L(G_1) \neq \emptyset; otherwise, L(G1)=∅L(G_1) = \emptyset. This algorithm always terminates in polynomial time.

Therefore, the only decidable question among the choices is D.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Undecidability questions