research36 min studyLesson 976 in Mathematics

Reductions, degrees, and undecidability

Compile one decision problem into another and keep many-one reductions separate from oracle computation.

On this page

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.

A≤mB  ⟺  ∃f total computable ∀x [x∈A  ⟺  f(x)∈B].A\le_m B\iff\exists f\text{ total computable }\forall x\,[x\in A\iff f(x)\in B].
The translator must terminate on negative instances as well as positive ones.↔ Scroll wide equations horizontally.

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.

D3={i:∣Wi∣≥3},K≤mD3.D_3=\{i:|W_i|\ge3\},\qquad K\le_m D_3.
The finite threshold does not impose a finite time bound on discovering enough halting inputs.↔ Scroll wide equations horizontally.

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.

K≡TK‾,K‾̸≤mK,K̸≤mK‾.K\equiv_T\overline K,\qquad\overline K\not\le_m K,\qquad K\not\le_m\overline K.
Oracle negation is allowed in a Turing reduction; a many-one reduction must preserve yes answers directly.↔ Scroll wide equations horizontally.

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 φe(e)\varphi_e(e) halts, and empty otherwise. Use it to prove the at-least-three-domain-members problem undecidable.

  1. 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.

  2. 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.

  3. 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.

Wg(e)={{0,1,2},e∈K,∅,e∉K,e∈K  ⟺  g(e)∈D3.W_{g(e)}=\begin{cases}\{0,1,2\},&e\in K,\\\varnothing,&e\notin K,\end{cases}\qquad e\in K\iff g(e)\in D_3.
The wrapper’s behavior encodes the answer, while the wrapper’s finite source can be produced before the answer is known.↔ Scroll wide equations horizontally.
The result

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.

Explore the model

Interactive lab

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.

A finite threshold becomes decidable when the state bound is knownA 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. Current readings: Hits / requests: 0 / 16; Hit rate: 0%; Address-stream period: 16 addresses. All parameters are adjustable with the labeled controls below.Fully associative LRU cache after 16 deterministic requests: 0 hits and 16 misses.Most recent 16 requestsaddress = i × 3 mod 160M3M6M9M12M15M2M5M8M11M14M1M4M7M10M13MCurrent cache order · oldest → newest471013Latest address 13 · miss: inserted as newestToy address stream · period 16 · starts empty
Cached addressMiss / evictionMost recent request
Hits / requests
0 / 16
Hit rate
0%
Address-stream period
16 addresses
t = 0 s

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.

Check your understanding

Which fact separates the complement of K from K under many-one reducibility despite their equal Turing degree?

Try it yourself

Let A={2e:e∈K}A=\{2e:e\in K\}. 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 φe(e)\varphi_e(e) 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.

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.