2
Coping With NP-Completeness
Q. Suppose I need to solve an NP-complete problem. What should I do?
A. Theory says you're unlikely to find poly-time algorithm.
Must sacrifice one of three desired features.
Solve problem to optimality.
Solve problem in polynomial time.
Solve arbitrary instances of the problem.
This lecture. Solve some special cases of NP-complete problems that
arise in practice.
4
Vertex Cover
VERTEX COVER: Given a graph G = (V, E) and an integer k, is there a
subset of vertices S ⊆ V such that |S| ≤ k, and for each edge (u, v)
either u ∈ S, or v ∈ S, or both.
3
6
10
7
1
5
8
2
4 9
k = 4
S = { 3, 6, 7, 10 }