Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2020/ii/paper-1/12f/a/solution
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 1 12F a Solution by
Codex 0 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 .
New to topics? Read the docs here!