Reductions, degrees, and undecidability
Compile one decision problem into another and keep many-one reductions separate from oracle computation.
On this page
The question for today
What you’ll understand
- Construct a total computable many-one reduction using program wrappers.
- Explain the direction in which a reduction transfers decidability.
- Distinguish many-one equivalence from Turing-degree equivalence.
An undecidable problem can transmit its impossibility to another problem when instances are translated effectively and answers are preserved. The translation must itself finish without solving the source problem. Many-one reductions formalize a single such translation; Turing reductions allow a computation to consult an oracle adaptively. A concrete wrapper program will show how halting information can be encoded into a semantic property without knowing that information while compiling the wrapper.
A reduction translates inputs and preserves both answers
For subsets A and B of the natural numbers, a many-one reduction is a total computable function f with x in A exactly when f(x) is in B. Totality is essential: a translator that waits for an undecidable positive event before returning a target instance is not a valid reduction on all inputs. If B has a decider, applying f and then that decider decides A. Therefore undecidability of A proves undecidability of B, not the other way around.
The reductions here concern computability and need not run in polynomial time. They resemble reductions in complexity theory, but the resource restriction has changed. A computable transformation of program descriptions can embed an input as a constant and add a fixed simulation wrapper. With a standard acceptable numbering, the resulting index depends totally computably on the embedded input. This is the effective parameterization property, often formalized by the s-m-n theorem.
Semantic properties can carry an undecidable simulation
Let W sub e denote the domain of the partial function computed by program e. To test whether that domain contains at least three inputs sounds like a finite threshold question, but there is no bound on the time needed to discover the third input. A wrapper can make its whole domain depend on whether one selected simulation ever halts. The wrapper's source is easy to write even when predicting its eventual behavior is impossible.
Rice's theorem generalizes this pattern: every nontrivial property depending only on the computed partial function has an undecidable index set, under the standard effective numbering. Nontrivial means some partial computable function has the property and another does not. A property of source spelling, such as whether an instruction occurs, is not necessarily semantic and is outside this statement. We prove the particular domain-threshold case directly below rather than relying on the general theorem as an unexplained slogan.
Oracle access permits operations a many-one map cannot express
A Turing reduction of A to B is an oracle program that decides membership in A using membership answers for B, with finitely many queries on each completed input computation. Many-one reducibility implies Turing reducibility through one query, but an oracle program may negate answers or choose later queries from earlier results. Mutual Turing reducibility defines a Turing degree. That equivalence does not identify all the finer many-one distinctions.
For example K and its complement have the same Turing degree: one oracle query followed by Boolean negation decides the other. Yet the complement cannot many-one reduce to K, because a computable preimage of a c.e. set is c.e., while the complement of K is not c.e. Conversely, K cannot many-one reduce to its complement, since the preimage would be co-c.e., making K both c.e. and co-c.e. Thus the distinction is witnessed by these concrete sets, not merely by notation.
Work it through
Compile halting into a domain with exactly three possible members
For an index e, construct a program g(e) whose domain is exactly {0,1,2} when halts, and empty otherwise. Use it to prove the at-least-three-domain-members problem undecidable.
Generate code with e embedded as a constant. On input x greater than two, loop forever. On input zero, one, or two, simulate machine e on input e and return zero if that simulation halts. Writing this finite wrapper never requires waiting for the simulation.
If e is in K, the selected simulation halts and all three permitted inputs eventually return zero. All larger inputs diverge, so the domain is exactly {0,1,2}. If e is outside K, every permitted input also diverges, making the domain empty.
Hence e is in K exactly when g(e) is in D3. Effective parameterization makes g a total computable index transformation. A decider for D3 composed with g would decide K, contradicting the halting theorem. The reduction establishes undecidability without deciding any particular unknown simulation.
The domain-threshold property is undecidable even though its positive cases need only three finite halting witnesses. The compilation step remains total on every source index.
The living notebook
Explore the model
Interactive lab · cache
A finite threshold becomes decidable when the state bound is known
Pause and Reset, set capacity 4 and stride 4. At time zero the instrument processes sixteen requests: addresses 0,4,8,12 repeat, giving four misses and twelve hits, a 75% hit rate. Reset for a fresh comparison and set both capacity 3 and stride 4; all sixteen requests miss. These are exact finite-stream checks with an explicit address universe, not a domain-size decider for arbitrary programs. Control edits retain time, and playback would add requests, so inspect each run while paused at zero.
- Hits / requests
- 0 / 16
- Hit rate
- 0%
- Address-stream period
- 16 addresses
A fully associative LRU cache starts empty and requests address (i·s) mod 16. Hits move an address to the newest position; misses evict the oldest when full. Playback starts with 16 requests and adds two per second, capped at 4096 explicitly simulated requests. This toy stream is not a processor-cache benchmark. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forA proved finite universe and request budget permit exhaustive checking; arbitrary halting domains lack those bounds.
Pause & reason
Check your understanding
Your turn
Try it yourself
Let . Give a many-one reduction from K to A, explain how membership in A can be semidecided, and show that A is undecidable without claiming any specific number belongs to K.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Use doubling for the reduction. For a candidate A-input, first check parity before simulating the corresponding diagonal computation.
Compare with the solution
The total computable map f(e)=2e satisfies e in K exactly when f(e) is in A. To semidecide A, loop forever on odd input and, on input 2e, simulate and accept if it halts. Thus A is c.e. If A were decidable, composing its decider with doubling would decide K. A is therefore undecidable. For example input index five translates to ten, but this relation alone says only that ten is in A exactly when five is in K.
Keep the idea
Take it with you
- A many-one translator must be total and preserve both membership directions.
- Compiling a simulation wrapper does not require predicting that simulation.
- Turing degrees allow oracle negation and are coarser than many-one equivalence.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.