GATE / CS ARCHIVE

GATE CSE 2018 / QUESTION 36

Undecidability versus regular simulation

Theory of Computation · Decidability & Computability · Full GATE CSE 2018 paper

GATE 2018, Q36 2 marks · MCQ
Report issue

Decidability & Computability

Question 36, GATE 2018: Classify: I membership w∈L(G) for unrestricted G; II whether a TM language is regular; III equality of languages of two unrestricted/general grammars; IV whether an NFA language has an equivalent deterministic PDA. Options A only I,II undecidable; B only III; C only II,IV; D only I,II,III.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Method

Rice’s theorem applies to nontrivial properties of the recognized language, not to arbitrary syntactic machine properties. Regularity is nontrivial because some recognizable languages are regular and some are not. Equivalence of general grammars includes comparing a grammar to one generating the empty language, already an undecidable emptiness problem. IV is different: every regular language has a DFA, and a deterministic PDA can simulate a DFA while leaving its stack unchanged. Therefore IV is a constant-yes decision problem.

Solution

I is the undecidable membership problem for unrestricted grammars/Turing-recognizable languages. II is a nontrivial semantic property of a TM language, hence undecidable by Rice’s theorem. III, equivalence of general grammars, is undecidable (even equivalence of CFGs is undecidable). IV always has answer yes: convert the NFA to a DFA and view that DFA as a DPDA that does not use its stack. Hence only I, II, III are undecidable, D. If III were restricted to regular grammars it would be decidable, but no such restriction is stated.

Original paper, page 14 · Answer key