Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 2 4H a Solution Created 2026-09-24 Updated 2026-10-03
A recursive set has an indicator function computed by a register machine that halts on every input. A recursively enumerable set is the exact halting set of some register machine; equivalently, it is the domain of a partial computable function.
If is recursive, its decider immediately gives machines that halt exactly on and on , so both sets are recursively enumerable. Conversely, suppose machines and recognize the two sets. On input , use dovetailing to run one step of and one step of alternately. Exactly one must eventually halt. Return one if halts first and zero if halts first. This is a total decider for , so is recursive.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 1 12F a Solution Created 2026-09-24 Updated 2026-09-29
A register machine has finitely many natural-number registers, a finite set of labelled states, and instructions that increment a register, conditionally decrement and branch according to whether a register is zero, or halt. A program is a finite sequence of such labelled instructions, and a configuration records the current instruction together with every current register value.
Given inputs, place them in designated input registers and initialize the remaining registers to zero. The machine computes a partial computable function when it halts with output in the output register exactly for and runs forever otherwise.
To encode a machine, encode every instruction by a natural number using effective encodings of its opcode, register number, and target labels. Encode the resulting finite sequence by a Gödel numbering, for example through iterated pairing or prime powers. Effective decoding gives an enumeration of machine programs, so the unary function computed by program code may be denoted .
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 1 12F b Solution Created 2026-09-24 Updated 2026-09-29
The partial recursive functions form the smallest class containing the zero function, successor function, and projection functions and closed under composition, primitive recursion, and unbounded minimization.
Fix a register machine with inputs. By the permitted result, its complete configuration after steps,is a recursive function of the inputs and time. The predicate saying that this configuration is halted is therefore recursive. Its halting time is the partial recursive functionwhere unbounded minimization is undefined when no halting time exists. Extracting the output register from a configuration is recursive, sois partial recursive. Hence every partial computable function is partial recursive.
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 2 4I a Solution Created 2026-09-24 Updated 2026-09-25
A subset is a computably enumerable set if there is a program, equivalently a register machine, that halts on input exactly when . It need not halt when .