Sub topic 14
The P vs NP Question and Why It Matters
This chapter assumes you already know the definitions of P, NP, polynomial-time reductions, and NP-completeness from earlier chapters. It also assumes you know that SAT is NP-complete by the Cook-Levin theorem.
What the Question Asks
Every problem in P is also in NP. If you can solve a problem in polynomial time, you can verify a "yes" answer by solving it again and ignoring the certificate. So P ⊆ NP is known.
The open question is whether the inclusion is strict:
- P = NP would mean that every problem whose "yes" answers can be checked quickly can also be solved quickly.
- P ≠ NP would mean that at least one problem in NP has no polynomial-time algorithm.
NP-completeness reduces the whole question to a single problem. Every NP problem reduces to any NP-complete problem, so a polynomial-time algorithm for any one of them, such as 3-SAT, would put all of NP in P. Proving that one NP-complete problem has no polynomial-time algorithm would settle P ≠ NP.
What Would Follow From Each Answer
| Outcome | Practical consequence |
|---|---|
| P = NP | Scheduling, routing, circuit design, and many other search problems would become efficiently solvable. Searching for short proofs of theorems would become efficient. Public-key cryptography and other schemes that rely on one-way functions would lose their foundation. |
| P ≠ NP | Calling a problem NP-hard would be a proof that no polynomial-time algorithm exists for it. Engineers would be justified in spending their effort on approximations and heuristics instead of hunting for exact fast algorithms. |
Why It Is Still Open
Most researchers believe P ≠ NP. Decades of effort have not produced a fast algorithm for any NP-complete problem. The question is one of the Clay Mathematics Institute's Millennium Prize Problems, which carry a US$1,000,000 award. Several known results show that whole families of proof techniques cannot resolve it:
- Relativization (Baker, Gill, Solovay, 1975). There are oracles relative to which P = NP and others relative to which P ≠ NP. Any proof technique that still works when an oracle is added therefore cannot settle the question.
- Natural proofs (Razborov, Rudich, 1994). A broad class of circuit lower-bound arguments would break widely believed cryptographic assumptions if it could prove P ≠ NP.
- Algebrization (Aaronson, Wigderson, 2008). This barrier extends relativization to algebraic techniques.
A common mistake is to treat a faster exponential algorithm as progress on the question. An algorithm for 3-SAT that runs in O(1.3^n) time is a real improvement, but it is still exponential and says nothing about whether P = NP.
Exercise
A researcher publishes a correct O(n^4) algorithm for Vertex Cover. Which classes collapse, and why does the result reach beyond graph problems?
Show answer
Vertex Cover is NP-complete, so every NP problem reduces to it in polynomial time. Composing a polynomial-time reduction with the O(n^4) algorithm gives a polynomial-time algorithm for every problem in NP. That means NP ⊆ P, and so P = NP. The result covers all of NP, including SAT, Subset Sum, and scheduling problems.
Exercise
Someone proves that Subset Sum has no algorithm faster than 2^(n/2) steps on the worst-case inputs. What does this establish about P vs NP and about cryptography?
Show answer
It proves P ≠ NP, because Subset Sum is in NP but would not be in P. It does not prove that typical or randomly generated instances are hard, so it would not on its own guarantee that a cryptosystem built on the problem is secure.