NP-Completeness
Definition. A language is NP-hard if for every , and NP-complete if in addition .
An NP-complete problem is a hardest problem in : if any one of them is in then , so they stand or fall together. was the first, by the Cook-Levin theorem, which reduces every language in to it by encoding a machine's computation as a table and asserting its validity with a formula. Every later proof reuses that: to show is NP-complete, show with a certificate and reduce one known NP-complete problem to it, as in Lecture 11. NP-hardness alone does not imply membership in , and an NP-completeness proof shows no algorithm is impossible, only that a fast one would settle P versus NP.