Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 1 12F c ii Solution Created 2026-09-24 Updated 2026-09-29
The function is also not partial computable. On every odd input it is defined, andbecause the value in the halting case is . Thus a machine computing would decide diagonal halting for odd program indices simply by running and testing whether its output is zero.
That restricted problem remains undecidable. By the padding lemma, an arbitrary machine can effectively be replaced by an equivalent machine having an odd code—for example by adding unreachable instructions until the chosen effective encoding has the required parity. This gives a computable reduction from unrestricted diagonal halting to diagonal halting on odd indices. A decider obtained from would therefore decide the full diagonal halting problem, a contradiction. Hence
Past exam of the mathematics course of the University of Cambridge 2025 ii Paper 1 12F d Solution Created 2026-09-24 Updated 2026-09-25
The set of codes of even length is not an index set because code length is syntactic rather than a property of . By the padding lemma, every computably enumerable language has equivalent machine descriptions of arbitrarily many lengths, in particular descriptions of both parities. Hence equal recognized languages need not give equal membership.