P vs. NP Problem

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.

P Problem

= the set of problems that are solvable in polynomial time. If the problem has size , the problem should be solved in .

= the set of decision problems solvable in nondeterministic polynomial time. The output of these problems is a YES or NO answer.

Nondeterministic refers to the fact that a solution can be guessed out of polynomially many options in time. If any guess is a YES instance, then the nondeterministic algorithm will make that guess.

In this model of nondeterminism, we can assume that all guessing is done first. This is equivalent to finding a polynomial-time verifier of polynomial-size certificates for YES answers.

Note that there is an asymmetry between YES and NO inputs

A problem is NP-complete if and is NP-hard. See NP-Complete

A problem is NP-hard if every problem reduces to . See NP-Hard

  • If , then .

Remember the diagram that Erik Demaine drew. You have P, and then NP encapsultes P, and then on the other side you have NP-Hard. The vertical line at the intersection of NP and NP-Hard is NP-complete.

A reduction from problem to problem is a polynomial-time algorithm that converts inputs to problem into equivalent inputs to problem . Equivalent means that both problem and problem must output the same YES or NO answer for the input and converted input.

  • If , then
  • If , then
  • If is NP-hard, then is NP-hard.

We can show that problems are NP-complete via the following steps:

  1. Show . Show that by finding a nondeterministic algorithm, or giving a valid verifier for a certificate.
  2. Show is NP-hard. Reduce from a known NP-complete problem to . This is sufficient because all problems can be reduced to , and the reduction demonstrates inputs to can be modified to become inputs to , which implies is NP-hard. We must demonstrate the following properties for a complete reduction. (a). Give an polynomial-time conversion from inputs to inputs. (b) If ’s answer is YES, then ’s answer is YES. (c) If ’s answer is YES, then ’s answer is YES.

Finally, a gadget transforms features in an input problem to a feature in an output problem.

  • 3SAT