Practice Discrete Math

Algorithms / Np Npc Proofs

Least You Need to Know: NP, NP-Completeness Proofs, and Certificate-Based Reasoning

Exam questions on NP and NP-completeness are mostly about precise definitions. You need to separate fast verification from fast solving, know the standard two-part proof template, and move carefully between optimization problems and their decision versions.

The least you need to know

Key notation

P decision problems solvable in polynomial time
NP decision problems with polynomial-time verifiable yes-certificates
NPC problems that are both in NP and NP-hard

Tiny worked example

  • For **Vertex Cover**, the decision version asks whether there is a cover of size at most `k`.
  • A certificate is the proposed set of vertices.
  • Verification checks the set size and whether every edge touches the set.
  • NP-completeness then needs a reduction from a known NP-complete problem, not just a verifier.

Common mistakes

How to recognize this kind of problem

Start practice