Overview
Briefly, P is the class of problems that can be solved deterministically in polynomial time. Class P is important because (a) it is invariant over all reasonable models of computation and (b) practical problems in P have efficient (low-degree polynomial) algorithms. Important examples of problems in P include context-free language recognition, primarily testing, matrix multiplication and inversion, linear programming, finding shortest paths and minimal spanning trees in graphs, and finding convex hulls and Voronoi diagrams.
Briefly, NP is the class of problems that can be verified deterministically in polynomial time. Equivalently, NP is the class of problems that can be solved nondeterministically in polynomical time. The class NP is also invariant over all reasonable models of computation. Clearly, P ⊆ NP, but is not known whether or not P = NP.
Problem P1 is polynomially reducible to problem P2 (P1 ≤PP2) if there exists a
polynomial-time algorithm that transforms every instance I1 of P1 to an instance I2
of P2 such that the answer to I1 is ”yes” (I1
P1) if and only if the answer to I2 is
”yes” (I2
P2).
Note. The relation ≤P is transitive: P1 ≤P P2 and P2 ≤P P3 implies P1 ≤P P3. This follows from the fact that the composition of two polynomial functions is another polynomial function.
Note. If P1 ≤PP2 and P2
P, then P1
P. To solve an instance of P1 in
polynomial time, first transform it to an instance of P2 in polynomial time, and then
use the polynomial-time decision procedure for P2. Note. If P1 ≤PP2 and P1 ⁄
P,
then P2 ⁄
P. This follows immediately from the previous note, and provides a way to
prove that problems are impracticable (not in P). If P1 ≤PP2, we say that P2 is at
least as hard as P1.
Def. Problem P is NP-complete if:
NP, and
NP is polynomially reducible to P.That is, a problem is NP-complete if it is in NP and it is at least as hard as every problem in NP. Note. If P1 is NP-complete and P1 ≤PP2, then P2 is NP-complete. Note. If some NP-complete problem is in P, then P = NP. Proof. By an above note, every problem in NP is also in P, and, by definition, P ⊆ NP. This provides a potential way to settle the P = NP question. It shows that, if P≠NP, then the set P and the set of NP-complete problems are disjoint.
Algorithm C(s, t) is a certifier for problem X, if for an string s, s
X, if and only
if, there exists a string t, such that C(s, t) = True.
Polynomial time: Algorithm A runs in polynomial time, if for every string s, A(s) terminates in ≤ P(|s|) steps, where P() is a polynomial. So, all problems in P have polynomial time certifier.
Non-deterministic Polynomial: The class of decision problems that have a polynomial time certifier, such that
Theorem 4.11.2.1. NP Completeness Problem XYZ is NP complete, XY Z
NPComplete, if
NP
We need item 1 and either 2 or 3 hold.
Strategy
There are three major kinds of strategies:
List of NP Complete Problems
[1] Thomas Corman, Charlies Leiserson, Ronald Rivest and Clifford Stein, Introduction to Algorithm, 2001
[2] Robert Sedgewick, Algorithms in C, 2002
[3] Daniel Friedman, Mitchell Wand and Christopher Haynes, Essentials of Programming Languages, 2001
[4] Silberschatz Galvin Gagne, Operating System Concepts, 6th Ed, 2003
[5] Stuart Russell and Peter Norvig, Artificial Intelligence: A Modern Approach, 2003