Cook–Levin theorem
In computational complexity theory, the Cook–Levin theorem, also known as Cook's theorem, states that the Boolean satisfiability problem is NP-complete. That is, it is in NP, and any problem in NP can be reduced in polynomial time by a deterministic Turing machine to the Boolean satisfiability problem.
The theorem is named after Stephen Cook and Leonid Levin.
An important consequence of this theorem is that if there exists a deterministic polynomial time algorithm for solving Boolean satisfiability, then every NP problem can be solved by a deterministic polynomial time algorithm. The question of whether such an algorithm for Boolean satisfiability exists is thus equivalent to the P versus NP problem, which is widely considered the most important unsolved problem in theoretical computer science.
Contributions
The concept of NP-completeness was developed in the late 1960s and early 1970s in parallel by researchers in the US and the USSR.In the US in 1971, Stephen Cook published his paper "The complexity of theorem proving procedures" in conference proceedings of the newly founded ACM Symposium on Theory of Computing. Richard Karp's subsequent paper, "Reducibility among
combinatorial problems", generated renewed interest in Cook's paper by providing a list of 21 NP-complete problems. Cook and Karp received a Turing Award for this work.
The theoretical interest in NP-completeness was also enhanced by the work of Theodore P. Baker, John Gill, and Robert Solovay who showed that solving NP-problems in Oracle machine models requires exponential time. That is, there exists an oracle A such that, for all subexponential deterministic time complexity classes T, the relativized complexity class NPA is not a subset of TA. In particular, for this oracle, PA ≠ NPA.
In the USSR, a result equivalent to Baker, Gill, and Solovay's was published in 1969 by M. Dekhtiar. Later Levin's paper, "Universal search problems", was published in 1973, although it was mentioned in talks and submitted for publication a few years earlier.
Levin's approach was slightly different from Cook's and Karp's in that he considered search problems, which require finding solutions rather than simply determining existence. He provided 6 such NP-complete search problems, or universal problems.
Additionally he found for each of these problems an algorithm that solves it in optimal time.
Definitions
A decision problem is in NP if it can be solved by a non-deterministic algorithm in polynomial time.An instance of the Boolean satisfiability problem is a Boolean expression that combines Boolean variables using Boolean operators.
An expression is satisfiable if there is some assignment of truth values to the variables that makes the entire expression true.
Idea
Given any decision problem in NP, construct a non-deterministic machine that solves it in polynomial time. Then for each input to that machine, build a Boolean expression which computes whether that specific input is passed to the machine, the machine runs correctly, and the machine halts and answers "yes". Then the expression can be satisfied if and only if there is a way for the machine to run correctly and answer "yes", so the satisfiability of the constructed expression is equivalent to asking whether or not the machine will answer "yes".Proof
This proof is based on the one given by Garey and Johnson.There are two parts to proving that the Boolean satisfiability problem is NP-complete. One is to show that SAT is an NP problem. The other is to show that every NP problem can be reduced to an instance of a SAT problem by a polynomial-time many-one reduction.
SAT is in NP because any assignment of Boolean values to Boolean variables that is claimed to satisfy the given expression can be verified in polynomial time by a deterministic Turing machine..
Now suppose that a given problem in NP can be solved by the nondeterministic Turing machine, where Q is the set of states, Σ is the alphabet of tape symbols, is the initial state, is the set of accepting states, and is the transition relation. Suppose further that M accepts or rejects an instance of the problem in time p where n is the size of the instance and p is a polynomial function.
For each input, I, we specify a Boolean expression which is satisfiable if and only if the machine M accepts I.
The Boolean expression uses the variables set out in the following table. Here,, and.
Variables | Intended interpretation | How many? |
Ti,j,k | True if tape cell i contains symbol j at step k of the computation. | O |
Hi,k | True if the M's read/write head is at tape cell i at step k of the computation. | O |
Qq,k | True if M is in state q at step k of the computation. | O |
Define the Boolean expression B to be the conjunction of the sub-expressions in the following table, for all and :
Expression | Conditions | Interpretation | How many? |
Tape cell i initially contains symbol j | Initial contents of the tape. For i > n-1 and i < 0, outside of the actual input, the initial symbol is the special default/blank symbol. | O | |
Initial state of M. | 1 | ||
Initial position of read/write head. | 1 | ||
j ≠ j′ | At most one symbol per tape cell. | O | |
At least one symbol per tape cell. | O | ||
j ≠ j′ | Tape remains unchanged unless written. | O | |
¬Qq,k ∨ ¬Qq′,k | q ≠ q′ | Only one state at a time. | O |
¬Hi,k ∨ ¬Hi′,k | i ≠ i′ | Only one head position at a time. | O |
k<p | Possible transitions at computation step k when head is at position i. | O | |
Must finish in an accepting state, not later than in step p. | 1 |
If there is an accepting computation for M on input I, then B is satisfiable by assigning Ti,j,k, Hi,k and Qi,k their intended interpretations. On the other hand, if B is satisfiable, then there is an accepting computation for M on input I that follows the steps indicated by the assignments to the variables.
There are O Boolean variables, each encodeable in space. The number of clauses is O so the size of B is O. Thus the transformation is certainly a polynomial-time many-one reduction, as required.
Consequences
The proof shows that any problem in NP can be reduced in polynomial time to an instance of the Boolean satisfiability problem. This means that if the Boolean satisfiability problem could be solved in polynomial time by a deterministic Turing machine, then all problems in NP could be solved in polynomial time, and so the complexity class NP would be equal to the complexity class P.The significance of NP-completeness was made clear by the publication in 1972 of Richard Karp's landmark paper, "Reducibility among combinatorial problems", in which he showed that 21 diverse combinatorial and graph theoretical problems, each infamous for its intractability, are NP-complete.
Karp showed each of his problems to be NP-complete by reducing another problem to that problem. For example, he showed the problem 3SAT to be NP-complete by showing how to reduce any instance of SAT to an equivalent instance of 3SAT. can be replaced by the conjunction of clauses ∧, where Z is a new variable which will not be used anywhere else in the expression. Clauses with fewer than 3 atoms can be padded; for example, A can be replaced by, and can be replaced by.
Garey and Johnson presented more than 300 NP-complete problems in their book Computers and Intractability: A Guide to the Theory of NP-Completeness, and new problems are still being discovered to be within that complexity class.
Although many practical instances of SAT can be solved by heuristic methods, the question of whether there is a deterministic polynomial-time algorithm for SAT is still a famous unsolved problem, despite decades of intense effort by complexity theorists, mathematical logicians, and others. For more details, see the article P versus NP problem.