GATE / CS ARCHIVE

GATE CSE 2002 / QUESTION 14(c)

Correctness of the all-input halting reduction

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

GATE 2002, Q14(c) Descriptive
Report issue

Decidability & Computability

Question 14(c), 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(c): State the key equivalence relating M on arbitrary w to M′ on x.
Question 14(c), 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(c): State the key equivalence relating M on arbitrary w to M′ on x.
Tap to enlarge
Answer & solution

Answer: M′ halts on x iff M halts and outputs 1 on every input. (no official key was published)

If M′ halts on x, its simulation finishes regardless of the ignored input w, and M then halts with output 1 for every w. If M′ does not halt on x, M loops on every w, so its description is not in the target language. Thus ⟨M′,x⟩ belongs to HALT iff the computably constructed ⟨M⟩ belongs to {⟨N⟩: N halts and outputs 1 on every input}. A decider for the target language would decide HALT by constructing M and invoking that decider, which is impossible. Hence the target language is undecidable.

Original paper, page 8