Computer Sciences > GATE 2025 SET-2 > Decidability
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)=∅?

Correct : d

The correct answer is Option D - Is L(G1) = ∅
This question tests knowledge of which problems about context-free grammars are decidable and which are not. Let''s go through each option.
Option A - Is L(G1) = L(G2)? Undecidable. The equivalence problem for two CFGs is a well-known undecidable problem. There is no general algorithm that can determine whether two CFGs generate the same language.
Option B - Is L(G1) ∩ L(G2) = ∅? Undecidable. CFLs are not closed under intersection, and determining whether the intersection of two CFLs is empty is undecidable. It reduces to undecidable problems like Post''s Correspondence Problem.
Option C - Is L(G1) = L(R)? Undecidable. Checking whether a CFL is equal to a given regular language is undecidable in general, even though the regular language itself is simpler.
Option D - Is L(G1) = ∅? Decidable. The emptiness problem for CFGs is decidable. We check which non-terminals in G1 can eventually derive a string of terminals. If the start symbol S cannot derive any terminal string, L(G1) = ∅. This reachability-based algorithm always terminates. Correct.

Similar Questions

A palindrome is a word that reads the same forwards and backwards. In a game of words, a player has the following two plates painted with letters. From...
#1 MCQ
Which number does not belong in the series below? 2, 5, 10, 17, 26, 37, 50, 64
#4 MCQ
Choose the word that is opposite in meaning to the word “coherent”.
#5 MCQ

Related Topics

decidability CFG GATE 2025 GATE CS 2025 Set-2 Q25 CFG emptiness decidable L(G) empty GATE CFG equivalence undecidable CFL intersection undecidable CFG regular equivalence theory of computation GATE decidable problems GATE CS undecidable CFG problems

Unique Visitor Count

Total Unique Visitors

Loading......