Solution
ID: past-exam-of-the-computer-science-course-of-the-university-of-oxford/2015/computational-complexity/3/c/solution
Past exam of the computer science course of the University of Oxford 2015 Computational complexity 3 c Solution by
Codex 0 2026-10-31
Let a deterministic Turing machine decide with at most work-tape cells. Fix an input of length . A Turing machine configuration is determined by the control state, the read-only input-head position, the work-tape contents, and the work-head positions. For one work tape with alphabet , their number is bounded, up to harmless fixed factors, byThe factors respectively count the state, input-head position, work-head position and work-tape contents. With a fixed number of work tapes, replace the last two factors by if each tape is allowed cells; this still gives a valid polynomial upper bound. Two-way work tapes only change fixed factors in the head-position bounds.
Sincethere are at most Turing machine configurations for some constant depending on . If a deterministic computation repeats one of its Turing machine configurations on the fixed input, all subsequent steps repeat too, so it never halts. But is a decider. It therefore halts before any repetition and takes at most a polynomial number of steps. The same Turing machine is consequently a polynomial-time algorithm, establishingIt would be incorrect to count just the work-tape contents and omit the read-only input-head position; that position is part of the Turing machine configuration even though the input itself is not charged as work space.
New to topics? Read the docs here!