Bounded halting predicate Created 2026-10-06 Updated 2026-10-07
For a fixed effective machine coding, the predicate that program on input halts within steps is primitive recursive. Code finite configurations, iterate a total single-step function by primitive recursion, and test for the halt state. This supplies a bounded simulation even though the unrestricted halting problem is undecidable.
Let be a computable increasing finite-stage enumeration of the halting problem set . Color by whether the approximations below differ at stages . This is a recursive two-color partition of triples. An infinite homogeneous set cannot have color one: for fixed , the finite approximation below eventually stabilizes. If its color is zero, choose from that set above an input , then another member ; agreement with arbitrarily large later stages gives . Thus every infinite homogeneous set computes , and none is a recursive set. This makes the failure of an effective version of Ramsey's theorem explicit.
Rice's theorem, in its formal language version, says: every nontrivial property of the computably enumerable language accepted by a Turing machine has an undecidable set of machine descriptions. Here nontrivial means that some computably enumerable language has the property and some does not. The property must be an extensional property of programs: any two Turing machines accepting the same formal language must agree about it. It need not be a property of all formal languages, including those no Turing machine accepts.
Let be such a property and writeWe prove the theorem by a many-one reduction from the halting problem. First suppose the empty language is not in . Nontriviality provides a fixed Turing machine with . Given a Turing machine and a word over an alphabet , effectively construct a Turing machine which, on input , first simulates on . If that simulation ever halts, it simulates on and accepts precisely when accepts. If the first simulation never halts, it never accepts .
The Turing machine encoding of is computable from those of : the description merely embeds and the fixed simulator for . Constructing it does not require predicting whether halts. Its accepted formal language isConsequentlyA decider for would therefore decide the halting problem, a contradiction. Invalid descriptions can be mapped to a fixed description of a machine accepting the empty language, if the many-one reduction is formulated on all strings.
If the empty language does belong to , apply the preceding argument to the opposite property, within the computably enumerable languages. This opposite property is still nontrivial and excludes the empty language. A hypothetical decider for would decide the opposite property's index set by first rejecting malformed Turing machine encodings and otherwise reversing its answer. The opposite property is undecidable by the first case, giving the required contradiction in this case too.
The halting problem is an unconditional example:Reduce SAT to it as follows. Given a Boolean formula , construct a Turing machine that ignores its input, enumerates all Boolean valuations of , and halts if it finds a satisfying one. If none satisfies , it enters an infinite loop after the enumeration. ThenThe construction of the machine description takes polynomial time; the potentially exponential running time of the constructed machine is irrelevant to the time needed to compute the polynomial-time reduction. Since SAT is NP-complete, this proves NP-hardness of the halting problem.
Every problem in NP is decidable, by enumerating the finitely many polynomial-length certificates and running the verifier. The halting problem is undecidable, so it is outside NP and therefore cannot be NP-complete.
is a co-recursively enumerable language, is not a recursively enumerable language, and is not a decidable language. The stipulated order on halting times includes .
First, failure has a finite witness. For valid machine descriptions,Indeed, a strict inequality forces the first halting time to be finite. The second can be either a larger finite time or infinity. Whether the displayed condition holds for fixed is decidable by a finite simulation, including the initial configurations when .
Enumerate all pairs and perform these finite tests by dovetailing, accepting the complement of a set of on finding a witness. Equivalently, at stage , inspect all inputs of length at most through transitions. A genuine violation eventually appears; if there is no violation, the procedure never accepts. Malformed descriptions or differing input alphabets can be recognized and accepted as nonmembers immediately. Thus the complement is a recursively enumerable language, proving that is a co-recursively enumerable language.
For non-enumerability, use the standard result that the complement of a set of the halting problemis not a recursively enumerable language. Given , effectively construct two Turing machines over the same fixed input alphabet. On every input , let ignore and simulate on the fixed word , halting precisely when that simulation halts. Let loop forever on every input.
If does not halt on , both halting times are infinity for every , so the pair belongs to . If halts on , the first halting time is finite while the second is infinity, so the pair does not belong to . ThereforeThis is a many-one reduction from non-halting to the pointwise running-time domination problem. Were a recursively enumerable language, constructing the pair and running its recognizer would recognize non-halting, contradicting the stated result. Hence is not a recursively enumerable language. Since every decidable language is a recursively enumerable language, is also undecidable.
The problem is undecidable. Reduce the halting problem to it. Given a Turing machine and input word , construct a Turing machine over with the following behavior on input :
- If , reject.
- If , simulate on the fixed word . If that simulation ever halts, whether accepting or rejecting, accept ; otherwise continue the simulation forever.
This is an effective construction: are fixed data stored in the description of . Its recognized formal language isTherefore accepts exactly one input word if and only if halts on . A supposed decision procedure for the singleton-language problem for Turing machines, applied to the constructed , would decide the halting problem. The standard undecidability of the halting problem excludes that possibility.
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 27 1 Solution Created 2026-10-03 Updated 2026-10-14
Let be the finite approximation to the halting problem obtained by running the first programs for steps, so and is not computable. For , define the recursive triple colouring with no computable infinite homogeneous set byThis is a total computable function. Here homogeneous sets are required to be infinite: finite homogeneous sets certainly exist. An infinite homogeneous cannot have colour one. Fix ; the finite approximation below eventually stabilizes, so two sufficiently large in give colour zero. If has colour zero, choose in with . For arbitrarily large , homogeneity gives , and hence . Thus computes membership of in . A computable infinite would make the halting problem computable, a contradiction.
For the uncountable partition relation, the Erdős-Rado theorem for finite arities states that for every infinite cardinal and integer ,The case is the pigeonhole principle: a union of sets of size at most cannot have size . Suppose the assertion holds for . Put and , and let . We give the closed elementary-submodel construction of an end-homogeneous sequence, which avoids intersecting a decreasing family of reservoirs at a limit stage.
Take a sufficiently large regular and an elementary substructure with , containing and all ordinals below , and closed under sequences of length at most . Such an is obtained by successive Skolem hull closures: , and the regularity of puts any at-most--long sequence from the union inside one stage. Put . The set has no greatest element, since taking an ordinal successor is definable in , so .
Recursively choose an increasing sequence in . At stage , its earlier set has size at most , and the colour table on has size at most . Both and this table belong to by its closure. The setbelongs to and is nonempty because it contains . Elementarity supplies . Consequently the colour of each -tuple from the resulting sequence depends only on its first entries. The induction hypothesis applied to these entries gives a homogeneous subsequence of size , proving the result.
Infinite exponents behave differently with the axiom of choice. On the countably infinite subsets of any infinite cardinal , choose a representative of each equivalence class modulo finite symmetric difference. Colour a set by the parity of . Removing one point flips its colour. Every infinite proposed homogeneous set contains an increasing sequence of order type , and that sequence and its tail have opposite colours. Thus the finite-symmetric-difference colouring of infinite subsets gives , whether the domain consists of all countably infinite subsets or only those of order type . There is no unrestricted infinite-arity counterpart to the displayed finite-arity theorem in ZFC.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 2 2 iii Solution Created 2026-10-03 Updated 2026-10-14
The halting problem asks whether program halts on input , given effective codes for both. Suppose a total decision algorithm returned one exactly when that computation halts. Construct a program which, on input , computes and then loops forever if the answer is one, but halts if it is zero. Let be the code of . If , the specification of makes it diverge, while if the same specification makes it halt. Both alternatives contradict correctness. Therefore the halting problem is . This is a diagonal argument, not merely the observation that individual simulations can run forever.
Let . Simulating the specified program semidecides membership, or dovetailing all simulations enumerates , so is a recursively enumerable set. The same diagonal program rules out a total decision algorithm for . Thus . Encoding a pair also gives an enumerable nonrecursive set of all halting program-input pairs.
Past exam of the mathematics course of the University of Cambridge 2008 iii Paper 27 3 Solution Created 2026-10-03 Updated 2026-10-14
A partial computable function may return a natural-number output or diverge. One concrete definition uses finite deterministic Turing machines; code the finite transition table by an integer . Every single transition and every bounded simulation is computable, and the universal simulation gives a universal partial computable functionThe symbol means equal outputs when defined and simultaneous divergence otherwise. A total computable function is a partial computable function defined on every input. Different program codes may compute the same partial function; this distinction between syntax and computed behavior is crucial.
The equivalent recursive description starts with zero, successor and projections and closes under composition and primitive recursion, giving the primitive recursive functions. Add unbounded minimization: search for the first at which a predicate returns zero, requiring every preceding tested computation to have converged. This gives the partial recursive functions. To see the connection with machines, encode finite configurations and histories. Checking a proposed halting history is a primitive recursive predicate , and a primitive recursive function extracts its output. Thus a machine computation has the normal form . Conversely a machine can implement composition, primitive recursion and this successive search. This proves equivalence of the formal definitions. The Church–Turing thesis identifying them with informal effective calculability is a thesis, not an additional formal theorem used in the proof.
A computably enumerable set is one enumerated by a program, equivalently the domain of a partial computable function. For the forward implication wait until the given input is enumerated; for the reverse implication run all input computations by dovetailing, outputting those that halt. A set is decidable if its characteristic function is total computable. It is decidable exactly when both it and its complement are computably enumerable: dovetail their enumerators and stop when one lists the input.
The S-m-n theorem supplies effective specialization of parameters. Given a code for a program on , compile the constant into a wrapper that writes it and then calls that program. The wrapper's transition table is computably produced from the original table and , yielding a total computable function with . This elementary code-construction proof is all the specialization machinery needed below.
The diagonal halting problem is computably enumerable by universal simulation but not decidable. If a total decider existed, the program that halts on precisely when would have an index . Evaluating it at gives exactly when , a contradiction.
For Rice theorem, let be a nontrivial collection of partial computable functions, and let its index set be . Membership must depend only on the computed function, not on its code. Let be the nowhere-defined function. First suppose , and choose a computable partial function with a fixed program. Uniformly from , produce the following program on input : first simulate ; if it halts, then simulate and return that output. Its index is total computable by specialization, andTherefore iff , so a decider for would decide . If instead , apply the same argument to the nontrivial complement collection, whose index set would also be decidable if were. We concludeFor computably enumerable languages, use the same waiting program before beginning a fixed enumeration, taking the empty language as the bottom object. Properties such as having finite domain, computing a total function or recognizing a particular nontrivial language are therefore undecidable. Purely syntactic properties such as the parity of the code are excluded: they are not extensional. Rice's conclusion is undecidability, not that every such index set must fail to be computably enumerable.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 25 1 Solution Created 2026-10-03 Updated 2026-10-14
The arrow in the original PDF permits partial functions. A partial computable function is computed by a finite program which halts with the specified value on every input in its domain and diverges on inputs outside the domain. A total computable function is the special case with full domain. Coding finite tuples by a primitive recursive pairing function identifies the different finite arities effectively, without identifying total and partial computability.
One precise machine model is a Turing machine. Its finite transition rules and configurations admit effective numerical coding. Bounded simulation is primitive recursive, and unbounded execution gives the partial result. Equivalently, start from zero, successor and projections and close under composition, primitive recursion and unbounded minimization. The Kleene normal form theorem makes the equivalence concrete:where is a primitive recursive predicate checking a coded halting computation and reads its output. If no computation exists, the minimum and hence the value are undefined. Checking a finite history is effective because every consecutive configuration must obey one of the finitely many transition rules.
The universal partial computable function evaluates the program indexed by on an input. The S-m-n theorem says that fixing finitely many input parameters can be done by a total computable operation on program Gödel numbers: a new program stores those parameters and calls the original universal evaluator. These facts explain both universal simulation and uniform reductions. A set is computably enumerable when it is the domain of a partial computable function, equivalently the range of an effective enumeration. It is recursive when its characteristic function is total computable. A set is recursive precisely when it and its complement are computably enumerable: dovetail the two enumerations to decide each input.
The diagonal halting problem is computably enumerable but not recursive. A total decider would yield a program which, on , diverges if the decider says and halts otherwise. Applying this program to its own index gives a contradiction. There is likewise no total computable universal listing of all total computable functions: the diagonal function would be total and absent from the listing.
Here is a full proof of the Rice theorem. Let be a nonempty proper class of partial computable functions whose property depends only on the function, not its program. First suppose the everywhere-undefined function is not in , and choose a program for a function . Given an index , construct uniformly a program which on first waits for to halt and, only then, simulates . The S-m-n theorem gives a total computable index map . If , then ; if , then . ThusA decision procedure for the property would decide , impossible. If , apply the same argument to its nontrivial complement. Every nontrivial extensional property of partial computable functions has an undecidable index set. Totality, having finite domain, and taking a particular value somewhere are examples. A syntactic property such as program length is not covered; nor does the theorem say that no individual program's behaviour can be established.
Self-reference can also be made effective. For a total computable index transformation , let be an index for the program which first computes and then runs the program with that resulting index on its own input. The S-m-n theorem makes total computable. Choose an index for the total function , and put . ThenThis proves the recursion theorem: every effective transformation of programs has a fixed point at the level of the function computed, though not necessarily at the level of its numerical code.
Finally, consider the Jockusch triple coloring computing the halting set. Fix computable finite approximations with union . For , defineThis is a total recursive two-coloring because both stages are finite computations. Suppose is infinite and homogeneous. Its color cannot be one: fix , wait until every enumeration below has stabilized, and choose later from beyond that stage. Their color is zero.
If has color zero, it computes . On input , use to find and in . For arbitrarily large with , homogeneity gives . Taking stages sufficiently large to reach the final finite approximation gives . Consequently membership of in is decided by the finite stage . A recursive would therefore make recursive, a contradiction. There is a recursive partition of triples with no infinite recursive homogeneous set. This is the nontrivial finite-color meaning of the partition of an infinite domain; if “infinite partition” meant infinitely many colors, the coloring by the least member would already give a trivial example. Ramsey's theorem still guarantees infinite homogeneous sets for the displayed two-coloring, but every such set is computationally nontrivial.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 20 1 Solution Created 2026-10-03 Updated 2026-10-14
The printed arrow is a partial-function arrow. Thus the central objects are partial computable functions , with total computable functions as the special case in which every input has an output. Here includes zero; changing this convention by a computable shift changes none of the results. A program computing must halt with output exactly on its domain, and run forever elsewhere. A finite program is a function in intension, whereas its possibly partial input-output map is a function in extension; many programs have the same extension.
A precise machine model is a register machine with finitely many instructions to increment a register, decrement it conditionally, jump, and halt. Registers hold natural numbers. A Turing machine instead uses a finite transition table, a finite alphabet and an unbounded tape. These models simulate one another: encode the finite nonblank tape, state and head position as numbers for the register simulation; conversely represent each register by a finite tape block and implement its increment and decrement by finite scans. Tuple inputs can be encoded by a primitive recursive pairing function. The equivalence of these formal models is a mathematical result. Their identification with every informal effective procedure is the Church–Turing thesis, rather than an additional mathematical theorem about an already formal notion.
There is also an algebraic description. Begin with zero, successor and projections, close under composition of partial functions and primitive recursion, and then under unbounded minimization. The primitive recursion scheme isApplied within the primitive recursive class it produces only total functions, by mathematical induction on . Unbounded minimization searches for the first zero of ; its output is defined only if that search reaches such a zero with every preceding necessary computation defined. Composition is likewise strict about the intermediate values it requires. These schemes compile into machine programs using finite subroutines, loops and an unbounded search loop.
For the converse, encode a machine's finite configurations and finite computation histories using Gödel numbering. Testing that a history starts with the specified input, that every adjacent pair follows the transition table, and that its final configuration halts is primitive recursive: all the tests are bounded by the finite code. Extracting the final output is primitive recursive too. For a suitable checking predicate and output decoder this proves the Kleene normal form theorem:The symbol means equality of values and of definedness. A halting computation has a passing history code and every passing history has its actual output; a nonhalting computation has none. This proves that the partial recursive and machine-computable functions coincide, including their domains of divergence.
Finite programs can be effectively listed. Simulating the program with index gives a universal partial computable function . Fixing some inputs is effective syntactically: prepend instructions writing those constants and then call the original program. This proves the S-m-n theorem in this machine presentation. In particular, reductions that construct a program from numerical parameters really do produce its index effectively.
The primitive recursive functions are a proper subclass of the total computable functions. Enumerate all valid unary primitive recursive descriptions, interpreting invalid descriptions as zero. Evaluating any fixed valid description terminates by structural induction. Thus the diagonal map is total and computable, but cannot be one of the enumerated primitive recursive maps, since . This is a total computable diagonal over primitive recursive syntax. The evaluator can terminate on every particular description without itself being primitive recursive.
In contrast, one cannot effectively enumerate exactly the programs for all total computable functions. If such an infinite enumeration were available, wait for its th program and run it on , then add one. Totality makes this another total computable function, while its diagonal disagrees with every listed function. Equivalently, there is no total computable universal evaluator listing precisely all total computable maps.
The halting problem is undecidable. If decided whether program halts on , construct a program which halts on input exactly when says that it does not halt. Taking to be 's own index gives a contradiction. The halting relation is nevertheless computably enumerable, since finite halting histories can be searched for.
More generally, a set is computably enumerable exactly when it is the domain of a partial computable function. From an enumeration, halt on when appears; in the other direction use dovetailing over all inputs of a partial program to enumerate its halting inputs. A set is a computable set exactly when both it and its complement are computably enumerable: dovetail the two searches and return the answer from the one that succeeds. Neither a semidecision procedure nor an unbounded search supplies a uniform negative answer.
Finally, the Rice theorem explains the scope of this obstruction. Let be a nontrivial property of the extension of a partial computable program. Choose a partial computable whose -status differs from that of the nowhere-defined function. Given a program and input , effectively form the program which, on , first waits for to halt and then computes . If never halts its extension is nowhere defined; otherwise its extension is . A decision procedure for would therefore decide the halting problem. Effective descriptions allow universal simulation and positive verification, but not a decision procedure for every semantic property or for termination.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 20 2 i Solution Created 2026-10-03 Updated 2026-10-07
If halts on every input, simulate on input while counting its steps, and output that count when it halts. The resulting function is a total computable function. Consequently yes: one may take the exact running time,This construction does not promise a simple closed expression or a bound of any particular complexity class; it uses the promised totality of this particular machine.
For a machine computing a partial computable function, its exact halting-time function is still a partial computable function, with the same domain. A finite bound cannot cover a genuinely infinite computation. Even restricting attention to inputs on which halts, a total computable function bounding all halting times need not exist. In fact the precise characterization is the computable bound on halting time criterion:For the forward implication, compute and simulate for that many steps. If it has not halted, the proposed bound ensures that it never will. This decides the domain. Conversely, first decide whether is in the domain; return zero outside it and the simulated halting time inside it. This defines a total computable function satisfying the bound. The time needed to compute the bound itself is irrelevant to this argument.
A universal halting recognizer has undecidable domain by the halting problem, so it has no such total bound. On the other hand, a machine that immediately halts on even inputs and loops on odd inputs computes a nontotal partial computable function but has a constant bound on its halting times. Thus nontotality alone does not decide whether a total bound exists.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 59 3 a Solution Created 2026-10-03 Updated 2026-10-07
A circuit size class consists of languages whose length- indicator functions have Boolean circuits of size at most , for all sufficiently large , over a fixed finite bounded-fan-in complete basis. The notation allows a constant factor. Input-node counting conventions do not affect the polynomial and exponential bounds here.
The nonuniform class P/poly isThere is no requirement that a uniform algorithm construct the Boolean circuits. Equivalently, a polynomial-time machine can receive polynomial-length advice depending only on the input length, and the advice need not be computable.
Choose an undecidable set , for example the set in the halting problem of indices of machines that halt on empty input, and define . For each length , use a constant-zero Boolean circuit if , and an AND of all input bits if . These Boolean circuits have size and accept exactly . Thus undecidable unary languages with linear-size circuits belong to P/poly.
Every NP language is decidable by enumerating its finitely many polynomial-length certificate encodings and running the polynomial-time verifier. If were decidable, testing would decide , a contradiction. ThereforeThis separates the classes in the stated direction; it does not claim that NP is not contained in P/poly.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 135 2 Solution Created 2026-10-03 Updated 2026-10-05
For subsets , a many-one reduction is a total computable function with . A Turing reduction is an oracle machine with oracle computing the total indicator function . It may make several adaptive oracle queries. A many-one reduction gives a Turing reduction using one query; the definitions impose no enumerability assumption on .
The Friedberg–Muchnik theorem asserts that there exist computably enumerable sets withWe give the finite-injury priority construction. Fix an effective list of Turing functionals and imposein priority order . Each strategy has an unassigned, waiting or protected state; a private witness when assigned; and a restraint on the oracle set when protected. All witnesses, even abandoned ones, are permanently recorded and never reused. A strategy for is the only strategy ever allowed to enumerate its witness into ; the analogous statement holds for and .
Start with finite sets . At stage , inspect the first strategies. An unassigned strategy needs attention. A waiting strategy needs attention if the computation converges within steps; waiting is symmetric. Act on the highest-priority strategy needing attention, if any. On assignment choose a fresh witness greater than , every earlier witness and every higher-priority restraint, and enter the waiting state. On a convergence with output and oracle use , act as follows: if , enumerate the witness into its own target set; if , leave the witness out. Enter the protected state and restrain the oracle below . The current characteristic value at the witness is now different from , including outputs other than zero or one. Whenever a strategy acts, initialize every lower-priority strategy, discarding its current witness and restraint but retaining the permanent record of used witnesses. If none needs attention, change nothing.
Every enumeration respects higher-priority restraints: its witness was chosen beyond them after its last initialization, and a later higher-priority action would have initialized it. Each stage is effective, finite and monotone in , so and are computably enumerable. Lower-priority restraints may be violated by a higher-priority action, exactly the allowed injuries.
Induct on priority to verify finite injury and satisfaction. Once all higher-priority strategies have made their last actions, the current strategy receives its final assignment and can act at most once more, on a convergence. If convergence is observed it is then protected permanently; otherwise it waits without further action. In either case every strategy acts only finitely often. After the final initialization of , if it acts on a convergence, no higher strategy subsequently changes its assumptions and every lower strategy respects its restraint. The observed oracle computation therefore remains valid for the final , while the permanently private witness retains the opposite characteristic value in .
If it waits forever, then cannot converge. A convergent final computation uses only finitely many oracle bits; those bits in the increasing enumeration eventually equal their final values. For a sufficiently large stage the same finite computation would have been observed, and after the higher strategies have stopped it would receive attention, contradicting perpetual waiting. Thus is satisfied either by disagreement or by divergence. The same proof satisfies every . This is private-witness diagonalization for incomparable enumerable sets, with the finite-injury verification supplying the required permanent disagreements.
A computable set reduces to every oracle, so incomparability makes both sets noncomputable. Every computably enumerable set reduces to the halting problem; if either of these sets had the halting degree, the other would reduce to it. Thus their c.e. degrees are also incomplete, giving the intermediate degrees sought by the Post problem.
Past exam of the mathematics course of the University of Cambridge 2017 ii Paper 3 11H b Solution Created 2026-09-24 Updated 2026-10-05
The S-m-n theorem says that parameters can be compiled effectively into program indices: for a standard effective numbering, there is a total computable function with for partial computable functions of arguments.
Write , a recursively enumerable halting problem. If is recursively enumerable, make a program with parameter which ignores its input and runs a semidecision procedure for , halting when that procedure halts. By the S-m-n theorem its index is total computable and . Conversely, implies that is recursively enumerable by the previous construction. Thus .
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 135 4 Solution Created 2026-10-03 Updated 2026-10-05
A many-one reduction is a total computable function with . A Turing reduction is an oracle machine which decides with oracle . It may make several adaptive queries and combine their answers. Every many-one reduction is a Turing reduction, by asking the single question . The converse fails: for the diagonal halting set , its complement is Turing-reducible to by reversing one oracle answer, but is not many-one reducible to . Such a reduction would make the complement computably enumerable, contradicting undecidability of the halting problem.
The Friedberg–Muchnik theorem asserts that there are computably enumerable sets with incomparable Turing degrees:Here is a finite-injury priority construction proving it. Enumerate all Turing functionals and put the requirements in the priority orderStart with . Each requirement has a fresh witness, a waiting or acted status, and a restraint on the other set. A restraint forbids lower-priority strategies from enumerating numbers below into that oracle. Globally remember all previously chosen witnesses, including abandoned ones, and never choose any of them again.
For , choose an unused witness outside , larger than the stage and every current higher-priority restraint. Keep it out of . Wait until the bounded simulation converges with value zero. If this happens, enumerate into , put a restraint on , where is one more than the largest oracle query in the observed computation, and mark the strategy acted. For , interchange and .
At stage , consider the first requirements. Choose the highest-priority one needing a witness or waiting with an observed zero computation. Perform its indicated action, then initialize all lower-priority requirements: abandon their witnesses, clear their restraints, and reset their status. Do nothing if no requirement needs attention. Since witness selection respects higher restraints, and higher actions initialize every lower strategy, all protected computations are respected by lower-priority enumerations. Each stage is a finite effective calculation, so and are computably enumerable sets.
Verify by induction along the priority order that every requirement is initialized only finitely often and acts only finitely often. The highest requirement chooses one witness and can diagonalize at most once. After all higher requirements have finished acting, the next requirement is never again initialized; it obtains a final witness and can diagonalize at most once. This proves finite injury for every requirement and ensures that no requirement is permanently starved by higher attention.
Consider after its last initialization. If it acts, its witness belongs to , while the protected computation with oracle remains zero: higher strategies no longer act and lower ones respect its restraint. Thus . If it never acts, its private witness remains outside . Were , the computation on that witness would converge to zero with a finite oracle use. Since the increasing sets eventually agree with on this finite initial segment, a sufficiently late bounded simulation would detect that computation and make act, a contradiction. The symmetric argument verifies every .
Thus the two sets have incomparable Turing degrees. Both are noncomputable, since a computable set is Turing-reducible to every oracle. Both are also strictly below the degree of the halting problem: every computably enumerable set is Turing-reducible to , while completeness of one would make the other reducible to it. This supplies the intermediate degrees sought in Post problem.
Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 3 12H b Solution Created 2026-09-24 Updated 2026-10-03
Rice theorem says that every nontrivial extensional property of programs computing partial functions is undecidable. Equivalently, a nontrivial index set cannot be a computable set.
Let be such an index set. Replacing by its complement if necessary, assume that the nowhere-defined function has no index in . Since the property is nontrivial, choose an index . If membership in were decidable, we could decide the diagonal halting problem as follows. For each , defineBy the S-m-n theorem, a total computable function produces an index for . If diverges, then is nowhere defined and . If it halts, then and extensionality gives . A decider for would therefore decide whether halts, a contradiction. Hence is undecidable.
Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 4 4H b Solution Created 2026-09-24 Updated 2026-10-03
Let be the undecidable set denoted in the question. The language satisfies the pumping lemma for regular languages with pumping length one. For any nonempty , write with , its first symbol, and the remaining suffix.
If , then for every . Otherwise for some . If the chosen first symbol lies in , pumping it preserves the same final suffix . If , then : pumping down gives , while every positive pump gives and all but its last can be absorbed into . Thus every sufficiently long word has a valid pumping decomposition.
Nevertheless, if were regular language, closure under intersection would makeregular. A finite automaton deciding this unary language would decide whether by running it on , contradicting the halting problem. ThereforeThis is a nonregular language satisfying the pumping lemma.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 2 4F ii Solution Created 2026-09-24 Updated 2026-09-29
The setis the diagonal halting set. It is recursively enumerable by simulating the coded machine, but it is not recursive by the halting problem diagonal argument.
By contrast, is recursive: decode , reject it if it is not a program code, otherwise simulate the program on input for exactly steps and accept precisely if it has halted. This bounded computation always terminates. Thus
Past exam of the mathematics course of the University of Cambridge 2022 ii Paper 1 4I Solution Created 2026-09-23 Updated 2026-09-25
Fix an effective enumeration of register-machine programs. The th register machine is , and its domainis the th recursively enumerable set. A many-one reduction is a total computable function satisfying . Rice theorem says that every nontrivial property depending only on the computed partial function, or equivalently on an r.e. set in its extensional form, has an undecidable index set.
There is no total equality algorithm: it would decide whether is empty by comparing it with a fixed index for the empty set, contradicting Rice's theorem.
There is no partial algorithm that halts exactly when either. Given , effectively construct an index whose machine enumerates nothing unless halts, after which it enumerates . ThenA semialgorithm for equality with a fixed empty index would enumerate the complement of the halting problem . Since is r.e., both it and its complement would then be r.e., making recursive, a contradiction.