Let G1 ,G2 be Context Free Grammars (CFGs) and RR 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?
Solution :
The correct option is: Is ?
To understand why this question is decidable, let us analyze the properties of Context-Free Grammars (CFGs) and the languages they generate, and examine the decidability of each of the options provided.
1. Decidability of Emptiness for CFGs (Is ?)
The emptiness problem for Context-Free Grammars asks whether a given CFG generates any string at all, i.e., whether .
This problem is decidable. We can determine if the language is empty by using a simple algorithm that finds all generating variables in the grammar:
- A variable is generating if it can derive a terminal string (i.e., where ).
- We start by marking all terminal symbols as generating.
- We then iteratively mark a variable as generating if there is a production rule where all symbols in are already marked as generating.
- This process continues until no new variables can be marked. If the start symbol of the grammar is marked as generating, then ; otherwise, .
Since this algorithm is guaranteed to terminate in finite steps, the emptiness problem for CFGs is decidable.
2. Why the other options are undecidable:
- Is ?: The equivalence problem for two CFGs is a classic undecidable problem. There is no algorithm that can determine if two arbitrary CFGs generate the same language.
- Is ?: The intersection-emptiness problem for two CFGs is also undecidable. This can be proven by reduction from the Post Correspondence Problem (PCP).
- Is ?: Testing whether a context-free language is equal to a regular language is undecidable. Specifically, testing whether (the universality problem for CFGs, where is a regular language) is undecidable.
Therefore, the only question among the choices that can be decided by an algorithm in all cases is "Is ?".
Completely free for students. Educators & coaching institutes get 2 months free Pro trial to create tests.
Access unlimited practice questions, detailed step-by-step solutions, and exam study materials — completely free for students.
Create and conduct professional online assessments with AI question generation, tab proctoring, and comprehensive batch management.
Prepare for GATE 2026 Civil Engineering with the latest question papers, previous year papers, detailed solutions, syllabus, exam pattern, preparation tips, mock tests, and subject-wise study material. Download GATE 2026 CE question papers with solutions in PDF format and boost your preparation for top engineering institutes and PSU recruitment.
Prepare effectively for GATE 2026 Electronics & Communication Engineering (EC) with this comprehensive Question Paper with Solutions. This resource includes detailed explanations, concept-wise solutions, previous year paper analysis, and exam-oriented practice to help aspirants strengthen core subjects like Electronic Devices, Analog Circuits, Digital Circuits, Signals & Systems, Network Theory, Control Systems, Electromagnetics, Communications, and more. Perfect for revision, self-assessment, and boosting your GATE 2026 EC preparation strategy.
Copyright © 2026 Combe Labs Private Limited. All Rights Reserved.