Question
Consider the following problems. denotes the language generated by a grammar . denotes the language accepted by a machine .
(I) For an unrestricted grammar and a string , whether
(II) Given a Turing machine , whether is regular
(III) Given two grammars and , whether
(IV) Given an NFA , whether there is a deterministic PDA such that and accept the same language.
Which one of the following statements is correct?
Official answer and solution
- Official answer
- D
- From
- Official GATE 2018 answer key
Solution
Classify decidability for membership, semantic regularity, language equivalence, and DCFL containment of regular languages.
Analyze the four problems:
- Problem I: For an unrestricted grammar , is a recursively enumerable language (Type 0). The membership problem () is undecidable (equivalent to Turing machine halting/acceptance problem).
- Problem II: Deciding whether of an arbitrary Turing machine is regular is a non-trivial semantic language property. By Rice's Theorem, this problem is undecidable.
- Problem III: The language equivalence problem () is undecidable for context-free grammars, and therefore undecidable for unrestricted grammars.
- Problem IV: is an NFA, so is a regular language. Every regular language is a deterministic context-free language (DCFL) and can be accepted by a deterministic PDA. Therefore, for every NFA , such a DPDA always exists. Since the answer is always YES for any input, the problem is decidable.
Therefore, only problems I, II, and III are undecidable, matching option D.
D
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2018 Computer Science and Information Technology (CS)
- Question
- 46 of 65, printed as CS Q.36
- 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.