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.
72-483: The theorem is named after Stephen Cook and Leonid Levin . The proof is due to Richard Karp , based on an earlier proof (using a different notion of reducibility) by Cook . 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
144-474: 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, in 1975, that solving NP-problems in certain 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 NP
216-567: A Boolean expression B {\displaystyle B} that is satisfiable if and only if the machine M {\displaystyle M} accepts I {\displaystyle I} . The Boolean expression uses the variables set out in the following table. Here, q ∈ Q {\displaystyle q\in Q} is a machine state, − p ( n ) ≤ i ≤ p ( n ) {\displaystyle -p(n)\leq i\leq p(n)}
288-692: A Killam Research Fellowship in 1982, and received the CRM-Fields-PIMS prize in 1999. He has won John L. Synge Award and Bernard Bolzano Medal of the Czech Academy of Sciences (2008), and is a fellow of the Royal Society of London and Royal Society of Canada . Cook was elected to membership in the National Academy of Sciences (United States) and the American Academy of Arts and Sciences . He
360-480: 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. (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
432-410: A few places in the proof string, and using a limited number of coin flips can determine the correct answer with high probability. This allows several results about the hardness of approximation algorithms to be proven. All problems in P , denoted P ⊆ N P {\displaystyle {\mathsf {P\subseteq NP}}} . Given a certificate for a problem in P , we can ignore
504-456: A given subset has sum zero is a verifier . Clearly, summing the integers of a subset can be done in polynomial time, and the subset sum problem is therefore in NP. The above example can be generalized for any decision problem. Given any instance I of problem Π {\displaystyle \Pi } and witness W, if there exists a verifier V so that given the ordered pair (I, W) as input, V returns "yes" in polynomial time if
576-423: A non-deterministic TM called A accepting a given language L. At each of its polynomially many steps, the machine's computation tree branches in at most a finite number of directions. There must be at least one accepting path, and the string describing this path is the proof supplied to the verifier. The verifier can then deterministically simulate A, following only the accepting path, and verifying that it accepts at
648-411: 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
720-513: A polynomial-time algorithm would exist for solving NP-complete, and by corollary, all NP problems. The complexity class NP is related to the complexity class co-NP , for which the answer "no" can be verified in polynomial time. Whether or not NP = co-NP is another outstanding question in complexity theory. The complexity class NP can be defined in terms of NTIME as follows: where N T I M E ( n k ) {\displaystyle {\mathsf {NTIME}}(n^{k})}
792-559: A polynomial-time machine can only read polynomially many bits, it cannot use more than polynomial space, nor can it read a proof string occupying more than polynomial space (so we do not have to consider proofs longer than this). NP is also contained in EXPTIME , since the same algorithm operates in exponential time. co-NP contains those problems that have a simple proof for no instances, sometimes called counterexamples. For example, primality testing trivially lies in co-NP, since one can refute
SECTION 10
#1732869361508864-420: A problem (the recognition of true quantified Boolean formulas) that is PSPACE-complete . Analogously, dependency quantified boolean formulas encode computation with a Turing machine limited to logarithmic space complexity , proving that there exists a problem that is NL-complete . The proof shows that every problem in NP can be reduced in polynomial time (in fact, logarithmic space suffices) to an instance of
936-514: Is in NP if it can be decided by a non-deterministic Turing machine in polynomial time . An instance of the Boolean satisfiability problem is a Boolean expression that combines Boolean variables using Boolean operators . Such an expression is satisfiable if there is some assignment of truth values to the variables that makes the entire expression true. Given any decision problem in NP, construct
1008-429: Is Olympic sailor Gordon Cook . NP (complexity)#Equivalence of definitions In computational complexity theory , NP ( nondeterministic polynomial time ) is a complexity class used to classify decision problems . NP is the set of decision problems for which the problem instances , where the answer is "yes", have proofs verifiable in polynomial time by a deterministic Turing machine , or alternatively
1080-650: Is a corresponding member of the Göttingen Academy of Sciences and Humanities . Cook won the ACM Turing Award in 1982. Association for Computing Machinery honored him as a Fellow of ACM in 2008 for his fundamental contributions to the theory of computational complexity . He was selected by the Association for Symbolic Logic to give the Gödel Lecture in 1999. The Government of Ontario appointed him to
1152-401: Is a tape position, j ∈ Σ {\displaystyle j\in \Sigma } is a tape symbol, and 0 ≤ k ≤ p ( n ) {\displaystyle 0\leq k\leq p(n)} is the number of a computation step. Define the Boolean expression B {\displaystyle B} to be the conjunction of the sub-expressions in
1224-579: Is also known. While the above method encodes a non-deterministic Turing machine in complexity O ( log ( p ( n ) ) p ( n ) 3 ) {\displaystyle O(\log(p(n))p(n)^{3})} , the literature describes more sophisticated approaches in complexity O ( p ( n ) log ( p ( n ) ) ) {\displaystyle O(p(n)\log(p(n)))} . The quasilinear result first appeared seven years after Cook's original publication. The use of SAT to prove
1296-544: Is considered one of the forefathers of computational complexity theory . Cook received his bachelor's degree in 1961 from the University of Michigan , and his master's degree and PhD from Harvard University , respectively in 1962 and 1966, from the Mathematics Department. He joined the University of California, Berkeley , mathematics department in 1966 as an assistant professor, and stayed there until 1970 when he
1368-560: Is equivalent to the verifier-based definition because a nondeterministic Turing machine could solve an NP problem in polynomial time by nondeterministically selecting a certificate and running the verifier on the certificate. Similarly, if such a machine exists, then a polynomial time verifier can naturally be constructed from it. In this light, we can define co-NP dually as the class of decision problems recognizable by polynomial-time nondeterministic Turing machines with an existential rejection condition. Since an existential rejection condition
1440-442: Is exactly the same thing as a universal acceptance condition , we can understand the NP vs. co-NP question as asking whether the existential and universal acceptance conditions have the same expressive power for the class of polynomial-time nondeterministic Turing machines. NP is closed under union , intersection , concatenation , Kleene star and reversal . It is not known whether NP is closed under complement (this question
1512-421: Is no acceptable proof string. A major result of complexity theory is that NP can be characterized as the problems solvable by probabilistically checkable proofs where the verifier uses O(log n ) random bits and examines only a constant number of bits of the proof string (the class PCP (log n , 1)). More informally, this means that the NP verifier described above can be replaced with one that just "spot-checks"
SECTION 20
#17328693615081584-841: Is not a subset of T. In particular, for this oracle, P ≠ NP. In the USSR, a result equivalent to Baker, Gill, and Solovay's was published in 1969 by M. Dekhtiar. Later Leonid 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 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 ). A decision problem
1656-542: Is satisfiable by assigning T i , j , k {\displaystyle T_{i,j,k}} , H i , k {\displaystyle H_{i,k}} and Q i , k {\displaystyle Q_{i,k}} their intended interpretations. On the other hand, if B {\displaystyle B} is satisfiable, then there is an accepting computation for M {\displaystyle M} on input I {\displaystyle I} that follows
1728-447: Is the set of NP-complete decision problems, which is a subset of NP and might be informally described as the "hardest" problems in NP. If there is a polynomial-time algorithm for even one of them, then there is a polynomial-time algorithm for all the problems in NP. Because of this, and because dedicated research has failed to find a polynomial algorithm for any NP-complete problem, once a problem has been proven to be NP-complete, this
1800-537: Is the set of decision problems that can be solved by a nondeterministic Turing machine in O ( n k ) {\displaystyle O(n^{k})} time. Alternatively, NP can be defined using deterministic Turing machines as verifiers. A language L is in NP if and only if there exist polynomials p and q , and a deterministic Turing machine M , such that Many computer science problems are contained in NP, like decision versions of many search and optimization problems. In order to explain
1872-640: Is the set of states, Σ {\displaystyle \Sigma } is the alphabet of tape symbols, s ∈ Q {\displaystyle s\in Q} is the initial state, F ⊆ Q {\displaystyle F\subseteq Q} is the set of accepting states, and δ ⊆ ( ( Q ∖ F ) × Σ ) × ( Q × Σ × { − 1 , + 1 } ) {\displaystyle \delta \subseteq ((Q\setminus F)\times \Sigma )\times (Q\times \Sigma \times \{-1,+1\})}
1944-551: Is the so-called "NP versus co-NP" question). Because of the many important problems in this class, there have been extensive efforts to find polynomial-time algorithms for problems in NP. However, there remain a large number of problems in NP that defy such attempts, seeming to require super-polynomial time . Whether these problems are not decidable in polynomial time is one of the greatest open questions in computer science (see P versus NP ("P = NP") problem for an in-depth discussion). An important notion in this context
2016-466: Is the transition relation. Suppose further that M {\displaystyle M} accepts or rejects an instance of the problem after at most p ( n ) {\displaystyle p(n)} computation steps, where n {\displaystyle n} is the size of the instance and p {\displaystyle p} is a polynomial function. For each input, I {\displaystyle I} , specify
2088-533: Is thus equivalent to the P versus NP problem , which is still widely considered the most important unsolved problem in theoretical computer science . The concept of NP-completeness was developed in the late 1960s and early 1970s in parallel by researchers in North America and the Soviet Union . In 1971, Stephen Cook published his paper "The complexity of theorem proving procedures" in conference proceedings of
2160-563: Is to say, a decision problem Π {\displaystyle \Pi } is in NP whenever Π {\displaystyle \Pi } is recognized by some polynomial-time nondeterministic Turing machine M {\displaystyle M} with an existential acceptance condition , meaning that w ∈ Π {\displaystyle w\in \Pi } if and only if some computation path of M ( w ) {\displaystyle M(w)} leads to an accepting state. This definition
2232-424: Is true for some value of the variables. The decision version of the travelling salesman problem is in NP. Given an input matrix of distances between n cities, the problem is to determine if there is a route visiting all cities with total distance less than k . A proof can simply be a list of the cities. Then verification can clearly be done in polynomial time. It simply adds the matrix entries corresponding to
Cook–Levin theorem - Misplaced Pages Continue
2304-450: Is unknown: it is not known whether BPP is a subset of NP , NP is a subset of BPP or neither. If NP is contained in BPP , which is considered unlikely since it would imply practical solutions for NP-complete problems, then NP = RP and PH ⊆ BPP . NP is a class of decision problems ; the analogous class of function problems is FNP . The only known strict inclusions come from
2376-421: Is widely regarded as a sign that a polynomial algorithm for this problem is unlikely to exist. However, in practical uses, instead of spending computational resources looking for an optimal solution, a good enough (but potentially suboptimal) solution may often be found in polynomial time. Also, the real-life applications of some problems are easier than their theoretical equivalents. The two definitions of NP as
2448-616: The Boolean satisfiability problem (usually known as SAT) is NP-complete . This theorem was proven independently by Leonid Levin in the Soviet Union , and has thus been given the name the Cook–Levin theorem . The paper also formulated the most famous problem in computer science, the P vs. NP problem . Informally, the "P vs. NP" question asks whether every optimization problem whose answers can be efficiently verified for correctness/optimality can be solved optimally with an efficient algorithm. Given
2520-559: The Order of Ontario in 2013, the highest honor in Ontario . He has won the 2012 Gerhard Herzberg Canada Gold Medal for Science and Engineering , the highest honor for scientists and engineers in Canada. The Herzberg Medal is awarded by NSERC for "both the sustained excellence and overall influence of research work conducted in Canada in the natural sciences or engineering". He was named an Officer of
2592-457: The time hierarchy theorem and the space hierarchy theorem , and respectively they are N P ⊊ N E X P T I M E {\displaystyle {\mathsf {NP\subsetneq NEXPTIME}}} and N P ⊊ E X P S P A C E {\displaystyle {\mathsf {NP\subsetneq EXPSPACE}}} . In terms of descriptive complexity theory , NP corresponds precisely to
2664-460: The "no"-answers is called co-NP. In fact, it is an open question whether all problems in NP also have verifiers for the "no"-answers and thus are in co-NP. In some literature the verifier is called the "certifier", and the witness the " certificate ". Equivalent to the verifier-based definition is the following characterization: NP is the class of decision problems solvable by a nondeterministic Turing machine that runs in polynomial time . That
2736-530: The 1971 ACM SIGACT Symposium on the Theory of Computing, laid the foundations for the theory of NP-Completeness. The ensuing exploration of the boundaries and nature of NP-complete class of problems has been one of the most active and important research activities in computer science for the last decade. In his "Feasibly Constructive Proofs and the Propositional Calculus" paper published in 1975, he introduced
2808-751: 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 (already shown to be NP-complete) to that problem. For example, he showed
2880-805: The Order of Canada in 2015. Cook was granted the BBVA Foundation Frontiers of Knowledge Award 2015 in the Information and Communication Technologies category "for his important role in identifying what computers can and cannot solve efficiently," in the words of the jury's citation. His work, it continues, "has had a dramatic impact in all fields where complex computations are crucial." Cook has supervised numerous MSc students, and 36 PhD students have completed their degrees under his supervision. Cook lives with his wife in Toronto . They have two sons, one of whom
2952-481: 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
Cook–Levin theorem - Misplaced Pages Continue
3024-486: The abundance of such optimization problems in everyday life, a positive answer to the "P vs. NP" question would likely have profound practical and philosophical consequences. Cook conjectures that there are optimization problems (with easily checkable solutions) that cannot be solved by efficient algorithms, i.e., P is not equal to NP. This conjecture has generated a great deal of research in computational complexity theory , which has considerably improved our understanding of
3096-432: The article P versus NP problem . Stephen Cook Stephen Arthur Cook OC OOnt (born December 14, 1939) is an American-Canadian computer scientist and mathematician who has made significant contributions to the fields of complexity theory and proof complexity . He is a university professor emeritus at the University of Toronto , Department of Computer Science and Department of Mathematics . He
3168-423: The certificate and just solve the problem in polynomial time. The decision problem version of the integer factorization problem : given integers n and k , is there a factor f with 1 < f < k and f dividing n ? Every NP-complete problem is in NP. The Boolean satisfiability problem ( SAT ), where we want to know whether or not a certain formula in propositional logic with Boolean variables
3240-450: The class of problems solvable by a nondeterministic Turing machine (TM) in polynomial time and the class of problems verifiable by a deterministic Turing machine in polynomial time are equivalent. The proof is described by many textbooks, for example, Sipser's Introduction to the Theory of Computation , section 7.3. To show this, first, suppose we have a deterministic verifier. A non-deterministic machine can simply nondeterministically run
3312-451: The complexity class NC after Nick Pippenger . The complexity class SC is named after him. The definition of the complexity class AC and its hierarchy AC are also introduced by him. According to Don Knuth the KMP algorithm was inspired by Cook's automata for recognizing concatenated palindromes in linear time . Cook was awarded an NSERC E.W.R. Steacie Memorial Fellowship in 1977,
3384-410: The constructed expression is equivalent to asking whether or not the machine will answer "yes". This proof is based on the one given by Garey & Johnson 1979 , pp. 38–44, Section 2.6. 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
3456-448: The end. If A rejects the input, there is no accepting path, and the verifier will always reject. NP contains all problems in P , since one can verify any instance of the problem by simply ignoring the proof and solving it. NP is contained in PSPACE —to show this, it suffices to construct a PSPACE machine that loops over all proof strings and feeds each one to a polynomial-time verifier. Since
3528-490: The equational theory PV (standing for Polynomial-time Verifiable) to formalize the notion of proofs using only polynomial-time concepts. He made another major contribution to the field in his 1979 paper, joint with his student Robert A. Reckhow , "The Relative Efficiency of Propositional Proof Systems", in which they formalized the notions of p-simulation and efficient propositional proof system , which started an area now called propositional proof complexity . They proved that
3600-645: The existence of a proof system in which every true formula has a short proof is equivalent to NP = coNP . Cook co-authored a book with his student Phuong The Nguyen in this area titled "Logical Foundations of Proof Complexity". His main research areas are complexity theory and proof complexity , with excursions into programming language semantics , parallel computation , and artificial intelligence . Other areas that he has contributed to include bounded arithmetic , bounded reverse mathematics , complexity of higher type functions , complexity of analysis , and lower bounds in propositional proof systems . He named
3672-462: The existence of an NP-complete problem can be extended to other computational problems in logic, and to completeness for other complexity classes . The quantified Boolean formula problem (QBF) involves Boolean formulas extended to include nested universal quantifiers and existential quantifiers for its variables. The QBF problem can be used to encode computation with a Turing machine limited to polynomial space complexity , proving that there exists
SECTION 50
#17328693615083744-477: The following table, for all − p ( n ) ≤ i ≤ p ( n ) {\displaystyle -p(n)\leq i\leq p(n)} and 0 ≤ k ≤ p ( n ) {\displaystyle 0\leq k\leq p(n)} : If there is an accepting computation for M {\displaystyle M} on input I {\displaystyle I} , then B {\displaystyle B}
3816-533: The inherent difficulty of computational problems and what can be computed efficiently. Yet, the conjecture remains open and is among the seven famous Millennium Prize Problems . In 1982, Cook received the Turing Award for his contributions to complexity theory. His citation reads: For his advancement of our understanding of the complexity of computation in a significant and profound way. His seminal paper, The Complexity of Theorem Proving Procedures, presented at
3888-438: The input string I {\displaystyle I} . The remaining lines depend only on the input length n {\displaystyle n} and on the machine M {\displaystyle M} ; they formalize a generic computation of M {\displaystyle M} for up to p ( n ) {\displaystyle p(n)} steps. The transformation makes extensive use of
3960-452: 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 . Karp also introduced the notion of completeness used in the current definition of NP-completeness (i.e., by polynomial-time many-one reduction ). Cook and Karp each received
4032-494: The paths between the cities. A nondeterministic Turing machine can find such a route as follows: One can think of each guess as " forking " a new copy of the Turing machine to follow each of the possible paths forward, and if at least one machine finds a route of distance less than k , that machine accepts the input. (Equivalently, this can be thought of as a single Turing machine that always guesses correctly) A binary search on
4104-460: The polynomial p ( n ) {\displaystyle p(n)} . As a consequence, the above proof is not constructive : even if M {\displaystyle M} is known, witnessing the membership of the given problem in NP, the transformation cannot be effectively computed, unless an upper bound p ( n ) {\displaystyle p(n)} of M {\displaystyle M} 's time complexity
4176-440: The possible subsets. As the number of integers that we feed into the algorithm becomes larger, both the number of subsets and the computation time grows exponentially. But notice that if we are given a particular subset, we can efficiently verify whether the subset sum is zero, by summing the integers of the subset. If the sum is zero, that subset is a proof or witness for the answer is "yes". An algorithm that verifies whether
4248-464: The primality of an integer by merely supplying a nontrivial factor. NP and co-NP together form the first level in the polynomial hierarchy , higher only than P. NP is defined using only deterministic machines. If we permit the verifier to be probabilistic (this, however, is not necessarily a BPP machine ), we get the class MA solvable using an Arthur–Merlin protocol with no communication from Arthur to Merlin. The relationship between BPP and NP
4320-412: The problem 3SAT (the Boolean satisfiability problem for expressions in conjunctive normal form (CNF) 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. Garey and Johnson presented more than 300 NP-complete problems in their book Computers and Intractability: A Guide to
4392-445: The problem. It is widely believed, but not proven, that P is smaller than NP , in other words, that decision problems exist that cannot be solved in polynomial time even though their solutions can be checked in polynomial time. The hardest problems in NP are called NP-complete problems. An algorithm solving such a problem in polynomial time is also able to solve any other NP problem in polynomial time. If P were in fact equal to NP, then
SECTION 60
#17328693615084464-506: 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 Misplaced Pages article on NP ). Now suppose that a given problem in NP can be solved by the nondeterministic Turing machine M = ( Q , Σ , s , F , δ ) {\displaystyle M=(Q,\Sigma ,s,F,\delta )} , where Q {\displaystyle Q}
4536-437: The second phase consists of a deterministic algorithm that verifies whether the guess is a solution to the problem. It is easy to see that the complexity class P (all problems solvable, deterministically, in polynomial time) is contained in NP (problems where solutions can be verified in polynomial time), because if a problem is solvable in polynomial time, then a solution is also verifiable in polynomial time by simply solving
4608-429: The set of languages definable by existential second-order logic ( Fagin's theorem ). NP can be seen as a very simple type of interactive proof system , where the prover comes up with the proof certificate and the verifier is a deterministic polynomial-time machine that checks it. It is complete because the right proof string will make it accept if there is one, and it is sound because the verifier cannot accept if there
4680-421: The set of problems that can be solved in polynomial time by a nondeterministic Turing machine . The first definition is the basis for the abbreviation NP; " nondeterministic , polynomial time". These two definitions are equivalent because the algorithm based on the Turing machine consists of two phases, the first of which consists of a guess about the solution, which is generated in a nondeterministic way, while
4752-444: The size of B {\displaystyle B} is O ( log ( p ( n ) ) p ( n ) 3 ) {\displaystyle O(\log(p(n))p(n)^{3})} . Thus the transformation is certainly a polynomial-time many-one reduction, as required. Only the first table row ( T i , j , 0 {\displaystyle T_{i,j,0}} ) actually depends on
4824-445: The steps indicated by the assignments to the variables. There are O ( p ( n ) 2 ) {\displaystyle O(p(n)^{2})} Boolean variables, each encodable in space O ( log p ( n ) ) {\displaystyle O(\log p(n))} . The number of clauses is O ( p ( n ) 3 ) {\displaystyle O(p(n)^{3})} so
4896-400: The verifier on all possible proof strings (this requires only polynomially many steps because it can nondeterministically choose the next character in the proof string in each step, and the length of the proof string must be polynomially bounded). If any proof is valid, some path will accept; if no proof is valid, the string is not in the language and it will reject. Conversely, suppose we have
4968-401: The verifier-based definition of NP, consider the subset sum problem : Assume that we are given some integers , {−7, −3, −2, 5, 8}, and we wish to know whether some of these integers sum up to zero. Here the answer is "yes", since the integers {−3, −2, 5} corresponds to the sum (−3) + (−2) + 5 = 0. To answer whether some of the integers add to zero we can create an algorithm that obtains all
5040-437: The witness proves that the answer is "yes" or "no" in polynomial time otherwise, then Π {\displaystyle \Pi } is in NP. The "no"-answer version of this problem is stated as: "given a finite set of integers, does every non-empty subset have a nonzero sum?". The verifier-based definition of NP does not require an efficient verifier for the "no"-answers. The class of problems with such verifiers for
5112-523: Was denied reappointment. In a speech celebrating the 30th anniversary of the Berkeley electrical engineering and computer sciences department, fellow Turing Award winner and Berkeley professor Richard Karp said that, "It is to our everlasting shame that we were unable to persuade the math department to give him tenure." Cook joined the faculty of the University of Toronto , Computer Science and Mathematics Departments in 1970 as an associate professor, where he
5184-415: Was promoted to professor in 1975 and Distinguished Professor in 1985. During his PhD, Cook worked on complexity of functions, mainly on multiplication. In his seminal 1971 paper "The Complexity of Theorem Proving Procedures", Cook formalized the notions of polynomial-time reduction (also known as Cook reduction ) and NP-completeness , and proved the existence of an NP-complete problem by showing that
#507492