GATE / CS ARCHIVE

GATE CSE 2020 / QUESTION 26

GATE CSE 2020 Q26

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

GATE 2020, Q26 2 marks · MCQ
Report issue

Decidability & Computability

Question 26, GATE 2020: Which languages of machine encodings are undecidable? L1={⟨M⟩:L(M)=∅}; L2={⟨M,w,q⟩:M on w reaches q in exactly 100 steps}; L3={⟨M⟩:L(M) is not recursive}; L4={⟨M⟩:L(M) has at least 21 members}. A L1,L3,L4; B L1,L3; C L2,L3; D L2,L3,L4.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Worked explanation

Apply Rice’s theorem only to semantic properties of the recognized language that are neither true for every recognizable language nor false for all of them. Emptiness is nontrivial (∅ versus {ε}); nonrecursiveness is nontrivial (a recognizable undecidable language versus a finite language); at least 21 strings is nontrivial (∅ versus any 21-element finite language). Thus L1,L3,L4 qualify. L2 instead concerns a bounded computation trace. A simulator executes at most 100 transitions and checks q at the specified step, rejecting if the run ends earlier without that event. This always halts. An unbounded reachability question would be very different.

Derivation and answer

TM-language emptiness, being nonrecursive, and having at least 21 strings are each nontrivial semantic properties of recursively enumerable languages, so Rice’s theorem makes L1, L3, L4 undecidable. L2 is decidable by simulating the specified machine and input for exactly 100 steps and checking the state. Thus A.

Original paper, page 9 · Answer key