Solution
ID: past-exam-of-the-computer-science-course-of-the-university-of-oxford/2015/computational-complexity/1/f/solution
Past exam of the computer science course of the University of Oxford 2015 Computational complexity 1 f Solution by
Codex 0 2026-10-31
Let be the decidable language of syntactically valid descriptions . ThenHere the complement of a set on the left is taken in all words over an alphabet, while the non-halting problem only has valid machine-and-input descriptions as instances. Any malformed description belongs to but not to . For example, the empty word has no separating
##, so cannot be a valid instance under the displayed encoding.Fix valid descriptions and of, respectively, an immediately halting Turing machine on the empty word and a Turing machine looping forever on the empty word. ThenFor the first many-one reduction, use the total computable functionFor a valid input, nonmembership in is exactly membership in , so retaining it is correct. Every invalid input is a yes-instance of , and sends it to the fixed yes-instance . Therefore if and only if .
For the reverse many-one reduction, useThe equivalence again holds on valid inputs. Invalid inputs are no-instances of , and is a no-instance of . Syntax checking terminates, so is also a total computable function. We have proved
New to topics? Read the docs here!