Science  People  Locations  Timeline
Index: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Home > NP-complete


 Contents
In complexity theory, the NP-complete problems are the most difficult problems in NP, in the sense that they are the ones most likely not to be in P. The reason is that if you could find a way to solve an NP-complete problem quickly, then you could use that algorithm to solve all NP problems quickly. The complexity class consisting of all NP-complete problems is sometimes referred to as NP-C. (A more formal definition is given below. See also Complexity classes P and NP).

One example of an NP-complete problem is the subset sum problem which is: given a finite set of integers, determine whether any non-empty subset of them sums to zero. A supposed answer is very easy to verify for correctness, but no-one knows a significantly faster way to solve the problem than to try every single possible subset, which is very slow.

1 Imperfect solutions

At present, all known algorithms for NP-complete problems require time that is exponential in the problem size. It is unknown whether there are any faster algorithms. Therefore, to solve an NP-complete problem for any nontrivial problem size, one of the following approaches is used:

2 Formal definition of NP-completeness

A decision problem C is NP-complete if

  1. it is in NP and
  2. every other problem in NP is reducible to it.

"Reducible" here means that for every problem L, there is a polynomial-time many-one reduction, a deterministic algorithm which transforms instances lL into instances cC, such that the answer to c is YES if and only if the answer to l is YES.

A consequence of this definition is that if we had a polynomial time algorithm for C, we could solve all problems in NP in polynomial time.

This definition was given by Stephen Cook in 1971. At first it seems rather surprising that NP-complete problems should even exist, but in a celebrated theorem Cook proved that the Boolean satisfiability problem is NP-complete. Since Cook's original results, thousands of other problems have been shown to be NP-complete by reductions from other problems previously shown to be NP-complete; many of these problems are collected in Garey and Johnson's, 1979 book Computers and Intractability: A Guide to NP-completeness.

A problem satisfying condition 2 but not necessarily condition 1 is said to be NP-hardIn computational complexity theory, NP-hard (Non-deterministic Polynomial-time hard) refers to the class of decision problems that contains all problems H such that for all decision problems L in NP there is a polynomial-time many-one reduction to H''..



Read more »

Non User