Approximation Algorithms for Weighted Vertex Cover

Approximation Algorithms for Weighted Vertex Cover CS 511 Iowa State University November 7, 2010 CS 511 (Iowa State University) Approximation Algor...
Author: Gregory Daniels
0 downloads 2 Views 245KB Size
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 wi ≥ 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. I

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 subject to

P

wi xi xi + xj xi

i∈V

≥ 1 for every edge (i, j) ∈ E ∈ {0, 1} for every vertex i ∈ V

(1)

Observation Any feasible solution x to (1) yields a cover S = {i ∈ V : xi = 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 subject to

P

wi xi xi + xj xi

i∈V

≥ 1 for every edge (i, j) ∈ E ≥ 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 : xi∗ ≥ 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

2

S is a vertex cover. Consider an edge (i, j) ∈ E . Since xi∗ + xj∗ ≥ 1, either xi∗ ≥ 1/2 or xj∗ ≥ 1/2 ⇒ (i, j) is covered. If S ∗ is an optimum vertex cover, then w (S) ≤ 2w (S ∗ ). w (S ∗ ) ≥

n X

wi xi∗

since LP is a relaxation of ILP

wi xi∗

since S ⊆ {1, . . . , n}

i=1



X i∈S



1X wi 2

since xi∗ ≥ 1/2 for all i ∈ S

i∈S

1 = w (S) 2 CS 511 (Iowa State University)

Approximation Algorithms for Weighted Vertex Cover

November 7, 2010

7 / 14

Weighted Vertex Cover: Dual LP

maximize subject to

CS 511 (Iowa State University)

P

ye e=(i,j)∈E ye ye e∈E

P

≤ wi ≥ 0

for every node i ∈ V for every edge e ∈ E

Approximation Algorithms for Weighted Vertex Cover

November 7, 2010

(3)

8 / 14

Intuition for Duality

Edge e pays price ye ≥ 0 to be covered. Goal: Collect as much money as possible from the edges. Fair price condition: For every i ∈ V , X ye ≤ wi . 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 (y1 , y2 , . . . , y|E | ) be any feasible solution to the dual LP and S ∗ be a minimum-weight vertex cover. Then, X ye ≤ w (S ∗ ). e∈E

Proof. ∗ , be the optimal objective values of the dual LP, the Let zD∗ , zP∗ , and zIP primal LP, and the primal ILP for WVC. Then, X ∗ ye ≤ zD∗ = zP∗ ≤ zIP = w (S ∗ ). e∈E

dual optimality

CS 511 (Iowa State University)

strong duality

integrality

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

P

e=(i,j)∈E

ye = wi .

Pricing-Method(G , w ) for each e ∈ E ye = 0 while there is an edge (i, j) such that neither i nor j are tight select such an edge e increase ye 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: X w (S) = wi i∈S

=

X X



X X

ye

since the nodes in S are tight

ye

since S ⊆ V and ye ≥ 0 for all e

i∈S e=(i,j)

i∈V e=(i,j)

=2

X

ye

because each edge is counted twice

e∈E

≤ 2w (S ∗ ) CS 511 (Iowa State University)

by the Fairness Lemma

Approximation Algorithms for Weighted Vertex Cover

November 7, 2010

14 / 14

Suggest Documents