GATE / CS ARCHIVE

GATE CSE 2017 SET 2 / QUESTION 41

GATE CSE 2017 Set 2 Q41

Theory of Computation · Decidability & Computability · Full GATE CSE 2017 Set 2 paper

GATE 2017 Set 2, Q41 2 marks · MCQ
Report issue

Decidability & Computability

Question 41, GATE 2017: Which problems are undecidable? I:given regular expression R and string w, test w∈L(R). II:given CFG G, test L(G)=∅. III:given CFG G over Σ, test L(G)=Σ*. IV:given Turing machine M and string w, test w∈L(M). A:I,IV. B:II,III. C:II,III,IV. D:III,IV.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

1. I is decidable: convert the regular expression to a finite automaton and simulate it on the finite input string. The simulation terminates after processing the input.

2. II is decidable: repeatedly mark CFG variables that can derive terminal strings, beginning with terminal-only or ε productions. Because there are finitely many variables the marking reaches a fixed point. The language is nonempty exactly when the start variable is marked.

3. III is the general CFG universality problem, which is undecidable. IV is Turing-machine acceptance, also undecidable: simulation may run forever on a rejected/nonaccepted input, so it is only a recognizer, not a decider. Thus the undecidable pair is III and IV, D. Do not confuse decidable CFG membership or emptiness with universality.

Original paper, page 16 · Answer key