Definition 378.1(Turing machine).
A deterministic Turing machine is defined as where
- is the tape alphabet
- is a finite set of states with .
- transition function .
Note that the TM a read-only input tape.
We define time to be the number of transitions a TM goes through from start to halt.
We say iff halts on in .
Definition 378.2(Time complexity).
For a TM ,
where is the time taken for to halt on .
Alphabet reduction: For a TM with alphabet , there is an equivalent TM with alphabet (where the last two are ‘start’ and ‘blank’ symbols respectively) such that runs in .
Tape reduction: For a -tape TM , there is a 2-tape TM such that decides the same language and takes time .
[!Theorem] Universal Turing Machine
There is a TM and an encoding scheme for TMs such that takes as input, simulates on for steps, and produces in time iff decides in time.
A nondeterministic halting TM is one which halts on each computation path for each input. Time complexity is defined as
We will assume that all TMs are of this variety.
[!Definition] Complexity classes
.
.
iff there exists some path in the execution tree of which accepts.
If , then . If , then . We do not know whether .
Observe that a NDTM with time complexity can be simulated by a DTM with time complexity , since it has to check every path of a computation tree of height .
NPSACE and PSPACE definitions
Many-one reductions
implies
- If there is a polytime algo to determine membership in , then there is a polytime algo to determine membership in .
- If there does not exist a polytime algo for , then there does not exist a polytime algo for .
Lemma 378.3.
Let . If , then .
is a transitive relation.
Definition 378.4.
is NP-hard if forall such that , . If, additionally, , then is said to be NP-complete.
[!Theorem] Cook-Levin
is NP-complete.
encode verifying computation histories as a SAT instance.