MIT 6.1220 — Lecture 15

Approximation Algorithms (Part I)

Notation. We say that P\mathcal{P} denotes (optimization) problems, PP denotes instances, and Opt(P)\textsc{Opt}(P) denotes the optimal value of an instance PP. We say that A\mathcal{A} denotes algorithms, and A(P)\mathcal{A}(P) denotes the return value of A\mathcal{A} with input PP.

Definition. An algorithm A\mathcal{A} for a minimization problem P\mathcal{P} is an “α\alpha-approximation” (for α1\alpha \geq 1) if, for all instances PP of P\mathcal{P}, we have A(P)αOpt(P)\mathcal{A}(P) \leq \alpha \cdot \textsc{Opt}(P).

Definition. For maximization problems, we have A(P)1αOpt(P)\mathcal{A}(P) \geq \frac{1}{\alpha} \cdot \textsc{Opt}(P) instead. (Always assume α1\alpha \geq 1.)

Problem. (Maximum Matching) Given any graph GG (not necessarily bipartite), find a maximum matching.

Remark. It turns out this is actually in P\textbf{P}. But the point is that the P\textbf{P} algorithm is really complicated, whereas…

Solution. (Maximum Matching) Read the edges in some order; greedily pick edges. This is a 22-approximation.

Proof: The matching found by this algorithm is maximal: no edges can be added.

Claim. Maximal matchings are 22-approximations to maximum matchings.

Proof: Consider the maximum matching MM^* and our maximal matching MM.

No edge from MM^* can be added to MM, so for every eMe^* \in M^*, there is some eMe \in M that disqualifies it.

However, each eMe \in M can disqualify at most two eMe^* \in M^*. So M2M|M^*| \leq 2 \cdot |M|.   \square

The end. Some questions: Why is the constant 22 tight? When do we achieve equality?   \blacksquare

Problem. (Vertex Cover) Given a graph GG, 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 22-approximation.

Remark. When the matching is good, the vertex cover is bad, and vice versa. (!!)

Proof: We claim endpoints of maximal matchings are 22-approximations to minimum vertex covers.

Why are endpoints of maximal matchings vertex covers? Because.

And the bound is easy: for any matching MM, we have SM|S^*| \geq |M|, but S=2M|S| = 2 \cdot |M|.   \blacksquare

Assuming widely-believed conjectures (such as PNP\textbf{P} \neq \textbf{NP}), this is the best constant we can achieve.

Solution. (Vertex Cover, Badly) Greedily pick vertices of maximum degree. It turns out this is an O(logV)O(\log |V|)-approximation algorithm—pretty bad. (Note: O(logV)=O(logE)O(\log |V|) = O(\log |E|) because E=O(V2)|E| = O(|V|^2).)

Proof: Say we start with graph G0G_0, and at iteration ii, we remove the vertex viGi1v_i \in G_{i - 1} with degree did_i, yielding a graph GiG_i with mim_i edges. And say SS^* is a minimum vertex cover.

Notice dimi1Sd_i \geq \frac{m_{i - 1}}{|S^*|}, because edges in Gi1G_{i - 1} map to vertices in SS^* so that each vertex in SS^* gets at most did_i edges.

Therefore, m(11S)Em_{\ell} \leq \left(1 - \frac{1}{|S^*|}\right)^{\ell} \cdot |E|, because removing vertex viv_i removes at least 1S\frac{1}{|S^*|} of all edges in Gi1G_{i - 1}.

Thus, when SlogE\ell \approx |S^*| \cdot \log |E| we have m1m_{\ell} \leq 1, so our vertex cover has size at most SlogE|S^*| \cdot \log|E|, done.   \blacksquare

Remark. We cannot do better than a 22-approximation for vertex cover.

As a (hard!) exercise: show that the α=logV\alpha = \log |V| bound on our vertex-cover approximation algorithm is tight.