



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The application of primal-dual algorithms to the vertex cover problem in graph theory. The authors introduce the concept of linear programming (lp) relaxation for the vertex cover problem and explain how to formulate it as a matching lp. They then present the primal-dual algorithm for vertex cover and demonstrate its effectiveness through an example. The document also includes proofs of the feasibility and optimality of the algorithm.
Typology: Study notes
1 / 7
This page cannot be seen from the preview
Don't miss anything!




CS787: Advanced Algorithms Scribe: Mayank Maheshwari, Dan Rosendorf Lecturer: Shuchi Chawla Topic: Primal-Dual Algorithms Date: October 19 2007
In the last lecture, we talked about Weak LP-Duality and Strong LP-Duality Theorem and gave the concept of Dual Complementary Slackness (DCS) and Primal Complementary Slackness (PCS). We also analyzed the problem of finding maximum flow in a graph by formulating its LP.
In this lecture, we will develop a 2-approximation for Vertex Cover using LP and introduce the Basic Primal-Dual Algorithm. As an example, we analyze the primal-dual algorithm for vertex cover and later on in the lecture, give a brief glimpse into a 2-player zero-sum game and show how the pay-offs to players can be maximized using LP-Duality.
We will develop a 2-approximation for the problem of weighted vertex cover. So for this problem:
Given: A graph G(V, E) with weight on vertex v as wv.
Goal: To find a subset V ′^ ⊆ V such that each edge e ∈ E has an end point in V ′^ and
v∈V ′^ wv^ is minimized.
The Linear Program relaxation for the vertex cover problem can be formulated as:
The variables for this LP will be xv for each vertex v. So our objective function is
min
v
xvwv
subject to the constraints that
xu + xv ≥ 1 ∀(u, v) ∈ E
xv ≥ 0 ∀v ∈ V
The Dual for this LP can be written with variables for each edge e ∈ E as maximizing its objective function: max
e∈E
ye
subject to the constraints (^) ∑
v:(u,v)∈E
yuv ≤ wu ∀u ∈ V
ye ≥ 0 ∀e ∈ E
Now to make things simpler, let us see how the unweighted case for vertex cover can be formulated in the form of a Linear Program. We have the objective function as:
max
e∈E
ye
such that (^) ∑
e incident on u
ye ≤ 1 ∀u ∈ V
ye ≥ 0 ∀e ∈ E
These constraints in the linear program correspond to finding a matching in the graph G and so the objective function becomes finding a maximum matching in the graph. Hence, this is called the Matching LP.
Now remember from the previous lecture where we defined Dual and Primal Complementary Slack- ness. These conditions follow from the Strong Duality Theorem.
Corollary 15.2.1 (Strong Duality) x and y are optimal for Primal and Dual LP respectively iff they satisfy:
j Aij^ yj^ =^ ci.
i Aij^ xi^ =^ bj^.
are invariants and hence, hold for the algorithm. But the condition that:
might not hold at the beginning of algorithm. x does not satisfy the primal LP as yet.
Now let us consider the primal-dual algorithm for our earlier example of vertex cover.
1
3
4
2
2
4
0
3
1
1
1
0
0
(e) Fig 1: The vertex cover for the example graph.
When all the ye’s get frozen, the algorithm terminates. So the Value of Primal=11 and the Value of Dual=6.
Hence, V alp(x) ≤ 2 V ald(y)
and so we get the 2-approximation for our instance of vertex cover.
Lemma 15.3.1 When the algorithm ends, x is a feasible solution for the primal and y is a feasible solution for the dual.
Proof: That y is a feasible solution is obvious since at every step we make sure that y is a feasible solution, so it is feasible at the last when the algorithm ends. To see that x is a feasible solution we proceed by contradiction. Let us suppose it is not a feasible solution. Then there is a constraint xu + xv ≥ 1 which is violated. That means both xv and xu are zero and thus it must be possible to raise the value of the edge between them since neither of them has a tight bound. This is a contradiction with the fact that all ye’s are frozen.
Lemma 15.3.2 x and y satisfy PCS.
Proof: This is obvious since at every step we make sure that x and y satisfy PCS.
Definition 15.3.3 Let x and y be feasible solutions to the primal and dual respectively. Then we say that x and y satisfy α-approximate DCS if ∀j, (yj 6 = 0) → (
i Aij^ xi^ ≤^ αbj^ ). Lemma 15.3.4 x and y satisfy 2-approximate DCS.
Proof: This follows from the fact that xv is either 0 or 1 for any v so xu + xv ≤ 2 for any e = (u, v).
The next lemma shows us why we would want an α-approximation for DCS.
Lemma 15.3.5 Suppose x and y satisfy PCS are feasible for Primal and Dual respectively and α-approximate DCS then V alP (x) ≤ αV alD(y).
Proof: To prove this we only need to write out the sums. We have V alP (x) =
i cixi^ now since we know that x,y satisfy PCS we have that
i cixi^ =^
i(
j Aij^ yj^ )xi^ by reordering the
summation we get
j (
i Aij^ xi)yj^ ≤^
j αbj^ yj^ =^ α^
j bj^ yj^ =^ αV alD(y) where the^ ≤^ follows from α-approximate DCS.
The last two lemmas then directly yield the desired result which is that our algorithm is a 2- approximation for Vertex cover.
We should also note that we never used anywhere in our analysis what order we choose our edges in or how exactly we raise the values of ye’s. A different approach might be to raise the values of all our ye’s simultaneously until some condition becomes tight. Using this approach with the graph we had earlier would give a different result. We would start by raising the values of all edges to 1 2 at which point the vertex at the bottom of the diamond would become full and it’s tightness condition would be met. We freeze all the edges adjecent to that vertex add it to our vertex cover and continue raising the values of the other ye’s. The next condition to be met will be the left bottom most node when we raise the value of the incoming edge to 1. After that we continue rasing the values of the remaining unfrozen edges until 1^12 when both the left and right edge of the diamond become full and we freeze all the remaining edges. The run of this algorithm with the circled numbers denoting frozen edge capacities and the emptied nodes denoting nodes in the graph cover can be seen in the following figures.
Figure 15.3.1: Step 0
Figure 15.3.2: Step 1
Figure 15.3.3: Step 2
Figure 15.3.4: Step 3
Note that while this approach gives a better result in this case than the first one we used, it is not that case in general. In fact there are no known polynomial time algorithms that give a result of
On the other hand minx(maxy (yT^ Ax)) can be thought of as trying to minimize the loss and can thus be rewritten in terms of an LP-problem in a similar fashion as minimizing s given that
∑
j
xj ≤ 1
and ∀i s −
j
Aij xj ≤ 0
.
In other words, we are trying to minimize the loss, no matter which column our opponent chooses. We leave it as an exercise to prove that the second problem is a dual of the first problem and thus by the Strong duality theorem, the proof is concluded.