Let be a deterministic single-tape Turing machine that halts on all inputs. The running time or time complexity of is the function , where is the maximum number of steps that uses on any input of length .
In the above definition, each has a corresponding certificate (or proof) represented by symbol . This is used to verify is indeed a member of . A polynomial time verifier is a verifier that runs in polynomial time in the length of . A language is polynomially verifiable if it has a polynomial time verifier.
Complexity Classes
TIME
Let be an asymptotically nonnegative function. The time complexity class is the collection of all languages decidable by an -time deterministic single-tape Turing machine.
P
is the class of languages that are decidable in polynomial time on a deterministic single-tape Turing machine. In other words,
NTIME
Let be an asymptotically nonnegative function. The nondeterministic time complexity class is the collection of all languages decidable by an -time nondeterministic Turing machine.
NP
is the class of languages that are decidable in polynomial time by a nondeterministic Turing machine. In other words,
We can equivalently characterize as the class of languages that have polynomial time verifiers.
coNP
The complexity class containing languages that are complements of languages in is called . It is unknown whether is different from but, generally speaking, it does seem that verifying something is not present is more difficult than verifying something is present.
The satisfiability problem is the problem of determining whether or not a Boolean formula is satisfiable. That is, it is the problem of determining membership in the following language:
Restricting the Boolean formulas we consider to those in CNF yield language:
Restricting the number of literals found in each clause of a cnf-formula yields the problem, otherwise known as the problem:
Cook-Levin Theorem
is -complete.
Model Dependence
The time complexity of a language depends on the model of computation used. Though TMs are known to be robust with respect to computability theory, variants are less robust with respect to time complexity.
Nonetheless, all "reasonable" deterministic computational models are polynomially equivalent. That is, a reasonable deterministic model can simulate another reasonable deterministic model with only a polynomial change in running time.
Likewise, all reasonable nondeterministic computation models are polynomially equivalent.
Multi-tape
A -tape TM can be simulated using a single-tape TM by concatenating each of the tapes onto the one tape with some some separation symbol not found in the multi-tape TM's alphabet, e.g. #.
Define such that . Then every -time multi-tape Turing machine has an equivalent -time deterministic single-tape Turing machine.
Nondeterministic
An NTM can be simulated using a -tape TM by performing a breadth-first search over the NTM's computation tree, shown below. On each update to the address tape, the input tape is copied to the simulation tape and the computations are run again from the beginning.
Define such that . Then every -time nondeterministic Turing machine has an equivalent -time deterministic single-tape Turing machine.