Complexity Theory
- NOTE: Throughout #complexity-theory we use language and computational problem interchangeably
To classify problems/languages by the amount of "computational resources" required to solve them. These resources are:
- Time
- Space (memory requirement)
- Non-determinism
Notation, Vocabulary, ....
- A language is recursively enumerable (r.e.) if there is a (deterministic) Turing Machine which recognises it
- A language
over alphabet is co-recursively enumerable if is r.e. - A language is recursive iff it is both r.e. and co r.e.
Let
Let
If there is a polynomial time algorithm for the language then we also have a polynomial time algorithm for it's complement (flip the outputs !!). Thus
Let
If a language is in
- If
certificate ( ) s.t. a verifier accepts - If
certificate ( ) verifier rejects
Consider SAT, if a formula is not satisfiable then no certificate can exist that verifies the SAT problem. Alternatively, if a formula is satisfiable some certificate can exist that verifies it. Thus, SAT is canonically related to
SAT | TAUTOLOGY |
Is |
Is |
Let
Let
- Theorem: Let
be a function and . Then . - Theorem: Let
be a function and . Then .
- co-Classes: Given any class
of languages, the class is -complete: "Hardest" language in . Some is -complete if (polynomial time reducible.)
- Let
be a set of functions from to : $$\begin{array}{ll} \text{TIME}(G) = \bigcup\limits_{g \in G} \text{TIME}(g) \ \text{SPACE}(G) = \bigcup\limits_{g \in G} \text{SPACE}(g) \ \text{NTIME}(G) = \bigcup\limits_{g \in G} \text{NTIME}(g) \ \text{NSPACE}(G) = \bigcup\limits_{g \in G} \text{NSPACE}(g) \end{array}$$ - Some important function classes: $$\begin{array}{ll} P &= E_0 &= {n^c | c > 0 } \ E &= E_1 &= { 2^{n^c} | c > 0 } \ &= E_2 &= {2^{2^{n^c}} | c > 0 } \ &= E_k &= k-\text{times} \end{array}$$
- Important classes of problems. $$\begin{array}{ll} \text{PTIME} &= \text{TIME}(P) \ \text{EXPTIME} &= \text{TIME}(E) \ \text{k-EXPTIME} &= \text{TIME}(E_k) \ \ \text{NPTIME} &= \text{NTIME}(P) \ \text{NEXPTIME} &= \text{NTIME}(E) \ \text{k-NEXPTIME} &= \text{NTIME}(E_k) \ \ \ \text{LOGSPACE} &= \text{SPACE}(\log n) \ \text{PSPACE} &= \text{SPACE}(P)\ \text{EXPSPACE} &= \text{SPACE}(E)\ \text{k-EXPSPACE} &= \text{SPACE}(E_k) \ \ \text{NLOGSPACE} &= \text{NSPACE}(\log n) \ \text{NPSPACE} &= \text{NSPACE}(P)\ \text{NEXPSPACE} &= \text{NSPACE}(E)\ \text{k-NEXPSPACE} &= \text{NSPACE}(E_k)\end{array}$$
Inclusions
- Basic Inclusions$$\begin{array}{ll} \text{TIME}(G) \subseteq \text{NTIME}(G) \ \text{SPACE}(G) \subseteq \text{NSPACE}(G) \ \ \text{TIME}(G) \subseteq \text{SPACE}(G) \ \text{NTIME}(G) \subseteq \text{NSPACE}(G) \end{array}$$
- If
, then (similarly for )
Configuration Graphs of Turning Machines
Let