Question

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
Official answer and solution
Official answer
D
From
Official GATE 2025 answer key

Solution

Recall that emptiness, finiteness, and membership are decidable for CFGs, whereas equivalence, disjointness, and universality (L(G1)=L(R)L(G_1) = L(R)) are undecidable.

  • Emptiness of a CFG (L(G1)=∅L(G_1) = \emptyset?) is decidable: We can determine in polynomial time whether the start symbol of G1G_1 can derive any terminal string by iteratively marking all generating non-terminals.
  • Equivalence (L(G1)=L(G2)L(G_1) = L(G_2)), intersection emptiness (L(G1)∩L(G2)=∅L(G_1) \cap L(G_2) = \emptyset), and equality to a regular language (L(G1)=L(R)L(G_1) = L(R), which includes universality L(G1)=Σ∗L(G_1) = \Sigma^*) are all undecidable for CFGs.
Final answer

Option (D)

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2025 Computer Science and Information Technology - Session 2 (CS2)
Question
25 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.