StreakPeaked· Practice

ExamsGATETechnical

Let G1, G2 be Context Free grammars (CFGs) and R be a regular expression. For a grammar G, let L(G) denote the language generated by G. Which ONE among the following questions is decidable? (A) Is L(G1) = L(G2)? (B) Is L(G1) ∩ L(G2) = ∅? (C) Is L(G1) = L(R)? (D) Is L(G1) = ∅?

  1. Is L(G1) = L(G2)?
  2. Is L(G1) ∩ L(G2) = ∅?
  3. Is L(G1) = L(R)?
  4. Is L(G1) = ∅?

Correct answer: Is L(G1) = ∅?

Solution

Determining whether the language generated by a context-free grammar is empty is decidable because there exists an algorithm that can analyze the grammar's production rules to check if any strings can be derived from it.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →