Questions: The Halting Problem

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A software company wants to build a static analyzer that, before deploying any program, checks whether the program contains an infinite loop. According to the halting problem, this tool:

ACould be built with sufficiently advanced AI, but current computers are too slow
BCan be built but will occasionally give wrong answers — no perfect tool is possible
CCannot be built as a general solution for all programs — not because it's hard, but because it's theoretically impossible
DCan be built for most practical programs, just not for Turing-complete ones
Question 2 Multiple Choice

The proof that the halting problem is undecidable works by constructing a machine D that does the opposite of what the assumed halting decider H predicts. Why does D being given its own description as input create a contradiction?

ABecause D's description is too long for any Turing machine to read
BBecause D(⟨D⟩) either halts (contradicting H's prediction it loops) or loops (contradicting H's prediction it halts) — no consistent answer exists
CBecause a Turing machine cannot accept its own description as input
DBecause D's behavior is random, making H's prediction meaningless
Question 3 True / False

The halting problem is undecidable because modern computers lack the processing power to analyze most possible programs. Future quantum computers may eventually solve it.

TTrue
FFalse
Question 4 True / False

The halting problem (HALT_TM) is recognizable: you can run the machine M on input w and accept if it halts. This makes HALT_TM recognizable but not decidable.

TTrue
FFalse
Question 5 Short Answer

Explain why the diagonalization argument for the halting problem leads to a contradiction. What is the role of the self-referential machine D?

Think about your answer, then reveal below.