508 Design and Analysis of Algorithms
18.1.2 NP-Completeness
If X is in NP and is also NP-hard, then we say that X is complete for NP, or is NP-Complete. If any NP-hard
problem is in P (has a polynomial-time algorithm), then every problem that reduces to it (which means all
of NP) is also in P. There are problems that are NP-hard but not known to be in NP, so we usually restrict
ourselves to NP-complete problems. All NP-complete problems have the same hardness. If any NP-complete
problem is in P, then P = NP.
18.1.3 Consequences of being in P
What are the consequences of A being solvable in polynomial time? If we can show that a known NP-hard
problem reduces to A in polynomial time, then we know A is NP-hard. So if A is solvable in polynomial ...