GATE / CS ARCHIVE

GATE CSE 2016 SET 2 / QUESTION 44

GATE CSE 2016 Set 2 Q44

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

GATE 2016 Set 2, Q44 2 marks · MCQ
Report issue

Decidability & Computability

Question 44, GATE 2016: Let L1={⟨M⟩:M takes at least 2016 steps on some input}, L2={⟨M⟩:M takes at least 2016 steps on all inputs}, L3={⟨M⟩:M accepts ε}. Which are recursive? A only L1; B only L2; C L1 and L2 only; D all three.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Whether a machine takes at least 2016 steps depends only on its first 2016-step computation prefix. In that time its input head can inspect only a bounded initial segment, so finitely many representative inputs suffice: all short inputs and one representative extension for each sufficiently long prefix. Simulate each for the fixed bound and test whether any (L1) or every (L2) representative survives that many steps. Both tests halt. Acceptance of epsilon (L3) is undecidable by the standard reduction that builds a machine ignoring its input and simulating an arbitrary machine/input pair. Hence C.

The constant 2016 is essential: this is bounded simulation, not the general halting problem. A machine cannot inspect arbitrarily far into its input in a fixed number of steps. For L3, given M,w, construct N that ignores its own input and simulates M on w, accepting iff M accepts w. Deciding whether N accepts ε would decide the undecidable acceptance problem.

Original paper, page 38 · Answer key