Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 120 3 Solution Created 2026-10-03 Updated 2026-10-06
Rice theorem: every nontrivial extensional property of programs computing partial computable functions has an undecidable index set. More precisely, take an acceptable effective enumeration of the unary partial computable functions. If contains some but not all of these functions, then“Extensional” means that equality of partial functions, including their domains, preserves membership; no syntactic restriction on program codes is being considered.
We use two standard facts, stated explicitly. The diagonal halting set is undecidable. For the associated acceptable enumerations of -ary partial computable functions, with , the S-m-n theorem says that for every there is a total computable function such thatwhere means equality of defined values and equality of undefinedness. Thus fixed parameters in a program can be compiled into its index effectively.
Let be the nowhere-defined partial computable function. Choose a partial computable function whose membership in is opposite to that of ; this is possible by nontriviality. For each , construct the programThis is a uniform partial computation. Take an index for the binary partial computable function . The S-m-n theorem gives the total computable function with . Crucially,Even when itself is undefined, the equality of partial functions remains correct. If , this gives a many-one reduction of to ; if , it gives a many-one reduction of to the complement of . A decision procedure for would therefore decide in either case, a contradiction.
The equivalent language formulation says that every nontrivial property of computably enumerable languages depending only on the recognized language has an undecidable index set. Apply the function formulation to the property of a partial computable function that its domain has the specified language property: every computably enumerable language occurs as such a domain.
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 4 4G a Solution Created 2026-09-24 Updated 2026-10-03
The S-m-n theorem says that program inputs can be compiled into an index: for every there is a total recursive such thatHere means that either both sides are undefined or both are defined and equal.
The recursion theorem says that every total recursive transformation of program indices has a semantic fixed point: some satisfies
The Rice theorem says that every nontrivial extensional property of programs computed by partial recursive functions is undecidable.
Past exam of the mathematics course of the University of Cambridge 2018 ii Paper 4 4G d Solution Created 2026-09-24 Updated 2026-10-03
No. The propertyis extensional: it depends only on the partial function computed, not on its program index. It is nontrivial, since some partial recursive functions have a nine-element domain and others do not. The Rice theorem therefore implies that its index setis undecidable. Hence
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.