SAT is in NP
A certificate is a truth assignment. The verifier evaluates every literal in every clause and checks that each clause has a true literal. This takes polynomial time in the formula size.
Complexity algorithms / interactive lesson
Understand both parts of the Cook-Levin theorem: SAT is in NP via polynomial verification, and SAT is NP-hard by encoding accepting polynomial-time computations as satisfiable CNF tableaux.
About the algorithm
The Cook-Levin theorem proves that Boolean satisfiability is NP-complete. The proof has two parts: SAT is in NP because a truth assignment can be checked quickly, and SAT is NP-hard because every NP computation can be encoded as a polynomial-size SAT formula.
A certificate is a truth assignment. The verifier evaluates every literal in every clause and checks that each clause has a true literal. This takes polynomial time in the formula size.
For NP-hardness, take a nondeterministic polynomial-time machine M and input x. A possible accepting computation is written as a tableau: time steps by tape positions. Boolean variables describe the content of each cell.
The formula enforces four families of constraints: each cell has exactly one content, the first row is the initial configuration, some row accepts, and each local window follows M's transition function. The formula is satisfiable exactly when M accepts x.
Code companion
Connect each visual decision to an implementation pattern.
1. SAT in NP:
certificate = truth assignment
verifier checks every clause in polynomial time
2. SAT is NP-hard:
take any L in NP
let M decide L nondeterministically in p(n) time
build formula phi(M, x) whose satisfying assignments encode accepting tableaux
3. Correctness:
x in L <=> M has accepting run on x
<=> legal accepting tableau exists
<=> phi(M, x) is satisfiable