NP-Complete Problems
Jim Royer November 6, 2018
Uncredited diagrams are from DPV or homemade. NP-Completeness November 6, 2018 1 / 24
Efficient and Not-So-Efficient Algorithms
Problem spaces tend to be big: A graph on n vertices can have up to nn−2 spanning trees. A graph on n vertices can have Θ(2n) many paths between verts s and t. Etc.
The Good News
In our previous work, out of problems with Θ(2n) (or worse) many choices, we have found the right answer in time O(nk) for some k.
The Bad News
Not all problems are so nice.
NP-Completeness November 6, 2018 2 / 24
Search Problems
Search problems are those of the form: Given: ... Find: ... (usually within a large search space)
Satisfiability (as a search problem)
Given: A boolean formula in conjunctive normal form (CNF). Find: A satisfying assignment for it (if it has one). We need to define some terms.
NP-Completeness November 6, 2018 3 / 24
Propositional Logic
The formulas of propositional logic are given by the grammar: P ::= Var | ¬P | P ∧ P | P ∨ P Var ::= the syntactic category of variables A truth assignment is a function I : Variables → { False, True }. I, a truth assignment, determines the value of a formula by: I[[x]] = True iff I(x) = True (x a variable) I[[¬p]] = True iff I[[p]] = False I[[p ∧ q]] = True iff I[[p]] = I[[q]] = True. I[[p ∨ q]] = True iff I[[p]] = True
- r
I[[q]] = True. A satisfying assignment for a formula p is an I with I[[p]] = True. The only known algorithms for SAT run in exponential time.
NP-Completeness November 6, 2018 4 / 24