Approximation Algorithms for Weighted Vertex Cover CS 511 Iowa State University November 7, 2010 CS 511 (Iowa State University) Approximation Algorithms for Weighted Vertex Cover November 7, 2010 1 / 14
Weighted Vertex Cover: Problem Definition Input: An undirected graph G = (V, E) with vertex weights w i 0. Problem: Find a minimum-weight subset of nodes S such that every e E is incident to at least one vertex in S. CS 511 (Iowa State University) Approximation Algorithms for Weighted Vertex Cover November 7, 2010 2 / 14
Weighted Vertex Cover: Some Facts WVC is NP-hard. WVC can be 2-approximated. Proved next. A 2-approximation algorithm for WVC does not provide any sort of approximation guarantee for maximum-weight independent set. CS 511 (Iowa State University) Approximation Algorithms for Weighted Vertex Cover November 7, 2010 3 / 14
Weighted Vertex Cover: IP Formulation minimize i V w ix i subject to x i + x j 1 for every edge (i, j) E x i {0, 1} for every vertex i V (1) Observation Any feasible solution x to (1) yields a cover S = {i V : x i = 1}. If x is optimal solution to (1), then S = {i V : xi = 1} is a minimum weight vertex cover. CS 511 (Iowa State University) Approximation Algorithms for Weighted Vertex Cover November 7, 2010 4 / 14
Weighted Vertex Cover: LP Relaxation minimize i V w ix i subject to x i + x j 1 for every edge (i, j) E x i 0 for every vertex i V (2) Observation The optimum value of LP relaxation (2) is at most equal to the optimum value of integer program (1), because the LP has fewer constraints. CS 511 (Iowa State University) Approximation Algorithms for Weighted Vertex Cover November 7, 2010 5 / 14
The LP-Rounding Algorithm 1 Compute the optimum solution x to LP relaxation (2). 2 Let S = {i V : x i 1/2}. 3 Return S. CS 511 (Iowa State University) Approximation Algorithms for Weighted Vertex Cover November 7, 2010 6 / 14
Theorem The LP-Rounding Algorithm is a 2-approximation algorithm for MWVC. Proof. 1 S is a vertex cover. Consider an edge (i, j) E. Since x i + x j 1, either x i 1/2 or x j 1/2 (i, j) is covered. 2 If S is an optimum vertex cover, then w(s) 2w(S ). w(s ) n w i xi i=1 since LP is a relaxation of ILP i S w i x i since S {1,..., n} 1 w i since xi 1/2 for all i S 2 i S = 1 2 w(s) CS 511 (Iowa State University) Approximation Algorithms for Weighted Vertex Cover November 7, 2010 7 / 14
Weighted Vertex Cover: Dual LP maximize subject to e E y e e=(i,j) E y e w i for every node i V y e 0 for every edge e E (3) CS 511 (Iowa State University) Approximation Algorithms for Weighted Vertex Cover November 7, 2010 8 / 14
Intuition for Duality Edge e pays price y e 0 to be covered. Goal: Collect as much money as possible from the edges. Fair price condition: For every i V, y e w i. e=(i,j) E CS 511 (Iowa State University) Approximation Algorithms for Weighted Vertex Cover November 7, 2010 9 / 14
The Dual Gives a Lower Bound Lemma (Fairness Lemma) Let (y 1, y 2,..., y E ) be any feasible solution to the dual LP and S be a minimum-weight vertex cover. Then, y e w(s ). e E e E Proof. Let zd, z P, and z IP, be the optimal objective values of the dual LP, the primal LP, and the primal ILP for WVC. Then, y e zd = dual optimality strong duality z P zip = w(s ). integrality CS 511 (Iowa State University) Approximation Algorithms for Weighted Vertex Cover November 7, 2010 10 / 14
Using Duality Any dual solution y gives a lower bound on the optimal solution to WVC don t need to solve dual to optimality. However, y should be easy to convert into a vertex cover S. Further, S should not be too far from optimum. We can find such a y by a simple and fast method, without using an LP solver. CS 511 (Iowa State University) Approximation Algorithms for Weighted Vertex Cover November 7, 2010 11 / 14
The Pricing Method Definition Vertex i is tight if e=(i,j) E y e = w i. Pricing-Method(G, w) for each e E y e = 0 while there is an edge (i, j) such that neither i nor j are tight select such an edge e increase y e as much as possible while preserving dual feasibility S = {i V : i is tight} return S CS 511 (Iowa State University) Approximation Algorithms for Weighted Vertex Cover November 7, 2010 12 / 14
The Pricing Method: Example Source: Kleinberg & Tardos, Algorithm Design (Fig. 11.8). CS 511 (Iowa State University) Approximation Algorithms for Weighted Vertex Cover November 7, 2010 13 / 14
Theorem The Pricing Method is a 2-approximation algorithm for MWVC. CS 511 (Iowa State University) Approximation Algorithms for Weighted Vertex Cover November 7, 2010 14 / 14
Theorem The Pricing Method is a 2-approximation algorithm for MWVC. Proof. 1 Running time is polynomial. Reason: At least one new node becomes tight after each iteration of while loop. 2 The set S returned is a vertex cover. Reason: At termination, for each edge e = (u, v), at least one of u and v is tight = at least one of u and v is in S. CS 511 (Iowa State University) Approximation Algorithms for Weighted Vertex Cover November 7, 2010 14 / 14
Theorem The Pricing Method is a 2-approximation algorithm for MWVC. Proof. 3 Let S be an optimum vertex cover. Then w(s) 2w(S ). Reason: w(s) = i S w i = i S i V e=(i,j) e=(i,j) = 2 y e e E 2w(S ) y e y e since the nodes in S are tight since S V and y e 0 for all e because each edge is counted twice by the Fairness Lemma CS 511 (Iowa State University) Approximation Algorithms for Weighted Vertex Cover November 7, 2010 14 / 14