The Theory of NP-Completeness