Proving Undecidability by Reduction
Context: FIT2014_MOC · the exam hand skill of Week 9 — take the one language known undecidable (DIAGONAL HALTING PROBLEM) and mass-produce more with the transfer corollary of Mapping Reductions
Quick Revision
- 🎯 Objective: to prove undecidable, exhibit a computable with ➔ and the corollary fires.
- 📦 Core Components: the universal gadget = “ignore your input; run on ” ➔ settles , , with one construction | the complement swap ➔ settles .
- ⚠️ Key Constraint: reduce from the known-undecidable language to the new one. is the wrong arrow and proves nothing.
📝 How It Works
1. The proof skeleton (four lines, always the same)
- Line 1 — fix the source ➔ “Let be any program, regarded as an input to the DIAGONAL HALTING PROBLEM.”
- Line 2 — define the image ➔ construct from ; the definition may mention freely but must never run a decider for anything.
- Line 3 — computability ➔ “The construction is computable” — is assembled by textual surgery on , so a TM builds it and halts (totality is mandatory).
- Line 4 — the iff ➔ ” halts on input if and only if has property ”, then conclude , therefore is undecidable.
2. The universal gadget
: Input: . Body: run on input .
- is discarded ➔ never reads its own input, so its behaviour is the same on every input — either it halts on all of them, or on none.
- Consequence ➔ halts on , halts on , always halts, and halts for some input all collapse into the single event ” halts on “. One gadget, one iff, four theorems.
- ⚡ Key Constraint: is built, not run — the reduction outputs the string . Nothing simulates at reduction time, which is why halts even though may not.
3. Reading off the family
| Target problem | Question asked of | The iff the gadget certifies | Verdict |
|---|---|---|---|
| halts on input ? | halts on halts on | undecidable | |
| halts on input ? | halts on halts on | undecidable | |
| halts on every input? | halts on always halts | undecidable | |
| halts on some input? | halts on halts for some input | undecidable | |
| loops on every input? | complement of | undecidable |
- Nothing special about ➔ the constant is a free parameter, so the gadget generates an infinite family of undecidable problems at zero extra cost.
- Why and both work ➔ because is input-blind, the quantifier over inputs is vacuous — “for all ” and “for some ” agree, and both equal the single fact about on .
4. The complement route —
- Not a mapping reduction ➔ the lecture calls it “a more general type of reduction”: a decider for becomes a decider for by swapping Accept and Reject.
- What it spends ➔ exactly the closure of decidable languages under complement (Decidability and Decision Problems) — legal only because a decider always halts, so swapping its two halting states is well defined.
- Chain ➔ , and decidable would make decidable. Contradiction.
- 💡 Do not try the swap on a recogniser ➔ swapping Accept/Reject on a machine with loses the looping inputs entirely; this is the asymmetry that makes not even r.e. (Recursively Enumerable Languages).
📚 Catalogue of undecidable problems (lecture list — quotable without proof)
- About one TM ➔ does on input
"What's the answer?"output"42"? · is regular (is equivalent to a finite automaton)? - About two TMs ➔ (do they always both halt or both loop)?
- About grammars ➔ is the language of a CFG regular? · does a CFG fail to generate some string over its alphabet? · do two CFGs define the same language? (contrast Deciding Properties of FAs and CFGs: CFG-Empty IS decidable, and RegExpEquiv IS decidable — equivalence survives for automata, dies for grammars.)
- Outside computation ➔ does a multivariate polynomial have an integer root? (Hilbert’s tenth problem; Matiyasevich, 1970) · the Post Correspondence Problem (string matching; Sipser §5.2, Emil Post).
- The pattern ➔ once a non-trivial semantic property of a machine’s language is asked, undecidability is the default; syntactic properties (state count, tape alphabet) stay decidable.
✍️ Practice
(the lecture’s “Decidable or Undecidable?” slide, posed without answers — write your verdict cold, then expand.)
Practice 1: Input: TM , input . Question: does accept ?
Reference solution
- Verdict: undecidable.
- Key move: the gadget again — send where ignores , runs on , and Accepts if that halts. Then halts on accepts (any fixed) , so .
Practice 2: Input: TM , input , positive integer . Question: does halt on in steps?
Reference solution
- Verdict: decidable.
- Key move: the bound is part of the input. Simulate on for at most steps with a UTM and answer; the simulation cannot run away, so . Undecidability of halting comes entirely from the absence of a computable time bound.
Practice 3: Input: TM , positive integer . Question: does have states?
Reference solution
- Verdict: decidable.
- Key move: this is a syntactic question about , not a semantic one about — count the state blocks in the code word and compare. No execution is involved, so nothing can loop.
Practice 4: Input: TM , positive integer . Question: does halt for some input of length ?
Reference solution
- Verdict: undecidable.
- Key move: finitely many candidate inputs does not rescue you — each individual test is still a halting question. The input-blind gadget gives halts on halts on every input, in particular on , whose length is for all .
⚠️ Common Mistakes
- 💡 Arrow reversed ➔ writing proves only that is no harder than something hard — compatible with being trivially decidable. The corollary needs the known-undecidable language as the source.
- 💡 Running inside the reduction ➔ if simulates to decide what to output, is not total and the transfer theorem collapses. The reduction only ever writes down .
- 💡 Proving one implication ➔ ” halts on halts on ” is half a reduction; the converse is what forbids a No-instance from mapping to a Yes-instance.
- 💡 Skipping the computability line ➔ markers award a mark for stating is computable. It is one sentence and it is never free.
- 💡 Reusing the Accept/Reject swap on r.e. sets ➔ complementation is a property of deciders, not recognisers; using it on a merely-r.e. language is the single most common invalid step in this material.
🧠 Active Recall
Why does the same machine — "ignore , run on " — settle both () and ()?
Answer
- Short answer: is input-blind, so its halting behaviour is a constant function of the input — the and quantifiers range over a set on which the predicate is constant, hence they coincide.
- Why: Both reduce to one bit ➔ if halts on then halts on every (so it is in both and ); if not, halts on no (so it is in neither). The iff chain is therefore valid for either target with the same construction.
"Halt in steps" is decidable but "halt" is undecidable. Where exactly does the difference live?
Answer
- Short answer: in who supplies the bound. When arrives as input, the simulation is guaranteed to terminate; when it does not, no computable function of can supply one — such a function would decide halting.
- Why: Decidability is about guaranteed termination, not about difficulty ➔ the bounded version has by construction, so it is a decider. Any attempted timeout for the unbounded version must either cut off a machine that would have halted later (unsound) or run forever (not a decider) — this is also why simulation makes only r.e. (Recursively Enumerable Languages).