Mathematics · Article
Computability and undecidable problems
Trace universal machines, prove halting undecidability, and use effective reductions to classify problems about languages, proofs and programs.
Back to MathematicsAfter reading, you can
- Verify finite configurations and give an invariant for the shared interpreter.
- Distinguish total decision, recognition and effective enumeration using finite witness checks.
- Construct and apply the diagonal halting and acceptance arguments.
- Prove reductions with exact codes, domains and membership equivalences.
- Classify semantic program properties, totality and finite domains.
- Evaluate oracle, arithmetic, and finite-state limits without conflating termination and computational cost.
What an algorithm can decide
A finite run can be checked one transition at a time. When the machine has yet to stop, the same record does not tell you whether a later step will stop it.
Make that distinction precise with machine descriptions, a universal interpreter and fair parallel search. Then use the new machine's own description as an input to show why no general halting decision can work.
Follow that limit into program properties, first-order validity, word correspondence, polynomial equations and oracle computation. At each stage the reduction specifies the one particular question whose membership it preserves.
Decision, recognition and finite certificates
A decider for S halts on every coded input and returns yes exactly on S. A recognizer has an accepting halt on all members and no accepting halt on nonmembers. A nonmember may cause a rejecting halt or an endless run. The declared universe fixes the meaning of the complement and the policy on malformed inputs.
A decider is therefore itself a recognizer, by using its yes halt as acceptance. Conversely, when a recognizer is run on just one input, reaching a yes halt supplies positive evidence. Seeing a bounded initial run with no such halt certifies only the observed prefix.
Suppose R(x,w) is decidable and S={x:∃w R(x,w)} for effectively enumerable finite witness codes w. On x, enumerate their codes and check R until the first yes. When a witness exists, its position is finite and each earlier check finishes, so the search accepts.
If no witness exists the search never accepts. A divergent checker could prevent enumeration from reaching the witness, which is why totality of the checker matters. A finite certificate and its decidable verification together give recognizability without a uniform termination guarantee. Related reading: [Effective enumeration and complementary recognition](https://builds.openlogicproject.org/open-logic-complete.pdf), [Finite computation normal form](https://builds.openlogicproject.org/open-logic-complete.pdf). Use a fixed domain for the complementary sign and a total checker for finite witnesses.
Finite runs are checkable
Take a tape indexed by the integers with blank □ outside the written string 10. In state q starting at cell 0, the machine moves right on 1, leaving it unchanged. On 0 it writes 1, moves right and remains in q. On □ it enters the accepting halt a with a stationary head and no write.
The initial head reads 1 at cell 0. After the first transition the configuration has unchanged written cells 10, head 1 and state q. The next transition changes cell 1 to 1 and moves the head to cell 2. The tape then has 11 in cells 0 and 1 with state q at a blank.
The transition at cell 2 changes only the state to a. The three transitions agree in each step with the unique table entry for the actual state and scanned symbol. All unmentioned cells remain blank, so the finite description of every configuration covers the effect on the entire tape.
A repeated full configuration proves repetition for this deterministic machine from this start. The absence of an observed halt within a finite budget is otherwise inconclusive.
| Quantity | Exact result |
|---|---|
| Trace status | Halts |
| State and register at stop | (1, 1) |
| First exact repeat | None |
Exact inputs and supporting calculations
| Parameter | Value |
|---|---|
| states | [["inc",1],["halt",1]] |
| start | 0 |
| register | 0 |
| steps | 4 |
| Transitions completed | State | Register | Instruction |
|---|---|---|---|
| 0 | 0 | 0 | inc |
| 1 | 1 | 1 | halt |
A certificate saying the second step halts immediately is false because the actual rule on 0 does not halt. Reject that certificate. Rejection of a candidate proof of acceptance is a verdict on those coded configurations. It gives no negative verdict on the unique run, which in this case accepts after three transitions. Related reading: [Machine descriptions and universal simulation](https://faculty.ist.psu.edu/vhonavar/Courses/ai100/turing.pdf), [Finite computation normal form](https://builds.openlogicproject.org/open-logic-complete.pdf). Check complete configurations including head, tape and terminal convention.
Encode machines and inputs effectively
For binary strings u and v use pair code 1^|u|0uv. Count the leading ones to the first zero, then consume that many subsequent bits for u. This format uses the known end of the input word. The remaining suffix up to that end is v. Fewer than the declared number of available bits or the absence of a first zero marks an invalid code.
Decoding recovers the prefix length and both strings. Equal pair codes must therefore have equal u and equal v, even when u contains zeros or either field is empty. For a self-delimiting pair, concatenate the two blocks 1^|u|0u and 1^|v|0v. Each leading length fixes the end of its block. If a complete two-block code is a prefix of another, both block boundaries and both payloads agree, so the two codes coincide. At the next layer require u to be a valid program description and v to satisfy the declared input rule.
A machine table can be listed by coded counts of states and alphabet symbols, its special states and a finite sequence of table rows. Verify identifiers, allowed moves, and determinacy by finitely many checks. Listing all binary strings by length and then lexicographic order and keeping legal tables eventually visits every valid description.
Define H and A over the whole string universe by placing malformed descriptive pairs outside both sets. A recognizer tests descriptive validity and rejects malformed data before simulating. This terminal rejection is an action of the checking machine, with no valid source run corresponding to it. Related reading: [Machine descriptions and universal simulation](https://faculty.ist.psu.edu/vhonavar/Courses/ai100/turing.pdf), [Parameter fixing, self-application and diagonal limits](https://builds.openlogicproject.org/open-logic-complete.pdf). Read the encoding length before the payload. Malformed code has no source execution.
Construct universal simulation
A universal interpreter first decodes its input pair and stores the transition table. It keeps the simulated state, the scanned symbol and the finite tape contents on each side of the head. Lists of symbols and a stored blank beyond their represented ends give a finite record whenever only finitely many transitions have occurred.
For each simulated step, look up the table entry by actual state and symbol, update the written cell and move across the stored lists. When a head move reaches an unrepresented cell, use a blank. Copy the terminal accept or reject signal and stop if the simulated state is terminal.
At time zero the stored configuration equals the specified loading convention. If it is correct after t transitions, the deterministic lookup, write, and motion make it correct after t+1. Every one-step interpreter procedure terminates because table lookup and the finite list operations finish.
The induction gives equal terminal outcomes whenever the simulated machine halts. If the simulated run has no terminal configuration at any finite t, no interpreter cycle exits by a terminal signal. The interpreter still performs the simulation, but it supplies no general total prediction algorithm for halting. Related reading: [Machine descriptions and universal simulation](https://faculty.ist.psu.edu/vhonavar/Courses/ai100/turing.pdf), [Parameter fixing, self-application and diagonal limits](https://builds.openlogicproject.org/open-logic-complete.pdf). Maintain the exact configuration invariant and distinguish a partial evaluator from a halting decider.
Run countably many searches fairly
Enumerate the declared input codes by i≥0. At global stage s, allocate one more step for each of the first s+1 simulations, starting the new entry at its declared initial configuration. Check any already terminal starting state separately and stop advancing a simulation once it has halted.
A live entry i begins at stage i. At every later stage until it halts, it gets one more step. Thus its k-th simulated transition for k≥1 occurs at stage i+k−1. A zero-step terminal entry is detected as soon as it is introduced.
To enumerate halting inputs, output an input when its first terminal configuration is observed and mark that entry as finished. Alternatively maintain a set of already printed codes if the input naming enumeration may repeat the same string. Every printed code has an actual terminal run.
An independent budget test (i,j) of j steps appears once at stage i+j. This scheduling argument gives eventual testing for every fixed pair without supplying a finite bound on arbitrary halting.
| Quantity | Exact result |
|---|---|
| Target pair | (1, 3) |
| First stage i+j | 4 |
| Index within that stage (zero-based) | 1 |
| Full stage | (0,4), (1,3), (2,2), (3,1), (4,0) |
Exact inputs and supporting calculations
| Parameter | Value |
|---|---|
| i | 1 |
| j | 3 |
For any halting input, use an index i at which it is named and its finite exit step k. The schedule eventually detects it without waiting on any one earlier long-lived input. Every stage has finitely many finite operations. No claim is made that all live entries will eventually be marked. Related reading: [Machine descriptions and universal simulation](https://faculty.ist.psu.edu/vhonavar/Courses/ai100/turing.pdf), [Effective enumeration and complementary recognition](https://builds.openlogicproject.org/open-logic-complete.pdf). Every live entry receives its next step after a finite stage. A zero-step halt has a separate convention.
Recognize the halting relation
Fix the input coding for H. Define T(e,x,s) to hold when e is valid, x is in the declared input universe and machine e is terminal by the end of s simulated transitions on x, including any terminal initial configuration. Invalid source inputs give false.
The procedure testing T runs at most s simulated transitions after validity and initialization. The operations used for each step are finite. Therefore T is a total decidable predicate, and an actual terminal computation is recorded by some bound s.
By definition H consists exactly of valid pairs satisfying ∃s T(e,x,s). On a parsed pair, test s=0,1,2,… and accept at the first success. This gives a recognizer because any finite halting time is eventually passed.
Failure of T for one s is negative evidence only through that time. If it fails for every s, the witness search has no prescribed finite point at which it can finish with no. The later diagonal argument shows why no replacement uniform computable rule decides both signs. Related reading: [Machine descriptions and universal simulation](https://faculty.ist.psu.edu/vhonavar/Courses/ai100/turing.pdf), [Parameter fixing, self-application and diagonal limits](https://builds.openlogicproject.org/open-logic-complete.pdf), [Effective enumeration and complementary recognition](https://builds.openlogicproject.org/open-logic-complete.pdf), [Finite computation normal form](https://builds.openlogicproject.org/open-logic-complete.pdf). The existential step bound is an ordinary natural witness. Bounded failure does not imply permanent nontermination.
Separate acceptance from halting
Use H for all accepted or rejected terminal outcomes and A for accepting terminal outcomes only. A valid machine that immediately rejects a chosen input is a direct member of H outside A. A looping run is in neither set, and invalid pairs are excluded by the fixed coding convention.
Given M, construct M⁺ by simulating M on the same runtime input. Enter a terminal state with accept if M's simulation accepts. If it reports reject, enter a fresh loop state with a self-transition on each possible scanned symbol and never leave it.
On inputs where M accepts, the finite simulation reaches the accepting branch, so M⁺ halts and accepts. Where M rejects, the new program enters the manufactured infinite loop. Where M never terminates, M⁺ never exits its faithful simulation and so also diverges.
The halting domain of M⁺ is exactly the language recognized by M. The construction depends only on finite syntactic data and the fixed interpreter. It leaves a total verdict machine total only if there are no rejecting executions under the given input scope. Related reading: [Machine descriptions and universal simulation](https://faculty.ist.psu.edu/vhonavar/Courses/ai100/turing.pdf), [Parameter fixing, self-application and diagonal limits](https://builds.openlogicproject.org/open-logic-complete.pdf). A rejecting terminal outcome belongs to H and does not belong to A.
Diagonalize against an acceptance decider
Suppose D is a total decider for A. On input u, build B to inspect whether u is a valid machine code. For a valid code it forms the accepted pair encoding ⟨u,u⟩ and calls D. B uses the same machine model, with all parsing and simulation expressed by its finite instructions.
If D returns yes, B enters a permanent loop. If D returns no, B accepts. Choose a rejecting outcome on invalid u, which ensures the behavior on malformed data is defined without affecting the diagonal input.
Let b be the valid code of B and evaluate B on b. A yes from D on ⟨b,b⟩ says B accepts b. By the branch definition B now loops and cannot accept, giving a contradiction.
A no from D says B fails to accept b. By the other branch B accepts. Either reply is impossible under the assumption that D decides A. The construction requires a total answer on the self-input and works with a fixed ordinary program description as data. Related reading: [Parameter fixing, self-application and diagonal limits](https://builds.openlogicproject.org/open-logic-complete.pdf). An alleged acceptance decider must answer correctly on the new machine's valid self-input.
Prove halting undecidable by runtime inversion
Suppose a program D always halts with the correct answer to whether any valid pair belongs to H. Build C that on valid input u asks D about ⟨u,u⟩. On a yes, C follows a permanent loop. On a no it enters a terminal accepting state.
The formation of the pair, finite recognition of legal descriptions, and invocation of D are ordinary Turing-machine operations. On invalid u take a fixed terminal behavior. The resulting machine has a valid finite code c.
If D answers yes for ⟨c,c⟩, it asserts that C eventually halts on c, but C loops by construction. If it answers no, it asserts that C does not halt on c, but C terminates because the call to D returns no.
Thus H is undecidable. Using rejection in place of the permanent loop would not supply this contradiction: a rejecting halt still belongs to H. Explicit inversion between termination and divergence is the relevant change of behavior. Related reading: [Parameter fixing, self-application and diagonal limits](https://builds.openlogicproject.org/open-logic-complete.pdf), [Turing's printing model, first-order application and formal equivalence](https://faculty.ist.psu.edu/vhonavar/Courses/ai100/turing.pdf). Exchanging halting with divergence is required to contradict a halting decision.
Relate recognition of complementary sets to decision
Suppose S and its complement over the same universe have recognizers R₁ and R₀. On x, alternate finite steps of the two runs. Track accepting outcomes and keep advancing any still live recognizer when another one rejects.
Exactly one recognizer has an accepting halt. It belongs to the side that actually contains x, and fairness guarantees its accepting transition is eventually performed. Output yes for R₁ and no for R₀. This is a total decider.
If S is decidable, the same total machine recognizes S using the yes outcome and recognizes the complement after exchanging the outcomes. Therefore a set is decidable exactly when it and its complement are both c.e.
With complementary semidecision procedures exactly one accepts, so the alternating race yields a decider. First arrival alone cannot validate the promise.
| Quantity | Exact result |
|---|---|
| Acceptance slot of A | 7 |
| Acceptance slot of B | None |
| First acceptance | A |
| Exactly one accepts on this input | True |
| Promised decision | Yes, A accepts |
Exact inputs and supporting calculations
| Parameter | Value |
|---|---|
| A | 4 |
| B | null |
Both H and A are c.e., by bounded simulation or direct acceptance recognition. The two diagonal proofs rule out a total decider. If either complement were c.e. the two-recognizer construction would give such a decider, so neither complement is c.e. Related reading: [Effective enumeration and complementary recognition](https://builds.openlogicproject.org/open-logic-complete.pdf). Recognize the two signs over the same whole universe. Fair interleaving reaches the unique accepting run.
Compare the c.e. set presentations
If R recognizes S, turn its rejecting halt into a loop and give its accepting halt a fixed output, for example zero. The resulting partial computable function halts exactly on S. Conversely simulate a partial computable function and accept when it returns, so its domain is c.e.
If S is recognizable, dovetail the recognizer on all coded inputs. Print each input when first accepted. Every printed input belongs to S, and every member is printed after finitely many stages. This is a finite-instruction enumerator, even when there are no outputs.
Given an enumerator, recognize x by simulating it and accepting when it prints x. If the algorithm halts after a finite list without x, the recognizer can reject or loop. Equality of finite codes is decidable and no member is missed.
For nonempty S let a be the first printed value, obtained by waiting until the first output. Define a total sequence indexed by pairs (s,k): if the enumerator has a kth output during its first s steps, return it, otherwise return a. Every member appears and every output belongs to S. Empty S cannot be the range of a total function on ℕ, since such a function has a value at zero. Related reading: [Effective enumeration and complementary recognition](https://builds.openlogicproject.org/open-logic-complete.pdf). The range of a total sequence is nonempty. General enumerators can print nothing.
Build c.e. unions and intersections
Run recognizers R_S and R_U on the same input using fair interleaving. For their union accept when either accepts. For their intersection remember each acceptance flag and accept when both have occurred. Every member has precisely the needed finite accepting evidence and no nonmember can produce those flags.
For a finite union or intersection the same proof uses finitely many acceptance flags. The two-input case needs no decision on whether a still running branch will ever succeed. If a branch rejects, record its finished nonaccepting state and keep any relevant live computations progressing.
If f is total computable and S is c.e., first compute f(x) and then start R_S on its coded result. Since the first step always ends, exactly those inputs for which f(x) lies in S are recognized. The special case of computable preimages for decidable sets uses a total decision in the second step.
Closure under difference would apply to the whole decidable universe and the c.e. halting set H. Their difference is the complement of H, which is not c.e. by the diagonal and complementary recognition arguments. Thus the union and intersection procedures cannot in general be replaced by an accepting computation for difference. Related reading: [Effective enumeration and complementary recognition](https://builds.openlogicproject.org/open-logic-complete.pdf), [Mapping reductions and halting completeness](https://builds.openlogicproject.org/open-logic-complete.pdf). Union and intersection use positive recognition flags. A difference may require nonrecognizable evidence.
Transfer decision through a mapping reduction
Let f be total computable and satisfy x∈S iff f(x)∈U over the specified universes. If U has a decider, compute f(x) first and run that decider. The result always terminates and is correct for both signs of S.
If U is c.e., replace the decider by a recognizer. Total computation of f ensures the recognizer is reached. It accepts exactly when the two membership predicates are true. The same f satisfies x∉S iff f(x)∉U, so recognition of the target complement pulls back to the source complement.
To prove U undecidable it therefore suffices to reduce a known undecidable S to U. The hypothetical target decider would solve the known hard source. To prove that U is not c.e. choose a source known not to be c.e. and use its recognition version.
A reduction from U to S alone cannot establish that conclusion about U. A simple decidable problem can reduce to a much harder one by choosing two fixed output instances of opposite membership. The map, its totality and the membership equivalence are all essential. Related reading: [Mapping reductions and halting completeness](https://builds.openlogicproject.org/open-logic-complete.pdf). Use a total computable map and an equivalence of membership for both signs.
Compose reductions and distinguish their strengths
If f reduces R to S and g reduces S to U, both functions halt on all input codes in their declared domains and ranges. Their composition g(f(x)) is total computable and x∈R iff f(x)∈S iff g(f(x))∈U. Effective encodings of the middle set must agree.
A mapping reduction gives a Turing reduction that computes f(x), makes one oracle query to U and returns exactly its answer. A Turing reduction can also negate an answer, make successive queries based on earlier replies and perform arbitrary finite computation between queries, subject to total decision in the stated oracle setting.
The complement of H has a one-query Turing reduction to H: ask whether x is in H and invert the answer. Suppose the same direction had a many-one reduction. Since H is c.e., the preimage would make its complement c.e., contradicting the established theorem.
This comparison exhibits a genuine distinction even with one oracle query. It uses ordinary total computable f in the many-one definition. An oracle-computable f would change the notion and invalidate the ordinary recognition pullback used in the argument. Related reading: [Mapping reductions and halting completeness](https://builds.openlogicproject.org/open-logic-complete.pdf), [Turing's original oracle-machine operation](https://people.math.ethz.ch/~halorenz/4students/Literatur/TuringOrdinalLogic.pdf), [The relative halting jump](https://www.math.umd.edu/~dkueker/713.pdf). Composition uses the exact middle domain. Turing reductions may invert their oracle replies.
Reduce halting and acceptance in both directions
Given a valid pair ⟨M,x⟩, generate a finite program U with M and x fixed in its descriptive data. On blank input it simulates M on x. It accepts whenever the simulation reaches either a rejecting or an accepting halt. When the simulation diverges, U stays in it.
The first map outputs ⟨U,blank⟩ for an A-query. Membership is equivalent to termination of M on x, proving H≤ₘA. On an invalid source code use a fixed valid output whose machine loops, which preserves no membership and makes the mapping total on all source encodings.
For A≤ₘH, generate V on blank input simulating M on x. If the simulation accepts, V halts. If the simulation rejects, V changes to a permanent loop. Divergence of the simulated run also prevents any halt of V.
Output ⟨V,blank⟩. The target pair is in H just when the source accepts. Again send all invalid source codes to a fixed looping pair. The two constructions differ in how they treat a rejecting simulated run, while both rely on an effective finite wrapper that gives new code before any dynamic simulation of M on x. Related reading: [Parameter fixing, self-application and diagonal limits](https://builds.openlogicproject.org/open-logic-complete.pdf), [Mapping reductions and halting completeness](https://builds.openlogicproject.org/open-logic-complete.pdf). Two wrappers handle rejecting halts differently, with valid negative witnesses for malformed source inputs.
Halting on every input is a different question
Let TOT be the valid program descriptions whose machines halt for every input natural number. To reduce H to TOT, write a program that, on every input y, simulates the fixed M on the fixed x and halts once it sees any terminal state. If M halts all invocations finish. If it diverges every invocation diverges.
To reduce the complement of H to TOT, write a program using y as a step bound on the fixed M(x) simulation. Halt if no terminal state was seen within y transitions, including the initial check. Enter a permanent loop if a halt was seen.
If M(x) diverges, all finite checks fail to find a halt and the new program terminates for every y. If M(x) halts at step t, each y≥t forces a loop and the new program is not total. The invalid source cases map respectively to a fixed non-total program for H and a fixed total one for its complement.
If TOT were c.e., reducing the complement of H to it would make that source c.e. If TOT were co-c.e., reducing H to it would make H co-c.e. Both contradict the two-sided recognition theorem. All programs generated by each transformation are valid, independently of the halting outcome. Related reading: [Mapping reductions and halting completeness](https://builds.openlogicproject.org/open-logic-complete.pdf), [The quantifier levels of totality and finiteness](https://www.math.umd.edu/~dkueker/713.pdf). One reduction waits on the fixed pair. The other uses the runtime input as a finite time bound and inverts the finite result.
Test nonemptiness and emptiness of a recognizable language
Define N to consist of valid codes of programs with at least one accepted input. Dovetail the recognizer over all finite input codes and accept the program code when some run accepts. Any nonempty recognized language has a finite accepting witness, so N is c.e.
For any c.e. S, choose a recognizer R. Given x, effectively write a machine that rejects every runtime input except a fixed word w. On w it runs R on the stored x and accepts when R accepts x. If no acceptance occurs, the recognized language is empty.
The same valid code represents a program in N exactly for x∈S, so N is c.e.-complete under total many-one reductions. Let E be the valid program descriptions of empty recognized languages. For co-c.e. B do this construction for the c.e. set complementary to B; then the output is in E exactly for x∈B.
The complement of E is recognizable by accepting immediately on invalid code and applying the N recognizer on valid code. Hence E is co-c.e.-complete even if the code universe includes malformed data. N is not co-c.e. and E is not c.e., as witnessed by the halting set and its complement in those reductions. Related reading: [Effective enumeration and complementary recognition](https://builds.openlogicproject.org/open-logic-complete.pdf), [Mapping reductions and halting completeness](https://builds.openlogicproject.org/open-logic-complete.pdf), [Rice's original language-class result](https://www.jstor.org/stable/1990888), [Extensional index sets of partial functions](https://builds.openlogicproject.org/open-logic-complete.pdf), [Recursive inseparability from a diagonal pair](https://www.math.umd.edu/~dkueker/713.pdf). An accepted word witnesses nonemptiness, and generated codes for the complementary reduction remain valid.
Prove Rice's theorem for recognized languages
Let P be a property of recognized languages. Membership in P depends only on the language recognized, and there is one recognized language with P and one without it. Therefore some fixed recognized language L has the opposite P status from the empty language. Choose and fix a recognizer R for this L.
From ⟨M,x⟩ produce a program D which on runtime input y first simulates M on the stored x. If M halts by either terminal outcome, proceed to simulate R on y and copy its accepting behavior. If M never halts, no runtime input is accepted.
The language of D is L in the halting case and the empty language in the other case. The code is generated effectively, with a constant empty-language code on invalid pairs. If the empty language is outside P, this reduces H to the set of indices with P. If the empty language belongs to P, it reduces H to the complement of that index set.
A decider for the index set decides its complement too, so either mapping would decide H. This proves the claim for every such nontrivial extensional property. There is no requirement that P itself have a recognizer, and an inspection property of the finite transition table need not be extensional. Related reading: [Rice's original language-class result](https://www.jstor.org/stable/1990888), [Extensional index sets of partial functions](https://builds.openlogicproject.org/open-logic-complete.pdf). Nontriviality is relative to c.e. languages and the property depends only on the recognized language.
Prove the partial-function version of Rice's theorem
View a program as computing a partial numerical function. There is an everywhere-divergent program for the nowhere-defined function. A nontrivial extensional property P of partial computable functions has a witness function f with status opposite to that of the nowhere-defined function. Fix one program for f.
Given ⟨M,x⟩ generate a wrapper that first simulates M(x). After either simulated halt, it runs the fixed program for f on its runtime input y. It copies the computed output if there is one and otherwise diverges in the remaining simulation.
If M(x) never halts the wrapper is undefined on every y. If M(x) halts the wrapper agrees with f for all y, including its undefined values. A hypothetical decider applied to the wrapper gives a halting decider using the two opposite property values, inverting the reply where needed.
Checking whether a designated finite state is present in a table is decidable by parsing. Two descriptions can compute the same function and differ in that property, by adding an inaccessible state without changing any existing execution. Such a table property does not meet the extensional premise. Related reading: [Rice's original language-class result](https://www.jstor.org/stable/1990888), [Extensional index sets of partial functions](https://builds.openlogicproject.org/open-logic-complete.pdf). The delayed computation preserves the original partial output function where defined and where undefined.
Distinguish observable finite behavior from semantic properties
The code of a machine contains finitely many state names and transition rows; a parser verifies format and compares the requested name with each listed name. This always terminates. An unused state may occur in the table without ever being the active state.
To ask if a named state occurs in one run, simulate and accept when its state appears, with the same fixed input and tape-loading convention. Reaching the state is finite evidence. Lack of a sighting through any finite prefix does not decide that it is unreachable in every later step.
From ⟨M,x⟩ construct a valid program that on blank input simulates M on the stored x, using a state set disjoint from a new target name q*. On either simulated terminal outcome it switches to q*. It has no other transition to q* from its simulation, and invalid source inputs may be mapped to a fixed run never reaching q*.
The target name is present in every generated table. It is reached on blank input exactly when the actual source run halts. This is a mapping reduction from H, so the fixed-input state-visit problem is undecidable and c.e., while mere presence of the name in the table is decidable. Related reading: [Machine descriptions and universal simulation](https://faculty.ist.psu.edu/vhonavar/Courses/ai100/turing.pdf), [Mapping reductions and halting completeness](https://builds.openlogicproject.org/open-logic-complete.pdf), [Extensional index sets of partial functions](https://builds.openlogicproject.org/open-logic-complete.pdf), [Turing's printing model, first-order application and formal equivalence](https://faculty.ist.psu.edu/vhonavar/Courses/ai100/turing.pdf). The syntactic occurrence of a state and its appearance during an actual run have different input evidence.
Reduce modified correspondence to ordinary correspondence
Let the modified correspondence instance have tiles (u_i,v_i) with nonempty words over Σ and require first index 1, allowing later repeats. For new symbol * define ℓ(w)=*a₁*a₂⋯*a_k and r(w)=a₁*a₂*⋯a_k* for w=a₁⋯a_k. Both commute with concatenation and satisfy ℓ(w)*=*r(w).
Use further fresh symbols # and $. Make the start tile (#ℓ(u₁),#*r(v₁)), the ordinary tiles (ℓ(u_i),r(v_i)), and the end tile (*$,$). A modified match gives a target match by using start, then the ordinary tiles for all indices after the first, then end. Equal original words give equal marked concatenation by the identity.
In any nonempty target match the first tile must be start: every ordinary tile begins on top with * and on bottom with a symbol of Σ, and the end tile begins with * and $. The next marker after the initial # must be $ or # if a marker occurs, with the same marker and prefix lengths on the two sides. Before a next # the marked word lengths would be even on top and odd on bottom. The same parity prevents equality if the words end without any further marker.
A matching nonempty sequence gives a witness. A mismatch or a proper prefix refutes this sequence only, leaving the existence of other witnesses open.
| Quantity | Exact result |
|---|---|
| Top string | aba |
| Bottom string | aba |
| Common prefix | aba |
| First difference | Both strings agree. |
| Chosen sequence is a witness | True |
Exact inputs and supporting calculations
| Parameter | Value |
|---|---|
| tiles | [["a","ab"],["ba","a"]] |
| indices | [0,1] |
| Tiles used | Top | Bottom | Status |
|---|---|---|---|
| 1 | a | ab | top is a proper prefix |
| 2 | aba | aba | equal |
Thus the first later marker is $, supplied by the first end tile. Between the initial # and that $ the two words are ℓ(U)* and *r(V), where U,V concatenate the first tile's original words followed by the chosen ordinary tiles. Erasing * gives U=V with initial index 1. The transformation is finite and effective. The undecidability consequence invokes the specified nonempty-word modified-problem theorem. Related reading: [Post's original correspondence problem](https://cburdine.github.io/files/Post_Correspondence_Paper_1946.pdf), [Modified correspondence with nonempty pieces](https://www.math.utu.fi/en/home/karhumak/pdf/automata05.pdf). Both source word sides must be nonempty for the first-symbol proof. Fresh sentinels force the correct first/end block.
Connect first-order validity to arithmetic theoremhood
Use a fixed arithmetic language and let θ be the conjunction of the finitely many Robinson Q axioms in that language. For a sentence φ, send its code to the sentence θ→φ. This is a total effective syntactic operation on sentence codes and may send malformed inputs to the fixed well-formed, nonvalid sentence ∃x(x≠x).
If Q proves φ then every model of Q satisfies it by soundness, so θ→φ is true in every structure: a structure satisfying θ is a Q model, and a structure falsifying θ makes the implication true. Conversely validity of θ→φ implies Q⊨φ and completeness gives Q⊢φ.
A validity decider would therefore decide Q theoremhood. Q is a consistent effectively axiomatized extension of Q itself. Apply the previously proved essential undecidability directly, with consistency witnessed by the standard natural numbers.
Valid sentences are still c.e., because one can enumerate checked finite pure first-order proofs and use soundness and completeness to identify their conclusions. Finite axiomatizability of Q made the reduction to one implication possible. No assumption of finite axiomatizability for arbitrary extensions is needed. Related reading: [Turing's printing model, first-order application and formal equivalence](https://faculty.ist.psu.edu/vhonavar/Courses/ai100/turing.pdf), [Finite logical derivations and truth preservation](https://builds.openlogicproject.org/open-logic-complete.pdf#page=142), [First-order completeness for a finite theory's consequence](https://courses.fit.cvut.cz/BI-ALO/henkin-completeness.pdf), [Rosser comparison and essential undecidability](https://builds.openlogicproject.org/open-logic-complete.pdf). A finite conjunction of the Q axioms and first-order completeness enable the reduction. Validity still has finite proof witnesses.
Why bounded proof verification does not decide validity
Fix a sound and complete effective calculus for first-order validity. A proof code specifies finitely many formula strings, rule tags and premise indices. Parsing and checking hypotheses of each rule, including substitutions and eigenvariable side conditions, are finite operations. Verifying the last sentence is the specified input is also decidable.
Given a bound N on the numerical proof code, test every code 0 through N. This procedure finishes and tells whether a valid proof is present in that bounded collection. It is different from a length bound, although any one fixed bound on string length also leaves a finite set to check.
Suppose a total computable B(φ) bounds some proof code of every valid input φ. Compute B(φ); then search its finite range. Validity ensures a found proof, by the guarantee. On an invalid φ soundness excludes all candidate proofs, so the bounded test correctly returns no.
This would be a total decider for first-order validity and contradicts the reduction from Q theoremhood. The assumed bound was required only on valid sentences, yet its computation had to terminate also on invalid sentences for this argument. Proof checking alone supplies no such total bound. Related reading: [Turing's printing model, first-order application and formal equivalence](https://faculty.ist.psu.edu/vhonavar/Courses/ai100/turing.pdf), [Finite logical derivations and truth preservation](https://builds.openlogicproject.org/open-logic-complete.pdf#page=142), [First-order completeness for a finite theory's consequence](https://courses.fit.cvut.cz/BI-ALO/henkin-completeness.pdf), [Rosser comparison and essential undecidability](https://builds.openlogicproject.org/open-logic-complete.pdf). A bounded search is decidable. The assumed bound must be computable on unsuccessful as well as successful inputs.
Read the natural-number quantifiers of computation
Let T(e,x,s) test whether e is a valid program and its computation on input x has halted by the end of s transitions. If e is malformed, define T to be false; check membership of the supplied input in the relevant input convention before simulating. Count terminal initial states at bound zero.
The predicate is decidable because it parses finite data and performs a bounded number of finite interpreter steps. A simulation record could also list the s configurations, giving a checkable finite witness. The stage count s is an ordinary natural number, independent of which computation is being described.
At fixed e and x, membership in H is ∃s T(e,x,s), a c.e. condition. Its negation is ∀s ¬T(e,x,s). The two statements describe an unbounded collection of finite tests even though each individual test terminates.
Halting on every input in ℕ means ∀x∃s T(e,x,s), where the witness bound is permitted to depend on x. Reversing the quantifiers would demand a uniform bound on all runtimes at that index. A program that scans an input string to its end terminates for every finite string and its step counts grow with input length. Related reading: [Effective enumeration and complementary recognition](https://builds.openlogicproject.org/open-logic-complete.pdf), [Finite computation normal form](https://builds.openlogicproject.org/open-logic-complete.pdf), [The quantifier levels of totality and finiteness](https://www.math.umd.edu/~dkueker/713.pdf), [Representing finite decisions at standard numerals](https://builds.openlogicproject.org/open-logic-complete.pdf). The time bound in a totality assertion can depend on the input.
Hard-code inputs by effective machine compilation
Fix a pair-input program P and an ordinary parameter n. Encode n as a finite literal. Build a one-argument program P_n that reads its own runtime input y, forms the standard pair ⟨n,y⟩ and evaluates the universal interpreter on the fixed code of P with that pair.
A compiler can produce P_n's transition table by writing this literal and interpreter setup into a fixed template. To write a natural number code of arbitrary finite length, use finitely many additional writer states. The table is obtained from syntax and does not run P during compilation.
On a runtime input y the pair formation and simulator setup terminate. If P returns a value on ⟨n,y⟩, the simulated terminal step occurs and P_n returns that same value. If P diverges there is no such terminal step and P_n also diverges, preserving the domain as well as the output.
A source rejection and a source divergence have different execution behavior. Both make the constructed acceptance language empty. This is a semantic property of the constructed machine.
| Quantity | Exact result |
|---|---|
| Source behavior on 0 | Accepts |
| Acceptance on inputs 0,1,2 | Yes, Yes, Yes |
| Entire constructed acceptance language | All inputs |
| Property under test | Nonempty acceptance language iff source accepts its fixed input |
Exact inputs and supporting calculations
| Parameter | Value |
|---|---|
| p | accepts-zero |
| n | 0 |
| New input | Simulated input | Execution outcome |
|---|---|---|
| 0 | 0 | Accepts |
| 1 | 0 | Accepts |
| 2 | 0 | Accepts |
The same mechanism permits a program to ignore the runtime input or hard-code more than one finite parameter. It supplies effective parameter fixing across indices. The property being proved is an equality of computed partial functions, with no claim of equal resource consumption or ability to decide divergence. Related reading: [Machine descriptions and universal simulation](https://faculty.ist.psu.edu/vhonavar/Courses/ai100/turing.pdf), [Parameter fixing, self-application and diagonal limits](https://builds.openlogicproject.org/open-logic-complete.pdf), [Finite computation normal form](https://builds.openlogicproject.org/open-logic-complete.pdf). Finite code construction does not execute the input program, and its generated interpreter preserves divergence.
Show diagonal halting is c.e.-complete
Let K={e: e is a valid program and φ_e(e) is defined}, using a fixed effective conversion of program descriptions to ordinary input naturals. Simulating that program on its own code recognizes K. It halts precisely on the positive witness of an ordinary output.
Take any c.e. S⊆ℕ with a recognizer R. Given x, effectively compile a program Q_x that ignores its runtime input. It runs R on the hard-coded x; on acceptance return zero; on rejection enter a permanent loop. It also diverges if R never stops.
Let q(x) be the code of Q_x. Code generation terminates uniformly in x because the table merely embeds the known program and a finite literal. Whatever its own runtime input would have been, Q_x terminates exactly if R accepts x, so x∈S iff q(x)∈K.
Thus every c.e. set has a total many-one reduction to K and K itself is c.e. This is completeness within the class under that reduction. It is stronger than merely knowing some undecidable problem reduces to K, and it is not semantic completeness of an axiom theory. Related reading: [Mapping reductions and halting completeness](https://builds.openlogicproject.org/open-logic-complete.pdf), [Recursive inseparability from a diagonal pair](https://www.math.umd.edu/~dkueker/713.pdf). The compile-time parameter is fixed separately from the program's runtime self-input.
Explain the finite maximum behind Busy Beaver
Among valid program descriptions of bit length at most n there are finitely many machines. Run each logically on a fixed blank input. For those that halt, list their actual terminal step counts as a mathematically defined finite set, and set B(n) to its maximum, taking zero if it is empty.
Each B(n) is a finite natural number and B(n+1)≥B(n) because the allowed set of encodings increases. The definition asserts that a maximum exists among actual halting runtimes, without giving a procedure that determines which programs belong in that set.
Suppose a total computable upper bound F(n)≥B(n) exists. Given a valid blank-input program c of length n, compute F(n) and check its run for that many transitions, including any terminal start. It halts eventually exactly when the finite check observes that halt.
A finite collection can be enumerated, but an effective general maximum would need to identify exactly which programs halt. The supplied proof classification is extra finite information.
| Quantity | Exact result |
|---|---|
| Proven halting cases | 3 |
| Maximum halting steps | 5 |
| Winning indices | 1 |
| B(n) convention | 5 |
Exact inputs and supporting calculations
| Parameter | Value |
|---|---|
| runs | [2,5,"loop",4] |
Blank-input halting is undecidable, because an ordinary halting pair can be compiled into a valid blank-input program with that pair stored in its code. The hypothetical F would decide it. Constants such as base step costs depend on the machine convention, but changing them does not produce a total computable bound in that convention. Related reading: [Parameter fixing, self-application and diagonal limits](https://builds.openlogicproject.org/open-logic-complete.pdf), [Radó's maximal stopping time](https://gwern.net/doc/cs/computable/1962-rado.pdf). The finite maximum is over actual halting runs for each code-length bound. A computable dominating function would decide blank halting.
Show why total computable functions have no effective exhaustive list of total evaluators
Suppose a computable evaluator U(e,x) terminates on all pairs of natural numbers and for each total computable f there is an n with U(n,x)=f(x) for all x. A row of U is an ordinary total function by the common termination assumption.
Define g(x)=U(x,x)+1. This terminates for every x and is computable, since it calls the assumed evaluator once and adds one. Its output is an ordinary natural number. By the exhaustiveness assumption, some index j has U(j,x)=g(x) for every x.
At x=j that equation gives U(j,j)=U(j,j)+1, impossible in ℕ. In particular there cannot be a computable enumeration generating a code for a total program at every index and covering every total computable function, because those codes would induce such a total joint evaluator.
A universal partial evaluator simulates an arbitrary program and may diverge at diagonal pairs. Its diagonal-plus-one expression may therefore fail to be a total function and is outside the assumption used above. Programs can be effectively enumerated when one allows these partial rows. Related reading: [Parameter fixing, self-application and diagonal limits](https://builds.openlogicproject.org/open-logic-complete.pdf), [Turing's printing model, first-order application and formal equivalence](https://faculty.ist.psu.edu/vhonavar/Courses/ai100/turing.pdf). The assumed evaluator is total for all rows and covers every total computable function.
Identify the full quantifier difficulty of totality
Use TOT={e:∀x∃s T(e,x,s)} in the fixed program numbering, with invalid descriptions false for all tests. The bounded simulation relation is decidable, so this is a Π₂ description with a universal block followed by an existential block. If the level is formulated with primitive recursive matrices, use the standard bounded simulation representation or absorb the finite certificate of checking into s.
Let B be described by n∈B iff ∀x∃s R(n,x,s) for a fixed decidable relation R. Given n, generate a program Q_n. On runtime input x it tests s=0,1,2,… for a witness to R(n,x,s); it returns zero at the first success and otherwise continues.
For each x all prior finite checks finish because R is decidable. Hence Q_n halts on x exactly when some witness exists. Thus Q_n is total if and only if the declared Π₂ predicate holds of n.
The map from n to Q_n's code is total computable by storing n and the fixed R test. It does not decide B while generating code. This reduces every such B to TOT. Together with the bounded simulation formula it makes TOT Π₂-complete under total many-one reductions. Related reading: [Finite computation normal form](https://builds.openlogicproject.org/open-logic-complete.pdf), [The quantifier levels of totality and finiteness](https://www.math.umd.edu/~dkueker/713.pdf). The program for each Π₂ instance searches for one computable witness on each supplied input.
Classify finite and infinite recognizable domains
For an index e let W_e be its halting domain in ℕ, taking malformed code to have empty domain. It is infinite exactly when for every bound b some x≥b halts, so INF has formula ∀b∃x,s [x≥b ∧ T(e,x,s)]. Pair x and s to combine the existential variables and obtain a Π₂ form.
Given a fixed decidable R for the predicate ∀x∃s R(n,x,s), construct Q_n on input y to require witnesses for every x≤y. Search stages m=0,1,…, checking for each of the finitely many x≤y whether some s≤m succeeds. Halt with zero when all succeed.
If every requirement has a witness, the finitely many witnesses needed for each y have a maximum stage, and Q_n halts on every y. If the least x without a witness is j, exactly the y<j terminate. Thus failure produces the finite initial segment {0,…,j−1}, empty when j=0.
Effective code generation reduces the given Π₂ set to INF. Hence INF is Π₂-complete, and its complement FIN is Σ₂-complete by complementing the exact equivalence and the normal form. Using empty domains for invalid descriptions keeps this complement relation exact even on the larger code universe. Related reading: [The quantifier levels of totality and finiteness](https://www.math.umd.edu/~dkueker/713.pdf). For each tested input only finitely many witness requirements are searched together. One least missing requirement caps all larger inputs.
Compare even guaranteed terminating machines
For each valid halting instance code a with fixed simulated input, let F_a(k) be 1 if that run reaches a terminal state by step k and 0 otherwise. Let Z(k)=0 for all k. The program for F_a runs a bounded loop and always stops, regardless of the eventual behavior of the simulated machine.
These can even be given as primitive recursive descriptions. Code finite tapes in a fixed integer base and include the state and head data. A step is a primitive recursive update using symbol extraction, finite case selection and fixed-base arithmetic, with a terminal marker fixed once reached. Iterate the update k times by primitive recursion.
Effective description construction fixes the source table and input as literals. Then F_a and Z agree on every k exactly when the source never halts. If it halts at time t, their values disagree for k=t and every greater k, including t=0 for a terminal start.
A decider for equality of the resulting total Boolean descriptions would decide the complement of H, and therefore also H by exchanging its replies. No promise about individual termination removes the all-input equality question. Particular finite evaluations and a finite set of witnessed inequalities remain checkable. Related reading: [Parameter fixing, self-application and diagonal limits](https://builds.openlogicproject.org/open-logic-complete.pdf), [Extensional index sets of partial functions](https://builds.openlogicproject.org/open-logic-complete.pdf), [Finite computation normal form](https://builds.openlogicproject.org/open-logic-complete.pdf). The generated programs always terminate on each supplied bound. Equality quantifies over every bound.
Construct recursively inseparable c.e. sets
Let A₀ be the valid indices e such that φ_e(e) terminates with value 0, and A₁ those with value 1. Both are c.e. by self-input simulation and output checking. The deterministic program has at most one terminal output on that input, so the sets are disjoint.
Suppose a decidable D contains A₀ and is disjoint from A₁. Construct the total computable program Q that on input y returns 1 if y∈D and 0 otherwise. Because the supposed separator decides every y, Q returns the declared value on every input.
Let q be a valid index of Q. If q∈D then Q(q)=1 and q∈A₁, violating disjointness. If q∉D then Q(q)=0 and q∈A₀, violating inclusion. Neither case can occur.
There is no decidable separator, though there is a set-theoretic separator such as A₀. The proof relies on the same effective numbering for input indices and programs. The argument is stronger than just finding two disjoint c.e. sets with undecidable membership. Related reading: [Recursive inseparability from a diagonal pair](https://www.math.umd.edu/~dkueker/713.pdf). Use a fixed enumeration and choose the opposite output for each membership branch of the proposed separator.
Distinguish finite input bounds from an all-input promise
Given a finite explicit list x₁,…,x_m, a valid program e and finite bound s, perform the initialization and at most s simulated steps on each input. Return yes if every run is terminal by that bound. An empty input list satisfies the universal claim vacuously.
All simulations are finite, each is exact and the conjunction is finite. Therefore this decision checks both positive and negative answers for the stated time-limited property. It requires a bound even when the list itself contains only one input.
Remove the step bound and ask whether the program ever halts on each listed input. Even on the singleton list containing a fixed blank input, this is precisely blank-input halting. Embedding an arbitrary pair in such a program gives a reduction.
Thus finiteness of the input list does not guarantee a uniform computation of the unbounded answer. Specific restrictions on reachable configurations or a proved time bound can give a different decidable problem. The declared list by itself supplies neither. Related reading: [Parameter fixing, self-application and diagonal limits](https://builds.openlogicproject.org/open-logic-complete.pdf), [Mapping reductions and halting completeness](https://builds.openlogicproject.org/open-logic-complete.pdf), [Finite computation normal form](https://builds.openlogicproject.org/open-logic-complete.pdf), [Radó's maximal stopping time](https://gwern.net/doc/cs/computable/1962-rado.pdf), [Reachability in a finite directed graph](https://jeffe.cs.illinois.edu/teaching/algorithms/book/05-graphs.pdf). An explicit finite list supplies a decision only with the stated time bound or a separate finite configuration bound.
Read the Diophantine undecidability consequence
Use the Davis–Putnam–Robinson–Matiyasevich theorem in the form: for each c.e. S⊆ℕ there are a finite k and a polynomial P(n,y₁,…,y_k) with integer coefficients such that n∈S exactly when P(n,y)=0 for some y in ℕ^k. Here ℕ contains zero.
Choose S=K and fix the polynomial given by the theorem. Given n, compute the integer coefficients after substituting n for the first argument. This finite algebraic operation outputs one instance of the problem asking whether an integer-coefficient polynomial has a zero with all unknowns natural.
The equivalence from the theorem gives membership in K exactly when the generated polynomial instance has a solution. A decision algorithm for all these polynomial instances would decide K and hence the halting set. The source set and the fixed representation, rather than a search over arbitrary proofs, provide the reduction.
Searching all tuples in increasing coordinate bounds recognizes a positive answer. A specified finite search box admits a total finite decision, but a fixed finite number of variables still ranges over infinitely many tuples. Undecidability uses the theorem about unbounded unknowns and does not state that every individual polynomial is hard. Related reading: [The Diophantine representability theorem](https://m.mathnet.ru/php/archive.phtml?jrnid=im&option_lang=eng&paperid=1910&wshow=paper), [Parameters and unknowns in Diophantine representation](https://link.springer.com/chapter/10.1007/3-540-29462-7_10). Substitute the ordinary parameter into a fixed integer-coefficient polynomial with natural unknowns ranging unboundedly.
An arithmetic existential sentence can describe a finite run
Use bounded simulation with an arithmetic representation R_T(e,x,s) in the language of 0, successor, addition and multiplication. Under a primitive recursive encoding, verify all finite table data and iterate the configuration update s times. The relation is primitive recursive and ordinary representability in Q gives correct positive and negative numeral instances.
Because the standard naturals satisfy Q and every actual natural triple has its numeral, those instance verifications give exactly the intended relation in ℕ. On fixed ordinary e and x, the sentence ∃s R_T(ē,x̄,s) is true in ℕ exactly when the run has some finite terminal step.
If a concrete certificate s₀ succeeds, Q proves that numeral instance of the relation and hence the existential sentence. If no certificate succeeds, each numeral instance is excluded by its own finite verification. Those separate verifications are not automatically one proof of the universal negation.
Thus finite verification, standard-model truth and derivability in a chosen theory have different scopes. A complete finite-state loop invariant may permit a particular nonhalting proof. The general argument supplies positive certificate proofs and does not decide which universal negations can be derived by proof search. Related reading: [Finite computation normal form](https://builds.openlogicproject.org/open-logic-complete.pdf), [Representing finite decisions at standard numerals](https://builds.openlogicproject.org/open-logic-complete.pdf). Standard semantics and proof in Q coincide on the verified fixed numeral instances covered by representability.
Diagonalize relative to an oracle
Fix any oracle set B⊆ℕ. Extend the program model with a membership query to B as one designated operation. Define K^B to contain valid oracle-machine indices e whose run with oracle B on input e terminates.
Suppose D with access to the same B is a total decider for K^B. Build an oracle program Q that on a valid index y runs D with oracle B on y. If D answers yes, Q loops. If D answers no, Q halts. A fixed branch handles invalid y.
Use Q's valid code q in its own input. A yes says that Q^B(q) halts and causes it to loop. A no says it diverges and causes it to halt. Thus no oracle program using only B decides K^B.
Given n, compile a valid program ignoring its runtime input. It queries B about the hard-coded n and halts just when the answer is yes. Its code is generated without an oracle reply. Therefore n∈B iff that code belongs to K^B, giving B≤ₘK^B while K^B remains undecidable relative to B. Related reading: [Mapping reductions and halting completeness](https://builds.openlogicproject.org/open-logic-complete.pdf), [Turing's original oracle-machine operation](https://people.math.ethz.ch/~halorenz/4students/Literatur/TuringOrdinalLogic.pdf), [The relative halting jump](https://www.math.umd.edu/~dkueker/713.pdf). Keep the same oracle in the queried and constructed runs. The embedding of B into its jump is an ordinary code map.
Separate model equivalence from the Church–Turing thesis
One concrete register instruction increments a natural-valued register; another branches on zero and otherwise decrements. A Turing machine can represent finitely many registers as unary blocks separated by markers, scan to the requested block, update it, and transfer to the new finite control label.
For the reverse direction use two registers recording stacks of symbols on opposite sides of a simulated head, a finite-control scanned symbol, and scratch registers. Encode each alphabet symbol as one of 1,…,k−1 in base k. A push is arithmetic n↦kn+d. A pop obtains the remainder mod k and updates to the quotient, with zero meaning the absent stack beyond which cells are blank. Repeated fixed-count increments, decrements and zero tests implement these operations with scratch registers.
Each simulated move updates the correct stack and scanned symbol. Initially the stacks encode the declared input. Induction on the simulated steps proves identical finite configurations and terminal outputs over the standard input and output encodings. Each simulation step takes finite time; the two models need not take the same amount of time.
This gives one effective equivalence between specified formal models. The Church–Turing thesis also identifies the informal concept of an effective calculation with the functions computed in such models. Agreement of formal models is evidence for that identification. It is not a formal theorem about every informal procedure without first defining what counts as such a procedure. Related reading: [Turing's printing model, first-order application and formal equivalence](https://faculty.ist.psu.edu/vhonavar/Courses/ai100/turing.pdf), [Turing's original oracle-machine operation](https://people.math.ethz.ch/~halorenz/4students/Literatur/TuringOrdinalLogic.pdf). Specify the two formal models and their encodings. The thesis adds an informal identification beyond formal simulation.
Separate decidability from computational cost
For a propositional formula with k distinct variables enumerate all 2^k binary assignments. For each, evaluate the finite parse tree from leaves to root using the displayed Boolean connectives. A propositional formula is a tautology exactly if no assignment makes the root false.
All assignments and all tree evaluations are finite. The algorithm is a decision procedure even when its time grows exponentially with k. The growth of this particular algorithm is not a proof that every algorithm must use that amount of time.
For a finite directed graph, start with the initial vertex marked. Repeatedly add every outgoing neighbor of every marked vertex until either the target is found or the set stops growing. After j expansions all vertices reached by a path of at most j edges are marked, by induction on path length.
If a vertex is reachable, a path to it can be shortened whenever a vertex repeats. A shortest path therefore has at most |V|−1 edges. Thus the finite procedure decides reachability, including the zero-edge path from a vertex to itself. Arbitrary Turing computations have no comparable finite bound on complete reachable configurations. Related reading: [Reachability in a finite directed graph](https://jeffe.cs.illinois.edu/teaching/algorithms/book/05-graphs.pdf), [Truth-table tests in propositional logic](https://forallx.openlogicproject.org/forallxyyc.pdf#page=193). Finite assignments and finite graph vertices supply distinct termination arguments. Runtime growth alone is not undecidability.
Follow exact computation traces, bounded searches, interleavings and finite reductions. Each case distinguishes observed execution from a general decision claim.
A validated finite run distinguishes finding a halt from exhausting a budget
Halts after the first counter move
A repeated full configuration proves repetition for this deterministic machine from this start. The absence of an observed halt within a finite budget is otherwise inconclusive.
| Quantity | Exact result |
|---|---|
| Trace status | Halts |
| State and register at stop | (1, 1) |
| First exact repeat | None |
Exact inputs and supporting calculations
| Parameter | Value |
|---|---|
| states | [["inc",1],["halt",1]] |
| start | 0 |
| register | 0 |
| steps | 4 |
| Transitions completed | State | Register | Instruction |
|---|---|---|---|
| 0 | 0 | 0 | inc |
| 1 | 1 | 1 | halt |
Diagonal scheduling gives every finite search budget its turn
Task 1 at budget 3
An independent budget test (i,j) of j steps appears once at stage i+j. This scheduling argument gives eventual testing for every fixed pair without supplying a finite bound on arbitrary halting.
| Quantity | Exact result |
|---|---|
| Target pair | (1, 3) |
| First stage i+j | 4 |
| Index within that stage (zero-based) | 1 |
| Full stage | (0,4), (1,3), (2,2), (3,1), (4,0) |
Exact inputs and supporting calculations
| Parameter | Value |
|---|---|
| i | 1 |
| j | 3 |
Recognizers for a set and its complement yield a decider under the actual promise
Only A accepts at its fourth step
With complementary semidecision procedures exactly one accepts, so the alternating race yields a decider. First arrival alone cannot validate the promise.
| Quantity | Exact result |
|---|---|
| Acceptance slot of A | 7 |
| Acceptance slot of B | None |
| First acceptance | A |
| Exactly one accepts on this input | True |
| Promised decision | Yes, A accepts |
Exact inputs and supporting calculations
| Parameter | Value |
|---|---|
| A | 4 |
| B | null |
A mapping reduction can encode one input into a new machine
Simulated program accepts zero
A source rejection and a source divergence have different execution behavior. Both make the constructed acceptance language empty. This is a semantic property of the constructed machine.
| Quantity | Exact result |
|---|---|
| Source behavior on 0 | Accepts |
| Acceptance on inputs 0,1,2 | Yes, Yes, Yes |
| Entire constructed acceptance language | All inputs |
| Property under test | Nonempty acceptance language iff source accepts its fixed input |
Exact inputs and supporting calculations
| Parameter | Value |
|---|---|
| p | accepts-zero |
| n | 0 |
| New input | Simulated input | Execution outcome |
|---|---|---|
| 0 | 0 | Accepts |
| 1 | 0 | Accepts |
| 2 | 0 | Accepts |
A proposed correspondence sequence is checked by two concatenations
Equal strings with shorter first top tile
A matching nonempty sequence gives a witness. A mismatch or a proper prefix refutes this sequence only, leaving the existence of other witnesses open.
| Quantity | Exact result |
|---|---|
| Top string | aba |
| Bottom string | aba |
| Common prefix | aba |
| First difference | Both strings agree. |
| Chosen sequence is a witness | True |
Exact inputs and supporting calculations
| Parameter | Value |
|---|---|
| tiles | [["a","ab"],["ba","a"]] |
| indices | [0,1] |
| Tiles used | Top | Bottom | Status |
|---|---|---|---|
| 1 | a | ab | top is a proper prefix |
| 2 | aba | aba | equal |
A finite Busy Beaver analogue still needs halting witnesses to select a maximum
One maximum among four classified runs
A finite collection can be enumerated, but an effective general maximum would need to identify exactly which programs halt. The supplied proof classification is extra finite information.
| Quantity | Exact result |
|---|---|
| Proven halting cases | 3 |
| Maximum halting steps | 5 |
| Winning indices | 1 |
| B(n) convention | 5 |
Exact inputs and supporting calculations
| Parameter | Value |
|---|---|
| runs | [2,5,"loop",4] |
Worked examples
Trace one finite tape computation
In state q the machine leaves each 1 unchanged, moves right and stays in q. On a blank it leaves the blank unchanged, stays at that cell and enters the accepting state. The run stops on entry to that state, and the entry transition counts as one step. On start tape 111 with the head on the first symbol, list the states, head positions and exact transition count under the declared convention.
- Use cells 0, 1 and 2 for the three written ones. Every other cell initially holds blank. Start in q at position 0. The only nonterminal step on 1 preserves the tape and moves the head right.
- After the first, second and third transitions the heads are at positions 1, 2 and 3 respectively, all in q. The tape has not changed. At cell 3 the scanned symbol is blank, so the scan rule on 1 does not apply.
- The blank rule enters the terminal accepting state and does not move the head. Count this transition as the fourth. At cell 3 immediately before it there had still been a nonterminal configuration, so the halting time is exactly four.
- Each row of this trace is verifiable from the preceding complete configuration and the specified deterministic table. The resulting bounded-run predicate is false at bound 3 and true at bound 4 or any larger bound.
The machine has state q with head positions 0 through 3, then accepts at position 3, for four transitions.
Parse two different machine–input pairs
Use the pair code 1^|u|0uv for binary strings. Decode 1110101011 and compute the code of (empty,1011). Prove the first field can be unambiguously determined even when u contains zeros.
- For 1110101011, count the first three ones and stop at the following zero. Remove the prefix 1110. The remainder 101011 has six bits and therefore contains the three bits promised for the first field.
- Read its first three bits as u=101 and its final three bits as v=011. For (empty,1011), use a zero-length leading run of ones, the delimiter zero, and then v, giving 01011.
- The delimiter is encountered while scanning the leading length code. After the delimiter the decoder consumes exactly |u| data bits. Zeros in u are ordinary counted data and cannot terminate that phase prematurely.
- Having fixed the amount consumed for u, the rest is exactly v. Running the encoder on the recovered pair produces the original coded string, which verifies that the fields were split unambiguously.
The first pair is (101,011), and (empty,1011) encodes as 01011.
Recognize before the other branch finishes
Suppose live recognizers for S and its complement are run in synchronized rounds. On the fixed input, the complement's recognizer accepts at its fifth simulated transition, while the first has not accepted by then. State the result and justify the general algorithm.
- For membership in S there are two possible acceptance signals. Name one branch for S and the other for its complement; rejection by either program does not serve as the positive signal of the other branch.
- In a fair synchronized schedule each live branch gets one step per round. Keep track of branches that have already rejected. The complement branch reaches an accepting state on its fifth simulated transition, so its positive claim is that the input lies outside S.
- Return no at that signal. On this input it is immaterial whether the first branch will reject or run forever, since soundness of its recognizer prevents an acceptance for any member of the complement.
- For a general input, exactly the correct branch has a finite accepting computation. The schedule reaches the needed number of its own transitions. Therefore the construction terminates on all inputs and distinguishes the two sides.
Return no on the synchronized round that performs the complement recognizer's fifth transition.
Build a halting-to-acceptance wrapper
A fixed input machine has just three possible behaviors: accept, reject or loop. Design the new blank-input machine for the H-to-A direction and give its output in each case.
- Embed the original machine and its fixed input into a fresh program description. On blank input initialize the universal interpreter for that stored pair. This preprocessing is finite and has no dependence on which event eventually occurs.
- Run the simulator and send its accepting terminal signal to an accepting halt of the wrapper. Send its rejecting terminal signal to the same accepting halt. Both correspond to a yes instance of the original halting problem.
- If the original run never stops, no simulated terminal signal is seen and the wrapper stays in the simulation. Thus in the three cases its behavior is accept, accept, and diverge.
- Output the new blank-input pair as one instance of acceptance. The compilation function computes finite code without testing the termination of the original run. Its yes membership is exactly the yes membership of H.
The blank-input wrapper accepts after either simulated terminal outcome and diverges after a divergent simulation.
Reduce to a nonempty language with one witness
For given M,x build a recognizer of either {101} or the empty language based on whether M halts on x. Verify what occurs on 101, 10 and 1011, and state the reduction direction.
- Generate a machine that compares its runtime input with the exact three-character word 101. If they differ, reject immediately. Thus the proper prefix 10 and the longer word 1011 both fail the check.
- On the exact word 101, simulate the hard-coded pair (M,x). If that simulation halts in either terminal state, accept. If it remains nonterminal there is no acceptance of 101.
- The generated machine recognizes {101} in the halting case and recognizes ∅ in the divergent case. Those are its entire languages because inputs of any different length or content are rejected.
- Return the generated program code as the instance of nonemptiness. Since generation uses only the finite source description, this is a total computable reduction H≤ₘN with both membership signs accounted for.
The output language is {101} upon halting of the stored run, and is empty otherwise.
Use semantically nontrivial properties correctly
For a language property ‘contains 00’, choose witness languages and give the explicit construction making the produced language have the property exactly when M halts on x. Explain why checking a literal 00 in the encoded table is a different decision problem.
- Define the property in terms of recognized words: 00 must belong to the language. The empty language fails it, and a recognizer that accepts exactly the two-character word 00 realizes a witness satisfying it.
- On runtime input y, first simulate M on the stored x. After either terminal outcome, run the fixed recognizer for {00} on y. If M never halts the second stage is never reached.
- Thus the generated language is either ∅ or {00}, and contains 00 exactly when M halts on x. This total construction reduces H to the index set for the property. A decision procedure for it would solve H.
- An encoding may contain the literal bits 00 in state numbers, data, padding or unreachable rows. A finite substring inspection tests the encoding, and no such inspection by itself tests acceptance of the word 00.
Use ∅ and {00} so the generated language has the property exactly in the halting case.
Build an actual desynchronized correspondence match
Take required first tile (a,ab) and another tile (ba,a). Verify that the sequence first, second gives matching concatenations in the modified problem. Compute the three target tiles used by start, second and end with *, #, $.
- Start with (a,ab), then append (ba,a). Top concatenation is a followed by ba, giving aba. Bottom concatenation is ab followed by a, also aba. This uses the required first tile.
- The start tile has top #ℓ(a)=#*a and bottom #*r(ab)=#*a*b*. For the ordinary second tile, ℓ(ba)=*b*a and r(a)=a*. The end tile is (*$,$).
- Top concatenation of the three new tiles is #*a*b*a*$. The bottom concatenation is also #*a*b*a*$. The extra * in the start bottom and end top aligns the marked equal word.
- Removing the outer # and $ and erasing all * gives aba on both sides. This is a positive demonstration of the reduction. The proof of the converse uses the fresh markers and parity to select these same classes of tiles even for an arbitrary target match.
The modified words both equal aba. The target tiles are (#*a,#*a*b*), (*b*a,a*) and (*$,$).
Turn a finite arithmetic theory question into validity
Let θ be the conjunction of the Q axioms and φ any first-order arithmetic sentence in its fixed language. Give the exact input expression for the validity decider and prove that each yes/no result decides theoremhood.
- Conjoin the fixed finite set of Q axioms into a single sentence θ. An input φ is a well-formed sentence in the same first-order arithmetic language. Form the sentence θ→φ by an effective syntactic construction.
- If Q proves φ, by soundness every structure satisfying θ satisfies φ. Every other structure already satisfies θ→φ because its antecedent is false. Therefore a valid verdict follows.
- If the constructed implication is valid, in particular every structure satisfying θ satisfies φ. It follows that Q semantically entails φ and the complete calculus derives φ from the axioms of Q.
- A yes answer therefore gives Q theoremhood and a no answer gives its complement among sentence codes. A general validity decider would give a general Q-theorem decider, contradicting essential undecidability.
Ask whether θ→φ is valid. The answer is yes exactly when Q proves φ.
Reduce a witness requirement to totality
For fixed n, define R(n,x,s) as s=x+n if n is even, and as x>0 and s=x+n if n is odd. Construct the search program and evaluate totality for n=2 and n=3, including the failing input.
- Given n, compile a program that on x tests s=0,1,… until the displayed relation holds. Return zero at the first success. Each test can compute and check n's parity and the two finite conditions in the question.
- For n=2 the relation holds exactly for s=x+2. Every x∈ℕ has that witness, so each individual search reaches a finite positive stage and the program is total.
- For n=3 the additional premise is x>0. Positive x still has its unique witness at x+3. At x=0 no s satisfies both conditions, so the program loops on that input.
- The generated code for n=3 is valid and it terminates on every positive input. One missing input is sufficient to fail totality. In the n=2 case there need be no single common witness bound for all x.
The program for n=2 is total. For n=3 it fails to halt on x=0.
Observe a finite and infinite domain in one family
Consider R(n,x,s) holding exactly if s=0 and x<n, for n=3. Compute the domain of the program that needs witnesses for every x≤input. Repeat for R holding exactly when s=0 with no restriction on x.
- The program on input y checks each of the finitely many requirements x≤y for an available witness. For n=3 the relation permits s=0 for x=0,1,2, and no witness for x≥3.
- For y=0,1,2 every required x succeeds already at stage zero, so the computation halts. If y≥3, x=3 is one of the requirements and it fails at every finite stage.
- The first version therefore has finite domain {0,1,2}. In the second version each x has the same witness s=0. Every finite prefix is verified, so the produced domain is all natural numbers.
- These cases show how infinitely many true requirements give unbounded domain size through finite prefixes, while one least false requirement blocks all sufficiently large inputs. Each prefix check remains total even when the overall search diverges.
For n=3 the domain is {0,1,2}. In the unrestricted s=0 case it is all of ℕ.
Read a bounded simulation predicate
For a machine that halts after exactly six steps on one fixed input, define F(k)=1 if it halts within k transitions. Calculate F(0),F(5),F(6),F(7) and use an equality comparator to show the relevant unbounded property.
- The threshold is the exact sixth simulated transition, so the state starts nonterminal and remains nonterminal after five transitions. The bounded check returns zero at both 0 and 5.
- At the sixth transition a terminal state is seen. The definition includes that final step, so F(6)=1. The already observed halt remains within the seventh step budget as well, so F(7)=1.
- The code of a total program for F is obtained by simulating at most its supplied k steps and returning the finite comparison result. The comparison function Z(k)=0 is total by construction.
- At k=6 the two evaluated functions disagree. For an unknown machine, equality F=Z on all k holds exactly if it never halts; any finite positive terminal witness would create an inequality. This explains the universal quantifier hidden in a proposed equality decision.
F(0)=F(5)=0 and F(6)=F(7)=1, so F differs from the zero function.
Evaluate the difference between false and unproved
For a machine that loops by a single state cycle on blank input, a fixed step checker reports no halt for s=10. Explain what that check proves, what a cycle invariant proves, and how the two facts appear in the arithmetic existential statement.
- Let T(e,x,s) test the given computation through s simulated transitions. The result at s=10 is a verification of ¬T(e,x,10), with the exact machine code and fixed blank input held fixed.
- To obtain more, verify an invariant set of complete configurations that contains the initial configuration, contains no terminal state, and is closed under the deterministic transitions. A repeated complete configuration with no terminal state along its cycle is one sufficient certificate. A state cycle need not repeat the head position or tape, so repeating only a state name without checking its transitions on reachable scanned symbols would be insufficient.
- Induction from the initial configuration using transition closure now shows that every finite-time configuration remains in the nonterminal invariant set, so no finite time bound finds a halt. Therefore ℕ satisfies ∀s ¬T(e,x,s), and the claimed existential halting sentence is false there.
- The bound-ten certificate also gives its corresponding false numeral instance in the chosen representable arithmetic. Whether a particular theory proves the universal sentence depends on a formal proof of the cycle behavior. One bounded prefix alone cannot provide that proof.
The bound-ten check proves only a finite prefix; a verified recurrent full configuration proves the existential halting sentence false in ℕ.
Try it yourself
Suppose S contains x exactly when a decidable relation R(x,t) holds for at least one t. Give a recognizer, make its failure to halt precise, and state when the same pattern also yields a decision.
Show the answer and reasoning
Search all witnesses with the total checker. Decide both signs only when there is also a suitable terminating negative route.
On input x, test R(x,t) for t=0,1,… in order. Each test halts by hypothesis. Accept x as soon as a test returns yes, keeping the actual witness t if the output format calls for it. If x∈S, some finite t witnesses membership. There are finitely many earlier tests of finite duration, so the recognizer finishes by reaching such a witness. It has no accepting branch for a nonmember. If x∉S, every test returns no and the iteration continues indefinitely. Returning no at any arbitrary finite stage would have ruled out only finitely many witnesses and may reject an input with a later witness. If the complement also has a recognizable finite-witness test, run both searches fairly and decide at the first witnessed sign. An independently proved computable bound on where positive witnesses must occur would also allow a terminating search for this problem.
A deterministic machine scans right on symbol 1 and halts on blank. A candidate verification includes an immediate accepting transition from a nonblank symbol. Describe how its certificate is rejected and what that alone tells you about the machine.
Show the answer and reasoning
Reject the proposed trace at the nonblank transition. This does not determine the actual run's eventual acceptance.
At each row a checker verifies state, scanned symbol, tape update, head move and next state using the declared deterministic table. It first checks that the purported initial configuration is the actual one. At the offending transition the purported run is still scanning symbol 1. The table specifies a scan step moving right and remaining in the scan state, so the following immediate accepting state is inconsistent with the table. The candidate certificate is therefore invalid and must receive a no from the checker. The rejection says that this list of configurations is not the true accepting computation. The machine may still accept later when it scans blank. In this particular scanning model a finite block of ones is eventually passed. An invalid trace alone would give neither a terminating positive result nor a valid proof of nonacceptance.
Use 1^|u|0uv to encode (01,110). Decode 1011 and show why omitting the length or another boundary marker makes concatenation alone ambiguous.
Show the answer and reasoning
Encode (01,110) as 11001110. Decode 1011 as (1,1).
For first field u=01, the length is two. Write 11 for this length and then the zero delimiter, giving 110. Append 01 and 110 to get 11001110. For the coded string 1011, the initial run of ones has length one and its next character is zero. Remove prefix 10. From the remaining string 11 take one bit for u=1 and leave the last bit for v=1. The delimiter is consulted only during the length prefix. A zero occurring later can be kept as data. The two decoded fields determine exactly the original string when re-encoded. Without an agreed boundary, the concatenation 011 can represent (0,11), (01,1), or (empty,011), among others. An unambiguous prefix length selects one of those splits.
At global stage s simulate one new transition of each machine/input index 0 through s, ignoring halted entries. If live entry i halts after k≥1 of its own transitions, determine the global stage at which it is observed.
Show the answer and reasoning
For k≥1 the halt is first observed at global stage i+k−1.
Entry i is absent from all stages s<i. At s=i the stage includes each entry from 0 through i, so i receives its first simulated transition. While i is live, it is included in every subsequent stage. Thus after its update at stage i+j it has received j+1 simulated transitions for every j up through the one that terminates. Set j=k−1. Earlier stages have performed at most k−1 transitions, which are nonterminal by the premise, and this stage performs its kth transition and sees the halt. After that stage the schedule ignores the finished entry. If an initial state were already terminal before any transition, it would be detected on introduction at stage i, which is the separate zero-step convention.
An alleged recognizer for nonhalting says yes as soon as a simulation reaches any time budget without halting. Give a fixed counterexample machine for an arbitrary finite budget and distinguish bounded nonhalting.
Show the answer and reasoning
A machine that first halts after k+1 steps disproves an inference from a no-halt test at any given k.
Fix the finite budget k used in the claimed rule. Construct a suitable deterministic program with k+1 successive control transitions on blank input, with the final target a terminal state. At initialization and after each of the first k transitions the machine remains nonterminal. The bounded simulator's output that no halt has yet appeared is correct for precisely that prefix. The proposed nonhalting recognizer would accept it at the selected budget. The actual program reaches a terminal state one transition later, so the input belongs to the halting set and should never be accepted by such a recognizer. The bounded question itself is decidable. General nonhalting means absence of a halt for every finite bound. The counterexample prevents extending a single negative bounded observation to that universal statement.
Assume a total program predicts whether M accepts x. Specify the diverging and accepting branches of the contradiction program, handle invalid encodings and apply it to its own valid code.
Show the answer and reasoning
Use a machine that loops on a positive self-acceptance prediction and accepts on a negative one. Both predictions contradict its own behavior.
Let D decide whether a valid program p accepts input x. Define a new ordinary program Q that first checks whether its runtime input u is a valid program code. Invalid inputs may be rejected without a query. For valid u form the pair ⟨u,u⟩ and compute D on it. On yes enter a permanent loop, and on no perform an accepting halt. This algorithm can be encoded because both parsing and D are effective and D is total. Put u=q, the valid code of Q. If D says yes, Q is supposed to accept q yet its actual branch loops forever. The accepting outcome then never occurs. If D says no, Q's actual branch accepts, giving a positive instance that D just denied. This exhausts the total decider's possible answers and proves the original assumption false.
Let f be total computable and B co-c.e. Build a recognizer for the complement of f⁻¹(B). Explain exactly where totality is used.
Show the answer and reasoning
Compute f(x), then recognize the complement of B; the resulting accepted inputs are exactly the complement of the preimage.
Since B is co-c.e., let R recognize B's complement over the declared target universe. Given x in the source universe, first run the ordinary computation of f(x). Totality ensures it stops with a valid target value. Run R on that result and accept x if R accepts. If f(x) is outside B, its complement has a finite accepting run, so the composed machine accepts. If f(x) lies in B, R never accepts. By definition x then lies in the preimage and is correctly excluded from its complementary recognizer. This proves the preimage is co-c.e. A partial f could fail to produce a target value for some source inputs. Totality makes f a map on the entire declared universe and ensures no actual complementary member is lost by failing to start its second computation.
Let E be the problem of whether a program recognizes an empty language. Suppose H≤ₘN for nonemptiness N. Derive the correct reduction from the complement of H to E and explain which recognition conclusion follows.
Show the answer and reasoning
The same construction, with valid outputs, reduces the complement of H to E and proves E is not c.e.
Let g be a total computable reduction from H to valid nonempty-language codes N. For an output code that is malformed, replace it by a fixed valid code for the empty language. This does not create a member of N and is a decidable syntactic case. The resulting total f always produces a valid index and satisfies x∈H iff f(x)∈N. On valid indices the recognized language is either nonempty or empty, exactly one of N or E. Taking the complementary equivalence gives x∉H iff f(x)∈E. Therefore the reduction is from the complement of H to E. Nothing in it requires an oracle answer or a new membership test. If E were c.e., computing f and invoking its recognizer would recognize the complement of H, which the preceding theorem excludes. The direction used pulls target recognition back to the source.
Give a Turing reduction from the complement of H to H using one query, then prove that no many-one reduction in that direction exists under the stated language universe.
Show the answer and reasoning
One halting-oracle reply can be negated. A many-one reduction would imply a recognizer for the nonhalting set.
Given x, ask an oracle for H whether x belongs to H. Return yes if it replies no, and no if it replies yes. This algorithm is total in the designated oracle model. It decides the complement of H there, including the chosen convention for malformed input codes. This reduction uses a Boolean operation after querying. The answer it returns need not equal the answer of membership in H for the queried x. Suppose an ordinary total f satisfied x∉H iff f(x)∈H. Compute f and then run H's ordinary recognizer. It would accept exactly the nonhalting inputs over the original universe. This contradicts nonrecognizability of the complement. Thus one query with an inverted answer can implement this Turing reduction even though no total ordinary many-one map can implement the stated membership equivalence.
Apply the Rice construction to the property that the recognized language omits the fixed word 1. Choose a specific nonempty language outside the property and state the reduction to the property or its complement.
Show the answer and reasoning
Use {1} as the opposite language. The construction reduces H to the complement of the property that omits 1.
The empty language omits 1, while the singleton language {1} does not. Fix a recognizer for {1} that checks the exact word and rejects the others. For source pair (M,x), the generated program first runs that fixed simulation before any possible acceptance. If it halts, use the singleton recognizer on its runtime input. Otherwise the generated program recognizes the empty language. Thus if the source is a member of H the output language does not omit 1. If the source is outside H, the output language omits 1. Invalid source data can use a fixed empty-language output. Code generation is total computable, so H reduces to the complement of the index property. A decider for the property would be a decider for its complement by exchanging replies, contradicting halting undecidability.
Given M,x construct a new machine with an identifiable target state reached on blank exactly if M halts on x. Explain why membership of that state in its finite table remains decidable.
Show the answer and reasoning
Enter a fresh state only after the stored simulation terminates. Presence in the description has a finite syntactic test.
Choose a target name q* absent from the finite interpreter description and its simulation states. Generate a wrapper with the machine description and x hard-coded, and include the target state explicitly in the wrapper. On the fixed blank input the wrapper simulates M on x. If it sees an accepting or rejecting halt it changes to q*, otherwise it continues simulating. Other transitions use states distinct from q*. Therefore q* appears in the actual finite-state control run exactly when the simulation terminates. A total decider for visiting q* would decide the given source halting question after effective compilation. To decide if q* is present in the table, parse its state list and compare names. The corresponding answer for every generated wrapper is yes, even when its execution never reaches that state.
In the desynchronization reduction, show that the first start marker cannot be followed by another start marker before any end marker in an equal pair of concatenations. Use the parity of the segment lengths and nonempty-word start mismatch.
Show the answer and reasoning
Without a preceding end tile, another start has incompatible even and odd segment lengths after the first #.
Ordinary generated tiles have first top symbol * and first bottom symbol from the original alphabet, which excludes *. The end tile begins with * on top and $ on bottom. Nonempty word sides ensure neither ordinary first symbol is missing. An equal concatenation therefore begins with the start tile, which contributes # on both sides. After it and any ordinary tiles, the top segment is ℓ(U) of even length and the bottom is *r(V) of odd length. If a second start occurred before any end, it would supply the next # in both strings. That marker would have to occur at the same position in both equal strings. The even and odd segment lengths make that impossible. If there is no further marker at all, the same lengths prevent total equality. A next $ from an end tile contributes the extra * on the top needed before the sentinel, allowing the marked segments to align when the original words agree.
Given a recognizer R for S, construct a one-input program with n stored in its table that ignores its runtime input and halts exactly if R accepts n. Prove n∈S iff the new program index is in K.
Show the answer and reasoning
Compile a program that terminates on every runtime input when R accepts n, and on none otherwise.
Put the fixed code of R and the finite encoding of n in a wrapper. On any runtime input y, ignore y and simulate R on that stored n. This requires only effective generation of code and a fixed interpreter. If R accepts n, return a fixed output, for example zero. If R rejects, route the wrapper to a permanent loop. If R itself diverges, the wrapper remains in the simulation. The generated program has code c(n) and terminates precisely if n∈S, regardless of the runtime input. In particular on its own valid code c(n) it terminates exactly in that case. Thus n∈S iff c(n)∈K, where K queries the program at its own index. Generation of c(n) finishes without evaluating R(n), so it implements a total many-one reduction.
Let F(n) be the largest running time of any blank-input program of length at most n that halts, or zero if none halt. Show F is nondecreasing and does not admit a total computable pointwise upper bound.
Show the answer and reasoning
F is nondecreasing and no total computable function can bound it pointwise.
For every length bound n there are finitely many well-formed descriptions of length at most n. The actual terminal step counts for the members of that set that halt form a finite set, with empty maximum defined as zero. Every allowable program at n is still allowable at n+1. Therefore F(n+1)≥F(n), including the case in which no fixed-input program has yet halted in the length class. If a total computable upper bound U existed, any given valid program could be simulated on blank up to U(length) transitions. A halt occurring later would exceed U and hence contradict its defining bound, so no-halt by the bound would settle nonhalting. This would decide blank-input halting, which is undecidable by compiling an arbitrary source pair into one fixed-input wrapper. The contradiction rules out any total computable pointwise upper bound, and in particular rules out computing F itself.
Given R(n,x,t) decidable, define a program that halts on y if it finds witnesses for all x≤y. Prove how the least missing witness determines its exact domain and derive the infinite-domain equivalence.
Show the answer and reasoning
If the least missing witness is j, the domain is {0,…,j−1}; if none are missing, the domain is all of ℕ.
On y, success requires a witness for each of the finitely many x≤y. At stage b, check all candidates t≤b for each such x and terminate once each x has a found witness. For a fixed y, if every required x has a witness select the largest of finitely many witness values. A stage at least that large eventually verifies the needed conditions. If one x lacks a witness the search never accepts. Let j be the least x with no witness if there is one. Every y<j has all required witnesses, while every y≥j includes the failed requirement. When j=0 the domain is therefore empty. If there is no such j every y terminates, so the resulting domain is infinite. The program code is computable in n and realizes the infinite-domain membership exactly when the given universally quantified witness condition holds.
Let A₀={e:φ_e(e)↓=0} and A₁={e:φ_e(e)↓=1}. Suppose D includes A₀ and is disjoint from A₁. Choose the output rule from D, use the self-code and explain both contradictions.
Show the answer and reasoning
Return 1 inside D and 0 outside. The generated program cannot be assigned either side at its own index.
Assume D is decidable with A₀⊆D and A₁∩D=∅. Generate a total program that queries the purported decision on its runtime input and returns 1 if it says yes and 0 if it says no. Choose its valid index q. If q∈D then the program returns 1 on input q, so q∈A₁. That contradicts A₁∩D=∅. If q∉D then the same program returns 0 on q, so q∈A₀. That contradicts A₀⊆D. Both contradictions use the actual output convention of the same program numbering. No total decider for such a separator exists. The disjointness of A₀ and A₁ follows independently from determinacy of output, and does not require any decision procedure for their union.
If P(n,y₁,…,y_k)=0 represents a c.e. predicate over y_i∈ℕ with zero included, rewrite it for positive unknowns. Prove the solution-set bijection and explain why a finite search box can miss a solution.
Show the answer and reasoning
Use the polynomial Q(n,z)=P(n,z₁−1,…,z_k−1) with all z_i≥1.
Each allowed y_i is natural with zero included. Set z_i=y_i+1. This gives a positive integer z_i and has inverse y_i=z_i−1. Apply the substitution separately for each variable. The resulting expression is again a polynomial with integer coefficients, because substituting an integral linear form into any monomial preserves that coefficient ring. It can be expanded effectively on finite polynomial data. If y solves P(n,y)=0, the tuple z=y+1 solves Q(n,z)=0. If z is positive and solves Q(n,z)=0, the inverse y exists in ℕ and solves P. The maps are inverse on the whole allowed domains. Restricting each coordinate to a finite box may miss a valid tuple beyond the box. For example a constraint z₁−(B+1)=0 has no witness in a box ending at B but has a positive witness. This finite test differs from the unbounded existential problem.
For a deterministic system with N possible complete configurations and a set of target configurations, prove a finite decision bound for visiting a target before any repeat. Explain which premise fails for a general unbounded Turing tape.
Show the answer and reasoning
With N complete configurations, at most N transitions are needed to find a target or repeat a configuration.
Check the initial configuration for target membership. If the system can terminate without an outgoing transition, a terminal nontarget also gives a final no. Otherwise proceed by the single deterministic next-configuration map. The first N+1 configurations, including time zero, cannot all be distinct. A repeat occurs by time N if the process reaches that point. Store previous complete configurations, or use the supplied upper bound directly. If a repeated configuration appeared at earlier i and later j, determinism makes all future configurations repeat the same earlier segment cyclically. If no checked configuration was a target, no future member of that cycle can be one. An unrestricted Turing machine has an unbounded tape, head position and written contents, so finitely many control states do not bound the number of complete configurations. A repeated control state alone does not establish a repeated future.
What to carry forward
- Finite machine descriptions can be enumerated and interpreted one transition at a time.
- A total decision gives both signs. A recognizer guarantees an accepting halt only for members.
- A diagonal machine contradicts either reply of a proposed universal halting decider.
- A many-one map transfers the exact target membership back to the source.
- Rice's theorem concerns nontrivial properties of the entire recognized language or partial function.
- Halting on every input uses a universal input followed by a potentially different time witness.
- A fixed oracle can answer its membership question and still cannot decide its own relative halting jump.
- Finite state bounds and propositional truth tables give actual terminating procedures, regardless of their cost.
References
Sources for the concepts and teaching approaches in this article.
- Parameter fixing, self-application and diagonal limitsOpen Logic Project authorsPrimary · PDF
- Rice's original language-class resultHenry Gordon RicePrimary
- Post's original correspondence problemEmil L. PostPrimary · PDF
- Modified correspondence with nonempty piecesJuhani KarhumäkiPrimary · PDF
- The quantifier levels of totality and finitenessDavid W. KuekerPrimary · PDF
- Radó's maximal stopping timeTibor RadóPrimary · PDF
- Reachability in a finite directed graphJeff EricksonPrimary · PDF
- Finite logical derivations and truth preservationOpen Logic ProjectPrimary · PDF
- Truth-table tests in propositional logicP. D. Magnus, Tim Button and collaborators, with Richard ZachPrimary · PDF
- First-order completeness for a finite theory's consequenceLeon HenkinPrimary · PDF