MIT 6.1220 — Lecture 15
Approximation Algorithms (Part I)
Notation. We say that denotes (optimization) problems, denotes instances, and denotes the optimal value of an instance . We say that denotes algorithms, and denotes the return value of with input .
Definition. An algorithm for a minimization problem is an “-approximation” (for ) if, for all instances of , we have .
Definition. For maximization problems, we have instead. (Always assume .)
Problem. (Maximum Matching) Given any graph (not necessarily bipartite), find a maximum matching.
Remark. It turns out this is actually in . But the point is that the algorithm is really complicated, whereas…
Solution. (Maximum Matching) Read the edges in some order; greedily pick edges. This is a -approximation.
Proof: The matching found by this algorithm is maximal: no edges can be added.
Claim. Maximal matchings are -approximations to maximum matchings.
Proof: Consider the maximum matching and our maximal matching .
No edge from can be added to , so for every , there is some that disqualifies it.
However, each can disqualify at most two . So .
The end. Some questions: Why is the constant tight? When do we achieve equality?
Problem. (Vertex Cover) Given a graph , find a minimum vertex cover.
Solution. (Vertex Cover) Use the approximation-maximum-matching algorithm to construct a maximal matching. The vertex cover is the set of all vertices used in a maximal matching. This is a -approximation.
Remark. When the matching is good, the vertex cover is bad, and vice versa. (!!)
Proof: We claim endpoints of maximal matchings are -approximations to minimum vertex covers.
Why are endpoints of maximal matchings vertex covers? Because.
And the bound is easy: for any matching , we have , but .
Assuming widely-believed conjectures (such as ), this is the best constant we can achieve.
Solution. (Vertex Cover, Badly) Greedily pick vertices of maximum degree. It turns out this is an -approximation algorithm—pretty bad. (Note: because .)
Proof: Say we start with graph , and at iteration , we remove the vertex with degree , yielding a graph with edges. And say is a minimum vertex cover.
Notice , because edges in map to vertices in so that each vertex in gets at most edges.
Therefore, , because removing vertex removes at least of all edges in .
Thus, when we have , so our vertex cover has size at most , done.
Remark. We cannot do better than a -approximation for vertex cover.
As a (hard!) exercise: show that the bound on our vertex-cover approximation algorithm is tight.