Set Cover via LP-Rounding

31
Set Cover via LP-Rounding Yen Fu Chang 張張張張 () Institute of Bioinformatics, National Chiao Tung University [email protected]

description

Set Cover via LP-Rounding. Yen Fu Chang (張演富) Institute of Bioinformatics, National Chiao Tung University [email protected]. Outline. How to formulate the set cover problem into a linear programming LP-relaxation of set cover problem Dual program of set cover problem - PowerPoint PPT Presentation

Transcript of Set Cover via LP-Rounding

Page 1: Set Cover via LP-Rounding

Set Cover via LP-Rounding

Yen Fu Chang(張演富)Institute of Bioinformatics,

National Chiao Tung [email protected]

Page 2: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 2

Outline  

• How to formulate the set cover problem into a linear programming

• LP-relaxation of set cover problem• Dual program of set cover problem• A simple rounding algorithm

• Randomized rounding

• Half-integrality of vertex cover

Page 3: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 3

Set cover problem

• Input: given a set U of n elements, a collection of subset of U,S = { S1,…,Sk }, and a cost function c: S → Q+

• Output: a minimum cost subcollection of S that covers all elements of U

Page 4: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 4

How to formulate the set cover problem into a linear programming• We assign a variable for each set that

is allowed 0/1 value.• This variable will be set to 1 iff set Si is picked in

the set cover.• The constraint is that for each element

we want that at least one of the sets containing it be picked.

isx SSi

Ue

Page 5: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 5

LP-relaxation of set cover problem

(1)

Page 6: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 6

LP-relaxation of set cover problem (cont.)

(2)

The upper bound on xsi is redundant.

Page 7: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 7

Example

Let U = { 1, 2, 3 } and the specified sets be

S1 = { 2, 3 } , S2 = { 1, 3 } , S3 = { 1, 2 }, and each subset has cost 1.minimize

subject to

111 321 sss

1:3

1:2

1:1

21

31

32

ss

ss

ss

• An integral cover must pick two of the subsets for a cost of 2.

• On the other hand, picking each set to the extent of 1/2 gives a fractional cover of cost 3/2.

Page 8: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 10

The idea of LP-rounding

• Apparently the optimal solution for LP(2) is less than or equal to that of LP(1), but it can be obtained in polynomial time because LP(2) is a linear program.

• However, the optimal values are not necessarily integers in LP(2).

• The idea behind the rounding technique is to solve the LP-relaxation of the integer linear programming by a polynomial-time solver, and convert the fractional solution into an integer one.

iSx

Page 9: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 11

Naïve LP-rounding

• All nonzero values are rounded up to 1 in the simplest approach.

• This approach will increase cost by a factor of Ω(n).

Page 10: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 12

Proof of the approximation ratio Ω(n)

• Consider the following instance of the set cover problem:

U={1,2,…n},

S={S1,S2…Sn}, where Si=U \ i,

c(Si)=1,i {1,2,…n}.

and the following setting for the variable :

nin

xiS ,...,2,1,

1

1

Page 11: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 13

Proof of the approximation ratio Ω(n) (cont.)

• The optimal value of objective function is .

• Each xs value is rounded up to 1, so the cost becomes n .

• However, an optimal solution for this instance is obtained by picking any two sets, which has cost of 2.

• Thus, the approximation ratio is Ω(n).

1n

n

Page 12: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 14

A simple LP-rounding algorithm

• Let f be the frequency of the most frequent element of U.

• Theorem: Algorithm 1 achieves an approximation factor of f for the set cover problem.

Page 13: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 15

Example

Let U = { 1, 2, 3 } and the specified sets be

S1 = { 2, 3 } , S2 = { 1, 3 } , S3 = { 1, 2 }, and each subset has cost 1.

• Picking each set to the extent of 1/2 gives a fractional cover of cost 3/2.

• The frequency of most frequent element of U is 2.

• Each element is rounded up to 1. Hence, the rounded cost is 3.

Page 14: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 16

Proof

• Let C be the collection of picked sets, and consider an arbitrary element e.

• Since e is in at most f sets, one of these sets must be picked, and hence C is a valid set cover.

• The rounding process increases by a factor of at most f.

• Therefore, the cost of C is at most f times the cost of the fractional cover.

isx

Page 15: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 17

Randomized LP-rounding

• We consider the fractional values obtained by solving LP-relaxation as probabilities of rounding.

• The problem with this approach is that we can never be sure if we really end up with a valid cover.

• Repeating this process O(logn) times, and picking a set if it is chosen in any of the iterations, we get a set cover with high probability. We provide details in following.

Page 16: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 18

Randomized LP-rounding (cont.)

• Suppose that a occurs in k sets of S, and let the probabilities associated with these sets be p1 ,…,pk.

• The probability that a is covered by C is minimized when each of the pi’s is 1/k.

• Let C be the cover produced in one round. f

SSSSS

SSi OPTcpcSCE

i

iii

i

picked is Pr]cost[

Page 17: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 19

Randomized LP-rounding (cont.)

• Hence each element is covered with constant probability by C.

• To get a valid set cover, independently pick clogn such subcollections, and compute their union, say C’, where c is a constant such that

Page 18: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 20

Randomized LP-rounding (cont.)

• Summing over all elements , we get

• Clearly, .

• By applying Markov’s Inequality with t = OPTf · 4clogn, we get

t

XtX

EPr

Page 19: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 21

Randomized LP-rounding (cont.)

• The probability of the union of two undesirable events is <=1/2, and hence

• Observe that we verify in polynomial time whether C’ satisfies both these conditions. If not, we repeat the entire algorithm.

• The expected number of repetitions is at most 2.

Page 20: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 22

Vertex cover problem

• Input: An undirected graph G=(V,E), and a cost function on vertices c : V→Q+.

• Output:Find a minimum cost vertex cover, that is, a set V’ V such that every edge has at least one endpoint incident at V’.

Page 21: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 23

Linear programming of vertex cover

• The integer program for the vertex cover problem with arbitrary weights is:

• The LP-relaxation of the integer program is:

(4)

(3)

Page 22: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 24

Extreme point solution

• An extreme point solution of a set of linear inequalities is a feasible solution that can not be expressed as convex combination of 2 other feasible solutions.

Page 23: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 25

Half-integrality of vertex cover

• A half-integral solution to LP(4) is a feasible solution in which each variable is 0, 1, or ½.

Page 24: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 26

Lemma

• Let x be a feasible solution to LP(4) that is not half-integral. Then, x is the convex combination of two feasible solution and is therefore not an extreme point solution for the set inequalities in LP(4).

Page 25: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 27

Proof

• Consider the set of vertices for which solution x does not assign half-integral values. Partition this set as follows.

• For ε>0, define the following solutions.

2

10|,1

2

1| vv xvVxvV

otherwisex

Vxx

Vxx

z

otherwisex

Vxx

Vxx

y

v

vv

vv

v

v

vv

vv

v

,

,

,

,

,

,

,

Page 26: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 28

Proof (cont.)

• x is a convex combination of y and z, since

• We will show, by choosing ε>0 small enough, that y and z are both feasible solutions for LP(4),thereby establishing the lemma.

zyx2

1

2

1

Page 27: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 29

Proof (cont.)• Consider the edge constraints:

– xu+xv>1

By choosing εsmall enough, we can ensure that y and z do not violate the constraint for such an edge.

– xu+xv=1

three cases for xu and xv:

(a) xu = xv =1/2;

(b) xu = 0, xv =1;

(c) xuV+ , xv V-;

Page 28: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 30

Proof (cont.)

• In all three cases, for any choice of ε,

(a) xu+xv=yu+yv=zu+zv

(b) xu+xv=yu+yv=zu+zv

(c) yu+yv=xu+ε+xv-ε=xu+xv

zu+zv=xu-ε+xv+ε=xu+xv

xu+xv=yu+yv=zu+zv

The lemma follows.

Page 29: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 31

Proof (cont.)

• This leads to:Theorem

Any extreme point solution for the set of inequalities in LP(4) is half-integral.

Page 30: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 32

Half-integrality of vertex cover

• The theorem directly leads to a factor 2 approximation algorithm for weighted vertex cover: find an extreme point solution, and pick all vertices that are set to half or one in this solution.

Page 31: Set Cover via LP-Rounding

29 June, 2007 Workshop on String Processing and Approximation Algorithms 33

Thank you for your attention.