+ All Categories
Home > Documents > Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven...

Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven...

Date post: 13-Jan-2016
Category:
Upload: suzan-mcbride
View: 223 times
Download: 0 times
Share this document with a friend
Popular Tags:
39
Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda
Transcript
Page 1: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

Chapter 8 PD-Method and Local Ratio

(4) Local ratio

This ppt is editored from a ppt of Reuven Bar-Yehuda.

Reuven Bar-Yehuda

Page 2: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

2

Introduction

• The local ratio technique is an approximation paradigm for NP-hard optimization to obtain approximate solutions

• Its main feature of attraction is its simplicity and elegance; it is very easy to understand, and has surprisingly broad applicability.

Page 3: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

3

A Vertex Cover Problem:Network Testing

• A network tester involves placing probes onto the network vertices.

• A probe can determine if a connected link is working correctly.

• The goal is to minimize the number of used probes to check all the links.

Page 4: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

4

A Vertex Cover Problem:Precedence Constrained

Scheduling

• Schedule a set of jobs on a single machine;• Jobs have precedence constraints between

them;• The goal is to find a schedule which

minimizes the weighted sum of completion times.

This problem can be formulated as a vertex cover problem [Ambuehl-Mastrolilli’05]

Page 5: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

5

The Local Ratio Theorem(for minimization problems)

Let w = w1 + w2 . If x is an r-approximate solution for w1 and w2 then x is r-approximate with respect to w as well.

Note that the theorem holds even when negative weights are allowed.

)(/)(

)()(/)(

)()(/)(

ly.respective , and ,for solutions optimal be and ,Let

*

*2

*222

*1

*111

21**

2*1

xwrxw

xwxwrxw

xwxwrxw

wwwxxx

Proof

Page 6: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

6

Vertex Cover example

W = [41, 62, 13, 14, 35, 26, 17]

W1 = [ 0, 0, 0, 14, 14, 0, 0]

W2 = [41, 62, 13, 0, 21, 26, 17]

W = W1 + W2

Weight functions:41

62

14

35

17

26

13

Page 7: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

7

Vertex Cover example (step 1)

= +

41

62

14

35

17

26

13 0 0

14

14

0

0

041

62

0 21

17

26

13

Note: any feasible solution is a 2-approximate solution for weight function W1

Page 8: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

8

Vertex Cover example (step 2)

= +

41

62

0 21

17

26

13 0 0

0 21

0

21

041

62

0 0

17

5

13

Page 9: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

9

Vertex Cover example (step 3)

= +

41

62

0 0

17

5

1341

41

0 0

0

0

0 0 21

0 0

17

5

13

Page 10: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

10

Vertex Cover example (step 4)

= +

0 21

0 0

17

5

13 0 13

0 0

0

0

13 0 8

0 0

17

5

0

Page 11: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

11

Vertex Cover example (step 5)

= +

0 8

0 0

17

5

0 0 8

0 0

12

0

00 0

0 0

5

5

0

Page 12: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

12

Vertex Cover example (step 6)

• The optimal solution value of the VC instance on the left is zero.

• By a recurrent application of the Local Ratio Theorem we are guaranteed to be within 2 times the optimal solution value by picking the zero nodes.

• Opt = 120 Approx = 129

0 8

0 0

12

0

041 62 13

14 35 26

17

Page 13: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

13

1. For each edge {u,v} do:

2. Let = min {w(u), w(v)}.

3. w(u) w(u) - .4. w(v) w(v) - .5. Return {v | w(v) = 0}.

2-Approx VC (Bar-Yehuda & Even 81)

Iterative implementation – edge by edge

Page 14: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

14

Recursive implementation

1. If a zero-cost solution can be found, return one.

2. Otherwise, find a suitable decomposition of w into two weight functions w1 and w2 = w − w1, and solve the problem recursively, using w2 as the weight function in the recursive call.

The Local Ratio Theorem leads naturally to the formulation of recursive algorithms with the following general structure

Page 15: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

15

2-Approx VC (Bar-Yehuda & Even 81)

Recursive implementation – edge by edge

1. VC (V, E, w)

2. If E= return ;

3. If w(v)=0 return {v}+VC(V-{v}, E-E(v), w);

4. Let (x,y)E;

5. Let = min{p(x), p(y)};

6. Define w1(v) = if v=x or v=y and 0 otherwise;

7. Return VC(V, E, w- w1 )

Page 16: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

16

Algorithm Analysis

We prove that the solution returned by the algorithm is 2-approximate by induction on the recursion and by using the Local Ratio Theorem.

1. In the base case, the algorithm returns a vertex cover of zero cost, which is optimal.

2. For the inductive step, consider the solution returned by the recursive call.

By the inductive hypothesis it is 2-approximate with respect to w2.

We claim that it is also 2-approximate with respect to w1 . In fact, every feasible solution is 2-approximate with respect to w1 .

Page 17: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

17

Generality of the analysis

• The proof that a given algorithm is an r-approximation algorithm is by induction on the recursion.

• In the base case, the solution is optimal (and, therefore, r-approximate) because it has zero cost, and in the inductive step, the solution returned by the recursive call is r-approximate with respect to w2 by the inductive hypothesis.

• Thus, different algorithms differ from one Thus, different algorithms differ from one another only in the choice of another only in the choice of ww11, and in the proof , and in the proof that every feasible solution is that every feasible solution is rr-approximate with -approximate with respect to respect to ww11..

Page 18: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

18

The key ingredient

Different algorithms (for different problems), differ from one another only in the decomposition of W, and this decomposition is determined completely by the choice of W1.

W2 = W – W1

Page 19: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

19

The creative part…find r-effective weights

w1 is fully r-effective if there exists a number b such that

b w1 · x r · b

for all feasible solutions x

Page 20: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

20

Framework

Proving this amounts to proving that:

1. b is a lower bound on the optimum value,

2. r ·b is an upper bound on the cost of every feasible solution

…and thus every feasible solution is r-approximate (all with respect to w1).

The analysis of algorithms in our framework boils down to proving that w1 is r-effective.

Page 21: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

21

A different W1 for VC star by star (Clarkson’83)

41

62

16

35

17

26

13

Let x 2 V with minimum " = w(x)d(x)

16/4

16/4

16

16/4

16/4

0

0 37

58

0 31

13

26

13

= +

Let d(x) be the degree of vertex x

Page 22: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

22

A different W1 for VC star by star

Let x 2 V with minimum " = w(x)d(x)

4

0

0b = 4 · is a lower bound on the optimum value,

2 ·b is an upper bound on the cost of every feasible solution

W1 is 2-effective

Page 23: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

23

Another W1 for VChomogeneous (= proportional to the potential coverage)

Let " =minx2Vw(x)d(x)

3 4

4 5

3

3

2 b = |E| · is a lower bound on the optimum value,

2 ·b is an upper bound on the cost of every feasible solution

W1 is 2-effective

Page 24: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

24

Partial Vertex Cover

Input: VC with a fixed number k

Goal: Identify a minimum cost subset of vertices that hits at least k edges

Examples:• if k = 1 then OPT = 13• if k = 3 then OPT = 14• if k = 5 then OPT = 25• if k = 6 then OPT = 14+13

41

62

14

25

17

26

13

Page 25: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

25

w=[41, 62, 13, 14, 25, 26, 17]

w1=[ 0, 0, 0, 14, 14, 0, 0]

w2=[41, 62, 13, 0, 11, 26, 17]w = w1 + w2

Weight functions:

Assume k < |E| (number of edges)Note: any feasible solution is NOTNOT a 2-approximate solution for weight function w1

In VC every edge must be hit by a vertex.In partial VC, k vertices are sufficient. So the optimum for w1 is 0 (k<=5); vice versa the solution that takes for example vertex 4 is infinite many times larger than the optimum

41

62

14

25

17

26

13

Partial Vertex Cover

}

Page 26: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

26

Positive Weight Function

• We do not know of any single subset that must contribute to all solutions.

• To prevent OPT from being equal to 0, we can assign a positive weight to every element.

Page 27: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

27

w=[41, 62, 13, 14, 25, 26, 17]

w1=[ 0, 0, 0, 14, 14, 0, 0]

w2=[41, 62, 13, 0, 11, 26, 17]

w = w1 + w2

Weight functions:

Observe that 14 is NOT a lower bound Observe that 14 is NOT a lower bound of the optimal value!of the optimal value!For example for k=1 then 13 is the optimal value.

41

62

14

25

17

26

13

Positive Weight Function

Page 28: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

28

x

Let d(x) be the degree of vertex xWhat is the amortized cost to hit one edge by using x ?

What is the minimal amortized cost to hit any edge?

Positive Weight Function

)),(min(

)(min

kxd

xwx

bound.lower valida represents "" edges, hit tohave weSince kk

Page 29: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

29

Positive Weight Function W1

w1(x) = · min{ d(x) , k }

For k = 3 then = 14/3

Weight functions (k=3):

w = [41, 62, 13, 14, 25, 26, 17]w1= [14, 14, 28/3, 14, 14, 14, 14]w2= [27, 48, 11/3, 0, 11, 12, 3]

w = w1 + w2

41

62

14

25

17

26

13

Page 30: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

30

Function W1

• [Lower Bound] Every feasible solution costs at least k = 14

• [Upper Bound] There are feasible solutions whose value can be arbitrarily larger than k (e.g. take all the vertices)

• But if you take all the vertices then not all of them are strictly necessary!!

• We can focus on Minimal Solutions!!!

14

14

14

14

14

14

28/3

Page 31: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

31

Minimal Solutions

• By minimal solution we mean a feasible solution that is minimal with respect to set inclusion, that is, a feasible solution whose proper subsets are all infeasible.

• Minimal solutions are meaningful mainly in the context of covering problems (covering problems are problems for which feasible solutions are monotone inclusion-wise, that is, if a set X is a feasible solution, then so is every superset of X; MST is not a covering problem).

Page 32: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

32

Minimal Solutions:r-effective weights

w1 is r-effective if there exists a number b such that

b w1 · x r · b

for all minimal feasible solution x

Page 33: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

33

The creative part…again find r-effective weights

• If we can show that our algorithm uses an r-effective w1 and returns minimal solutions, we will have essentially proved that it is an r-approximation algorithm.

• Designing an algorithm to return minimal solutions is quite easy.

• Most of the creative effort is therefore expended in finding an r-effective weight function (for a small r).

Page 34: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

34

2-effective weight function

1. In terms of w1 every feasible solution costs at least · k 2. In terms of w1 every minimal feasible solution costs at most 2 · · k

Minimal solution = any proper subset is not a feasible solution

)),(min()(1 kxdxw

Page 35: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

35

Proof of 2. (= costs at most 2 · · k )

.2))((22)(*)()(

Hence,

deleted.) becan * ,(otherwise )(

minimal, is Since .)(2

1 Denote

nodes.) least twoat contains :(note .)(*)(Then

).(min*)(such that * Choose

).()()(Then .by hit and ,in

endpoints only with edges ofnumber thedenote )(let ,For

.2)( show tosufficesIt .)( is value

cost theOtherwise, .cost with }{ that ,)),(min(

such that node a contains If .solution minimal aConsider

*}\{ 1*}\{ 11

*}\{ 1

2

*}\{ 11

11

21

kxdttxdxdxd

xkxdt

Cxdt

Cxdxd

xdxdCx

xdxdxdxC

ixdCx

kxdxd

kxCkkxd

xCC

xCxxCxCx

xCx

Cx

xCx

Cx

i

CxCx

Page 36: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

36

Proof of 2. (cont.) xd1(x) = 2d2(x) = 3

Page 37: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

37

The approximation algorithm

Let C be theset of edges and S(x) be theset of edges that arehit by x

Algorithm from Bar-Yehuda et al. “Local Ratio: A Unified Framework for Approximation Algorithms” ACM Computing Surveys, 2004

Page 38: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

38

Algorithm Framework

1. If a zero-cost minimal solution can be found, do: optimal solution.

2. Otherwise, if the problem contains a zero-cost element, do: problem size reduction.

3. Otherwise, do: weight decomposition.

Page 39: Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.

Recommended