Let be the language represented by regular expression . Let be the language generated by a context free grammar . Let be the language accepted by a Turing machine . Which of the following decision problems are undecidable?
- Given a regular expression and a string , is ?
- Given a context-free grammar , is
- Given a context-free grammar , is for some alphabet ?
- Given a Turing machine and a string , is ?
View worked solution
Answer: D
To determine which of the decision problems are undecidable, let us analyze each statement individually:
-
Given a regular expression and a string , is ?
This is the membership problem for regular languages. Since regular languages are closed under all basic operations and have equivalent finite automata (DFA/NFA), we can construct a DFA for and simulate it on . This process always halts and decides membership.
Status: Decidable. -
Given a context-free grammar , is ?
This is the emptiness problem for context-free languages (CFLs). We can decide this by checking if the start symbol of can generate any terminal string (by systematically identifying and eliminating non-generating variables).
Status: Decidable. -
Given a context-free grammar , is for some alphabet ?
This is the universality problem for CFLs. It is a well-known undecidable problem, which can be proved by showing that the language of invalid computation histories of a Turing machine is context-free. If we could decide whether , we could decide the halting problem.
Status: Undecidable. -
Given a Turing machine and a string , is ?
This is the membership problem for Turing machines (often denoted as ). By Turing's halting problem analysis, there is no algorithm that can decide whether an arbitrary Turing machine accepts a given input string .
Status: Undecidable.
Thus, problems III and IV are undecidable.
Free practice · Your answers on this page are not saved.
