MIT 6.1220 — Lecture 16

Approximation Algorithms (Part II)

Problem. (Weighted Vertex Cover) Given a graph GG, find a minimum-weight vertex cover.

Solution. (Weighted Vertex Cover) Write the appropriate minimization LP: the variables are {xv}vV\{x_v\}_{v \in V}, the constraints are xv[0,1]x_v \in [0, 1] and xu+xv1x_u + x_v \geq 1 for each (u,v)E(u, v) \in E, and the quantity to be minimized is vVw(v)xv\sum_{v \in V} w(v) \cdot x_v.

Find the optimal solution, then round it: output S={vV:xv0.5}S = \{v \in V: x_v^* \geq 0.5\}.

Proof: Say xx^* is the LP optimal we find, xx is the rounded solution, and SS^* is the vertex-cover optimal.

The proof is in two inequalities. The former holds because rounding incurs at most a factor-of-two increase. The latter holds because all ILP solutions are LP solutions.

vVw(v)xv2vVw(v)xv2vSw(v).\sum_{v \in V} w(v) \cdot x_v \leq 2 \cdot \sum_{v \in V} w(v) \cdot x_v^* \leq 2 \cdot \sum_{v \in S^*} w(v).

You should show xx is a valid solution to begin with. You can also show α=2\alpha = 2 is tight.   \blacksquare

Problem. (Set Cover) Given subsets S1,,SnUS_1, \dots, S_n \subseteq \mathcal{U}, find a cover of U\mathcal{U} using as few subsets as possible.

Solution. (Set Cover) Greedily pick sets covering the most uncovered elements. This is an O(logU)O(\log |\mathcal{U}|)-approximation algorithm—for the same reasons as our bad Vertex Cover approximation algorithm!

(The bad Vertex Cover approximation algorithm never used the fact that edges connect two vertices…)

It turns out that if PNP\textbf{P} \neq \textbf{NP}, then we cannot do better. All of this is true for the weighted case, too.

Problem. (Clique) Find a maximum clique in a graph GG.

Solution. (Clique) Partition VV into nlogn\frac{n}{\log n} subsets {Gi}\{G_i\} of size logn\log n. For each subset GiG_i of size logn\log n, brute-force through every subset of GiG_i to find the maximum clique in GiG_i. Output the largest clique you found.

This is an (nlogn)\left(\frac{n}{\log n}\right)-approximation. Obviously. And this is tight. Obviously.

It turns out that we can't do better.

Remark. Recall that Clique reduces to Vertex-Cover very easily. And Vertex-Cover has a 22-approximation algorithm. Think about that.

Problem. (Max-3-SAT) Given a 33-CNF formula, maximize the number of satisfied clauses.

Assume each clause has three distinct variables, for simplicity.

Solution. (Max-3-SAT) If you output an assignment at random, you get an 87\frac{8}{7}-approximation in expectation.

To guarantee an 87\frac{8}{7}-approximation, assign the variables {xi}i=1n\{x_i\}_{i = 1}^n one at a time, at each point assigning xix_i so that the conditional expected number of clauses satisfied (assuming {xi+1,xi+2,}\{x_{i + 1}, x_{i + 2}, \dots\} are assigned randomly) is largest.

You can prove inductively that this will yield an 87\frac{8}{7}-approximation.   \blacksquare

And, again, we can't do better.