Cook–Levin theorem
   HOME

TheInfoList



OR:

In
computational complexity theory In theoretical computer science and mathematics, computational complexity theory focuses on classifying computational problems according to their resource usage, and relating these classes to each other. A computational problem is a task solved ...
, the Cook–Levin theorem, also known as Cook's theorem, states that the
Boolean satisfiability problem In logic and computer science, the Boolean satisfiability problem (sometimes called propositional satisfiability problem and abbreviated SATISFIABILITY, SAT or B-SAT) is the problem of determining if there exists an interpretation that satisf ...
is
NP-complete In computational complexity theory, a problem is NP-complete when: # it is a problem for which the correctness of each solution can be verified quickly (namely, in polynomial time) and a brute-force search algorithm can find a solution by trying ...
. That is, it is in NP, and any problem in NP can be reduced in
polynomial time In computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations performed by ...
by a
deterministic Turing machine A Turing machine is a mathematical model of computation describing an abstract machine that manipulates symbols on a strip of tape according to a table of rules. Despite the model's simplicity, it is capable of implementing any computer alg ...
to the Boolean satisfiability problem. The theorem is named after Stephen Cook and
Leonid Levin Leonid Anatolievich Levin ( ; russian: Леони́д Анато́льевич Ле́вин; uk, Леоні́д Анато́лійович Ле́він; born November 2, 1948) is a Soviet-American mathematician and computer scientist. He is kn ...
. 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 computer science (TCS) is a subset of general computer science and mathematics that focuses on mathematical aspects of computer science such as the theory of computation, lambda calculus, and type theory. It is difficult to circumscribe the ...
.


Contributions

The concept of
NP-completeness In computational complexity theory, a problem is NP-complete when: # it is a problem for which the correctness of each solution can be verified quickly (namely, in polynomial time) and a brute-force search algorithm can find a solution by trying ...
was developed in the late 1960s and early 1970s in parallel by researchers in North America and the
USSR The Soviet Union,. officially the Union of Soviet Socialist Republics. (USSR),. was a transcontinental country that spanned much of Eurasia from 1922 to 1991. A flagship communist state, it was nominally a federal union of fifteen nati ...
. 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 The Annual ACM Symposium on Theory of Computing (STOC) is an academic conference in the field of theoretical computer science. STOC has been organized annually since 1969, typically in May or June; the conference is sponsored by the Association for ...
.
Richard Karp Richard Manning Karp (born January 3, 1935) is an American computer scientist and computational theorist at the University of California, Berkeley. He is most notable for his research in the theory of algorithms, for which he received a Turing ...
'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 each received a
Turing Award The ACM A. M. Turing Award is an annual prize given by the Association for Computing Machinery (ACM) for contributions of lasting and major technical importance to computer science. It is generally recognized as the highest distinction in compu ...
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, in 1975, that solving NP-problems in
oracle machine In complexity theory and computability theory, an oracle machine is an abstract machine used to study decision problems. It can be visualized as a Turing machine with a black box, called an oracle, which is able to solve certain problems in a ...
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 NP''A'' is not a subset of T''A''. In particular, for this oracle, P''A'' ≠ NP''A''. In the USSR, a result equivalent to Baker, Gill, and Solovay's was published in 1969 by M. Dekhtiar. Later
Leonid Levin Leonid Anatolievich Levin ( ; russian: Леони́д Анато́льевич Ле́вин; uk, Леоні́д Анато́лійович Ле́він; born November 2, 1948) is a Soviet-American mathematician and computer scientist. He is kn ...
'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 problem In computational complexity theory and computability theory, a search problem is a type of computational problem represented by a binary relation. If ''R'' is a binary relation such that field(''R'') ⊆ Γ+ and ''T'' is a Turing machine, then '' ...
s, which require finding solutions rather than simply determining existence. He provided six such NP-complete search problems, or ''universal problems''. Additionally he found for each of these problems an algorithm that solves it in optimal time (in particular, these algorithms run in polynomial time if and only if
P = NP The P versus NP problem is a major unsolved problem in theoretical computer science. In informal terms, it asks whether every problem whose solution can be quickly verified can also be quickly solved. The informal term ''quickly'', used above ...
).


Definitions

A
decision problem In computability theory and computational complexity theory, a decision problem is a computational problem that can be posed as a yes–no question of the input values. An example of a decision problem is deciding by means of an algorithm whe ...
is ''in NP'' if it can be solved by a non-deterministic algorithm in
polynomial time In computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations performed by ...
. An ''instance of the Boolean satisfiability problem'' is a
Boolean expression In computer science, a Boolean expression is an expression used in programming languages that produces a Boolean value when evaluated. A Boolean value is either true or false. A Boolean expression may be composed of a combination of the Boolean c ...
that combines
Boolean variable In computer science, the Boolean (sometimes shortened to Bool) is a data type that has one of two possible values (usually denoted ''true'' and ''false'') which is intended to represent the two truth values of logic and Boolean algebra. It is nam ...
s using Boolean operators. An expression is ''satisfiable'' if there is some assignment of
truth value In logic and mathematics, a truth value, sometimes called a logical value, is a value indicating the relation of a proposition to truth, which in classical logic has only two possible values ('' true'' or '' false''). Computing In some pro ...
s 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 that computes whether when 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 (SAT) 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 In computational complexity theory, a polynomial-time reduction is a method for solving one problem using another. One shows that if a hypothetical subroutine solving the second problem exists, then the first problem can be solved by transforming ...
. 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. (The statements ''verifiable in polynomial time by a deterministic Turing machine'' and ''solvable in polynomial time by a non-deterministic Turing machine'' are equivalent, and the proof can be found in many textbooks, for example Sipser's ''Introduction to the Theory of Computation'', section 7.3., as well as in the Wikipedia article on NP). Now suppose that a given problem in NP can be solved by the
nondeterministic Turing machine In theoretical computer science, a nondeterministic Turing machine (NTM) is a theoretical model of computation whose governing rules specify more than one possible action when in some given situations. That is, an NTM's next state is ''not'' comp ...
, 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''(''n'') where ''n'' is the size of the instance and ''p'' is a polynomial function. For each input, , we specify a Boolean expression that is satisfiable
if and only if In logic and related fields such as mathematics and philosophy, "if and only if" (shortened as "iff") is a biconditional logical connective between statements, where either both statements are true or both are false. The connective is bic ...
the machine ''M'' accepts . The Boolean expression uses the variables set out in the following table. Here, , and . Define the Boolean expression ''B'' to be the
conjunction Conjunction may refer to: * Conjunction (grammar), a part of speech * Logical conjunction, a mathematical operator ** Conjunction introduction, a rule of inference of propositional logic * Conjunction (astronomy), in which two astronomical bodies ...
of the sub-expressions in the following table, for all and : If there is an accepting computation for ''M'' on input ''I'', then ''B'' is satisfiable by assigning ''T''''i,j,k'', ''H''''i,k'' and ''Q''''i,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''(''p''(''n'')2) Boolean variables, each encodeable in space . The number of clauses is ''O''(''p''(''n'')3) so the size of ''B'' is ''O''(log(''p''(''n''))''p''(''n'')3). Thus the transformation is certainly a polynomial-time many-one reduction, as required.


Complexity

While the above method encodes a non-deterministic Turing machine in complexity O(\log(p(n))p(n)^3), the literature describes more sophisticated approaches in complexity O(p(n)\log(p(n))). The quasilinear result first appeared seven years after Cook's original publication. Generalized versions of boolean satisfiability have encodings with stronger bounds still: quantified boolean formulas (QBF's) encode non-deterministic Turing machines in polynomial complexity to the machine's space bound (as opposed to time bound), and dependency quantified boolean formulas (DQBF's) encode non-deterministic Turing machines in an ideal logarithmic complexity to the machine's space bound.Peterson, Gary, John Reif, and Salman Azhar. "Lower bounds for multiplayer noncooperative games of incomplete information." Computers & Mathematics with Applications 41.7-8 (2001): 957-992.


Consequences

The proof shows that any problem in NP can be reduced in polynomial time (in fact,
logarithmic space In computational complexity theory, L (also known as LSPACE or DLOGSPACE) is the complexity class containing decision problems that can be solved by a deterministic Turing machine using a logarithmic amount of writable memory space., Definition ...
suffices) 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 A Turing machine is a mathematical model of computation describing an abstract machine that manipulates symbols on a strip of tape according to a table of rules. Despite the model's simplicity, it is capable of implementing any computer alg ...
, then all problems in NP could be solved in polynomial time, and so the
complexity class In computational complexity theory, a complexity class is a set of computational problems of related resource-based complexity. The two most commonly analyzed resources are time and memory. In general, a complexity class is defined in terms o ...
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 Richard Manning Karp (born January 3, 1935) is an American computer scientist and computational theorist at the University of California, Berkeley. He is most notable for his research in the theory of algorithms, for which he received a Turing ...
'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 (already shown to be NP-complete) to that problem. For example, he showed the problem 3SAT (the
Boolean satisfiability problem In logic and computer science, the Boolean satisfiability problem (sometimes called propositional satisfiability problem and abbreviated SATISFIABILITY, SAT or B-SAT) is the problem of determining if there exists an interpretation that satisf ...
for expressions in
conjunctive normal form In Boolean logic, a formula is in conjunctive normal form (CNF) or clausal normal form if it is a conjunction of one or more clauses, where a clause is a disjunction of literals; otherwise put, it is a product of sums or an AND of ORs. As a cano ...
with exactly three variables or negations of variables per clause) to be NP-complete by showing how to reduce (in polynomial time) any instance of SAT to an equivalent instance of 3SAT. (First you modify the proof of the Cook–Levin theorem, so that the resulting formula is in conjunctive normal form, then you introduce new variables to split clauses with more than 3 atoms. For example, the clause (A ∨ B ∨ C ∨ D) can be replaced by the conjunction of clauses (A ∨ B ∨ Z) ∧ (¬Z ∨ C ∨ D), where Z is a new variable that will not be used anywhere else in the expression. Clauses with fewer than three atoms can be padded; for example, A can be replaced by (A ∨ A ∨ A), and (A ∨ B) can be replaced by (A ∨ B ∨ B) ). 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 (and consequently all other NP-complete problems) 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.


References

{{DEFAULTSORT:Cook-Levin theorem Theorems in computational complexity theory Articles containing proofs