Question
Which of the following decision problems are undecidable?
I. Given NFAs and , is ?
II. Given a CFG and a string , does ?
III. Given CFGs and , is ?
IV. Given a TM , is ?
Official answer and solution
- Official answer
- C
- From
- Official GATE 2016 answer key
Solution
Classify the decidability of standard language decision problems for regular, context-free, and recursively enumerable languages.
Evaluate Problem I: 'Given NFAs and , is ?'
Regular languages are closed under intersection. We can construct a cross-product automaton recognizing and check whether any accept state is reachable from the start state using breadth-first search or depth-first search in polynomial time. Hence, Problem I is DECIDABLE.
Evaluate Problem II: 'Given a CFG and a string , does ?'
This is the CFG membership problem. It can be solved in time using the Cocke-Younger-Kasami (CYK) dynamic programming algorithm or Earley's parser. Hence, Problem II is DECIDABLE.
Evaluate Problem III: 'Given CFGs and , is ?'
Equivalence of context-free languages is a well-known undecidable problem (proven by reduction from the Post Correspondence Problem or CFG universality ). Hence, Problem III is UNDECIDABLE.
Evaluate Problem IV: 'Given a TM , is ?'
Emptiness of a recursively enumerable language is undecidable by Rice's Theorem, as emptiness is a non-trivial semantic property of Turing machine languages. Hence, Problem IV is UNDECIDABLE.
Therefore, problems III and IV only are undecidable.
C
Thinking that CFG equivalence is decidable because DFA equivalence is decidable, or thinking CFG membership is undecidable.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2016 Computer Science and Information Technology (CS) Session 1
- Question
- 27 of 65, printed as CS Q.17
- 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.