




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





CS880: Approximations Algorithms
Scribe: Tom Watson Lecturer: Shuchi Chawla Topic: Primal-Dual Method: Vertex Cover and Steiner Forest Date: 3/6/
In the previous few lectures we have seen examples of LP-rounding, a method for obtaining approx- imation algorithms that involves solving a linear programming relaxation of the problem at hand and rounding the solution. In the last lecture we also discussed the basic theory of LP-duality. Today we will apply this theory to obtain a second LP-based technique for obtaining approxima- tion algorithms — the primal-dual method. This technique has the advantage that it circumvents the need to actually solve an LP relaxation, leading to efficient algorithms that are purely com- binatorial. We will apply this technique to the Vertex Cover and Steiner Forest problems. The primal-dual method in the context of approximation algorithms was first used by Goemans and Williamson [1].
Consider the general linear program
minimize cT^ x subject to Ax ≥ b x ≥ 0
where x = (x 1 ,... , xn)T^ is vector of variables, A = (Aij ) is an m × n matrix, and c = (c 1 ,... , cn)T and b = (b 1 ,... , bm)T^. Recall that the dual of this linear program is given by
maximize bT^ y subject to AT^ y ≤ c y ≥ 0
where y = (y 1 ,... , ym)T^ is a vector of variables. The variables in y are in one-to-one correspondence with the constraints of the primal LP, and the variables in x are in one-to-one correspondence with the constraints of the dual LP. In the last lecture we showed that the dual of the dual of an LP is again the original LP. We also proved the following result, stating that the objective value of every feasible solution to the dual lower bounds the objective value of every feasible solution to the primal. We reiterate the proof since it will come in handy later.
Theorem 13.1.1 (Weak Duality Theorem) If x and y are feasible solutions to the primal and dual respectively, then cT^ x ≥ bT^ y.
Proof: We have
cT^ x =
∑^ n
i=
cixi ≥
∑^ n
i=
( (^) ∑m
j=
Ajiyj
xi =
∑^ m
j=
( (^) ∑n
i=
Ajixi
yj ≥
∑^ m
j=
bj yj = bT^ y,
where the two inequalities hold by feasibility of x and y.
We also stated, but did not prove, the following result, which establishes an intimate connection between the primal and dual LPs.
Theorem 13.1.2 (Strong Duality Theorem) The optimal objective value of the primal is finite if and only if the optimal objective value of the dual is finite, and in this case the optimal objective values are equal.
If x and y are optimal solutions to the primal and dual LPs, then Theorem 13.1.2 tells us that cT^ x = bT^ y, and it follows that both inequalities in the proof of Theorem 13.1.1 must hold with equality. That is, ∑n
i=
cixi =
∑^ n
i=
( (^) ∑m
j=
Ajiyj
xi
and (^) m ∑
j=
bj yj =
∑^ m
j=
( (^) ∑n
i=
Ajixi
yj.
Let us consider the first equation. Since
∑m j=1 Ajiyj^ ≤^ ci^ for all^ i, the only way the first equation can hold is if cixi = (
∑m j=1 Ajiyj^ )xi^ for all^ i.^ This is certainly true if^ ci^ =^
∑m j=1 Ajiyj^ for all i, i.e. all dual constraints are tight. However, this is not necessary; even if ci < (
∑m j=1 Ajiyj^ ) for some i, we can still have cixi = (
∑m j=1 Ajiyj^ )xi^ provided^ xi^ = 0.^ Similarly, for all^ j, either yj = 0 or bj =
∑n i=1 Ajixi.^ Conversely, if^ x^ and^ y^ are feasible solutions to the primal and dual respectively such that these conditions hold, then equality holds throughout the proof of Theorem 13.1.1, implying that x and y have the same objective value and are thus both optimal. This proves the following result.
Lemma 13.1.3 Let x and y be feasible solutions to the primal and dual respectively. Then x and y are both optimal if and only the following two conditions hold.
Primal complementary slackness conditions: For i = 1,... , n, either xi = 0 or
∑m j=1 Ajiyj^ =^ ci.
Dual complementary slackness conditions: For j = 1,... , m, either yj = 0 or
∑n i=1 Ajixi^ =^ bj^.
This suggests an approach for finding optimal solutions to the primal and dual LPs: search for feasible solutions satisfying both complementary slackness conditions. We can use this idea to obtain approximation algorithms by searching for feasible solutions satisfying a relaxed version of the complementary slackness conditions. We say that x and y satisfy the α-approximate dual complementary slackness conditions if for j = 1,... , m, either yj = 0 or
∑n i=1 Ajixi^ ≤^ αbj^. That is, when yj 6 = 0, we don’t require the corresponding primal constraint to be tight, but it shouldn’t be too far from being tight. The following lemma is useful for proving approximation guarantees.
Lemma 13.1.4 Suppose x and y are feasible solutions to the primal and dual respectively, satis- fying the primal complementary slackness conditions and the α-approximate dual complementary slackness conditions. Then x is an α-approximate solution to the primal LP.
Proof: We have cT^ x = (AT^ y)T^ x = yT^ Ax ≤ αyT^ b,
Incidentally, if all vertex weights are 1, then the ILP corresponding to this dual LP exactly cap- tures the Maximum Matching problem. Theorem 13.1.1 then tells us that the cardinality of every matching is a lower bound on the size of every vertex cover, which is exactly the lower bound we used to design a 2-approximation algorithm for the unweighted version of Vertex Cover in the first lecture. That algorithm can be viewed as a primal-dual algorithm and the algorithm we are about to describe can be viewed as a generalization.
We begin by giving a high-level overview of the primal-dual method. We assume throughout this discussion that the problem at hand is a minimization problem where both c and b are positive. We start with a dual feasible solution and a primal infeasible solution, typically y = (0,... , 0)T and x = (0,... , 0)T^. These solutions certainly satisfy the primal and dual complementary slackness conditions. We iteratively modify x and y, making x closer to being feasible and y closer to being optimal, while maintaining the dual feasibility of y, the primal complementary slackness conditions, and the α-approximate dual complementary slackness conditions. If we can get to a point where x is feasible, then we can use Lemma 13.1.4 to conclude that x is an α-approximate solution.
A more detailed plan is as follows.
We now show how to employ this method to obtain a 2-approximation algorithm for Vertex Cover. We start out with x = (0,... , 0)T^ , i.e. no vertex is picked, and y = (0,... , 0)T^ , i.e. every edge has a label of 0. We seek to improve the feasibility of the primal, so we pick an arbitrary unsatisfied edge e and raise its label ye until some dual constraint, say the one corresponding to vertex v, goes tight, which is to say the sum of the labels of edges incident with v is exactly the weight of v. The fact that the primal complementary slackness conditions would still be satisfied if we set xv = 1 is a hint that we should pick v to be in the cover. So we set xv = 1, and since increasing the label
of any edge incident with v would violate the dual constraint corresponding to v, we freeze the dual variables associated with these edges. If the constraints corresponding to both endpoints of e go tight at the same time, then we put both of them in the cover and freeze all edges incident with them. Then we repeat the process by picking an unfrozen edge, raising its label until some dual constraint goes tight, putting the corresponding vertex in the cover, and freezing the edges incident with it. We continue until all edges are frozen, and then output the set of vertices v such that xv = 1.
We remark that although we think of the dual variable ye as being raised in continuous time, an implementation of this algorithm just needs to set ye = minv∈e (wv −
e′ 3 v ye′^ ).
Lemma 13.2.2 At termination, y is dual feasible.
Proof: When a dual constraint goes tight, we freeze all dual variables appearing in it, so this constraint cannot be violated.
Lemma 13.2.3 At termination, the primal complementary slackness conditions are satisfied.
Proof: We only set xi = 1 when the corresponding dual constraint is tight.
Lemma 13.2.4 At termination, x is primal feasible.
Proof: Suppose for contradiction that some edge e is not covered by the corresponding vertex cover. Since all frozen edges are incident with picked vertices, it must be the case that e is not frozen. But the algorithm does not terminate with unfrozen edges.
Lemma 13.2.5 At termination, the 2 -approximate dual complementary slackness conditions are satisfied.
Proof: This follows from the fact that for each edge {u, v}, xu ≤ 1 and xv ≤ 1 and therefore xu + xv ≤ 2.
Although trivial to prove, the above lemma dictates our final approximation guarantee.
Theorem 13.2.6 The primal-dual algorithm described above is a 2 -approximation algorithm for Vertex Cover.
Proof: This follows from Lemma 13.1.4 and the previous four lemmas.
We illustrate the behavior of our algorithm on the example in the following figure.
The algorithm may begin by choosing to raise the edge between the vertices of weight 4 and 5. Once the label of this edge hits 4, the constraint corresponding to the vertex of weight 4 goes tight, since the sum of the labels of the edges incident with it is 4 + 0 + 0 = 4. This vertex is picked to be in the cover, and the three edges incident with it become frozen. The algorithm may then pick the edge between the vertices of weight 5 and 6 to raise. Once the label of this edge hits 1, the constraint corresponding to the vertex of weight 5 goes tight, since the sum of the labels of the edges incident with it is 4 + 0 + 1 = 5. This vertex is picked to be in the cover, and the two edges incident with it that weren’t already frozen become frozen. There are now three unfrozen edges; the algorithm may pick the edge between the vertices of weight 2 and 7 to raise. Once the label of
as well as a variable for each path connecting two vertices in the same Si, and constraints enforcing that every pair of vertices in the same Si is connected by some path and that every edge on this path is indeed picked. This yields an ILP with exponentially many constraints. A polynomial-sized ILP can be obtained by expressing the problem as a flow problem, with a different commodity for each pair of vertices in the same Si. We will use an equivalent but more structured formulation with a dual that is simpler to state.
We still have a variable xe for each edge indicating whether it is in the forest, but instead of thinking of pairs of vertices in the same Si as being connected, we think of them as being not disconnected. That is, every cut separating them must contain some picked edge. More formally, for every S ⊆ V such that S ∩ Si 6 ∈ {∅, Si} for some i, we require that xe = 1 for at least one edge e ∈ δ(S) have. Letting S denote the set of all such S, we have the following ILP formulation.
minimize
e∈E cexe subject to
e∈δ(S) xe^ ≥^1 ∀S^ ∈ S xe ∈ { 0 , 1 } ∀e ∈ E
An immediate concern is that the above ILP has exponentially many constraints. However, this serves to illustrate a key point about the primal-dual method: the linear programming formulation of a problem is merely a conceptual tool; the algorithms are purely combinatorial. In this case, our algorithm only ever needs to deal with polynomially many of the primal constraints and dual variables, so the exponential size of the LP formulation is not prohibitive.
We obtain the LP relaxtion for this problem.
minimize
e∈E cexe subject to
e∈δ(S) xe^ ≥^1 ∀S^ ∈ S xe ≥ 0 ∀e ∈ E
For the dual, we introduce a variable yS for each S ∈ S. The dual LP can be written by inspection.
maximize
s∈S yS subject to
S:e∈δ(S) yS^ ≤^ ce^ ∀e^ ∈^ E yS ≥ 0 ∀S ∈ S
Our primal-dual algorithm starts with the primal infeasible solution x = (0,... , 0)T^ and the dual feasible solution y = (0,... , 0)T^. We would like to raise some dual variables, thereby increasing the dual objective, until some dual constraint goes tight, at which time the primal complementary slackness conditions would indicate that it is safe to put the corresponding edge in our forest. For the Vertex Cover problem, we picked a single unsatisfied primal constraint and raised the corresponding dual variable until some dual constraint went tight. The order in which the unsatisfied constraints were picked didn’t affect the final cost much. In the present settting, it turns out that raising one dual variable at a time does not work. The costs for satisfying different constraints can vary
wildly, so ordering matters more. Instead, we raise many dual variables simultaneously until some dual constraint goes tight. This way, we are not focusing on making progress toward satisfying any particular primal constraint, but rather taking a more global perspective.
Another difference between our Vertex Cover algorithm and the current example is that we are not able to guarantee that the α-approximate dual complementary slackness conditions are satisfied. But nevertheless we can show that our algorithm yields a 2-approximate solution, by a similar ar- gument to the one used to show that if the 2-approximate dual complementary slackness conditions are satisfied then the resulting solution is 2-approximate. In particular, we will show that these constraints hold “on average”.
We will see more details about this algorithm in the next lecture. We will also see a primal-dual algorithm for the Facility Location problem.
[1] M. X. Goemans and D. P. Williamson. A General Approximation Technique for Constrained Forest Problems. In SIAM Journal on Computing, 24, 1995, pp. 296-317.