GATE / CS ARCHIVE

GATE CSE 2002 / QUESTION 14(b)

Reduction machine: output after the simulation halts

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

GATE 2002, Q14(b) Descriptive
Report issue

Decidability & Computability

Question 14(b), GATE 2002: Prove undecidable the language of machines M that halt and output 1 on every input, by reducing the known halting problem {⟨M′,x⟩:M′ halts on x}. Construct M from M′,x. Original14(b): Describe its second step, depending on the first step’s outcome.
Question 14(b), GATE 2002: Prove undecidable the language of machines M that halt and output 1 on every input, by reducing the known halting problem {⟨M′,x⟩:M′ halts on x}. Construct M from M′,x. Original14(b): Describe its second step, depending on the first step’s outcome.
Tap to enlarge
Answer & solution

Answer: If the simulation halts, output 1 and halt; otherwise continue simulating forever. (no official key was published)

After the simulation of M′ on x terminates, discard its result, output 1, and halt. The branch is triggered by any halting outcome of M′, not only acceptance or output 1. If M′ fails to halt, M never reaches this branch on any input w.

Original paper, page 8