Presentation is loading. Please wait.

Presentation is loading. Please wait.

Polynomial Time Approximation Schemes Presented By: Leonid Barenboim Roee Weisbert.

Similar presentations


Presentation on theme: "Polynomial Time Approximation Schemes Presented By: Leonid Barenboim Roee Weisbert."— Presentation transcript:

1 Polynomial Time Approximation Schemes Presented By: Leonid Barenboim Roee Weisbert

2 Introduction Approximation Algorithms used to find approximate solutions to optimization problems. often associated with NP-hard problems. since it is unlikely that one can find an efficient polynomial exact solution, a marginal error rate Is allowed in order to get a “close enough” approximation in a polynomial running time.

3 PTAS (Polynomial Time Approximation Scheme) Takes an instance of an optimization problem and a constant parameter ε > 0. Produces a solution that is within a factor 1 + ε of being optimal, in polynomial time. Introduction For example: computing a (1 + 1/100)-approximation of a solution with minimum number of elements: Elements in optimal solution: |opt| in approximation: < 1.01 * |opt|

4 Edge-Coloring Assign colors to edges such that edges that have a common vertex are assigned distinct colors. Computing a solution with minimum number of colors – NP-hard.

5 Edge-Coloring The number of colors in an optimal solution is >  Definition:  – maximum vertex degree.  = 4 Theorem (Vizing, 1964): Any graph is (  +1)-colorable in polynomial time.

6  +4)-Coloring Planar Graphs Planar Graph – no two edges are crossing Fact: |E| < 3|V|. (can be proved using Euler Characteristic.) Therefore, there is a vertex with degree < 6. Otherwise, 2|E| =  v in V deg( v ) > 6|V|.

7  +4)-Coloring Planar Graphs The Algorithm While the graph is not empty: Find a vertex v with degree < 6, and remove it. Add the removed vertices back, in inverse order: For each added vertex: color its adjacent uncolored edges using colors from {1,2,…,  +4}. 1. 2. 3. 4. 5. v G(V / v) G

8  +4)-Coloring Planar Graphs The Algorithm While the graph is not empty: Find a vertex v with degree < 6, and remove it. Add the removed vertices back, in inverse order: For each added vertex: color its adjacent uncolored edges using colors from {1,2,…,  +4}. 1. 2. 3. 4. 5. G(V / v)

9  +4)-Coloring Planar Graphs The Algorithm While the graph is not empty: Find a vertex v with degree < 6, and remove it. Add the removed vertices back, in inverse order: For each added vertex: color its adjacent uncolored edges using colors from {1,2,…,  +4}. 1. 2. 3. 4. 5. G(V / {v, u}) u

10  +4)-Coloring Planar Graphs The Algorithm While the graph is not empty: Find a vertex v with degree < 6, and remove it. Add the removed vertices back, in inverse order: For each added vertex: color its adjacent uncolored edges using colors from {1,2,…,  +4}. 1. 2. 3. 4. 5. G(V / {v, u})

11  +4)-Coloring Planar Graphs The Algorithm While the graph is not empty: Find a vertex v with degree < 6, and remove it. Add the removed vertices back, in inverse order: For each added vertex: color its adjacent uncolored edges using colors from {1,2,…,  +4}. 1. 2. 3. 4. 5. G(V / {v, u}) u

12  +4)-Coloring Planar Graphs The Algorithm While the graph is not empty: Find a vertex v with degree < 6, and remove it. Add the removed vertices back, in inverse order: For each added vertex: color its adjacent uncolored edges using colors from {1,2,…,  +4}. 1. 2. 3. 4. 5. G(V / {v, u}) u w

13  +4)-Coloring Planar Graphs The Algorithm While the graph is not empty: Find a vertex v with degree < 6, and remove it. Add the removed vertices back, in inverse order: For each added vertex: color its adjacent uncolored edges using colors from {1,2,…,  +4}. 1. 2. 3. 4. 5. G(V / {v, u}) u w

14  +4)-Coloring Planar Graphs The Algorithm While the graph is not empty: Find a vertex v with degree < 6, and remove it. Add the removed vertices back, in inverse order: For each added vertex: color its adjacent uncolored edges using colors from {1,2,…,  +4}. 1. 2. 3. 4. 5. G(V / {v, u}) u w

15  +4)-Coloring Planar Graphs The Algorithm While the graph is not empty: Find a vertex v with degree < 6, and remove it. Add the removed vertices back, in inverse order: For each added vertex: color its adjacent uncolored edges using colors from {1,2,…,  +4}. 1. 2. 3. 4. 5. G(V / {v, u}) u w

16  +4)-Coloring Planar Graphs The Algorithm While the graph is not empty: Find a vertex v with degree < 6, and remove it. Add the removed vertices back, in inverse order: For each added vertex: color its adjacent uncolored edges using colors from {1,2,…,  +4}. 1. 2. 3. 4. 5. G(V / {v, u}) u w

17  +4)-Coloring Planar Graphs The Algorithm While the graph is not empty: Find a vertex v with degree < 6, and remove it. Add the removed vertices back, in inverse order: For each added vertex: color its adjacent uncolored edges using colors from {1,2,…,  +4}. 1. 2. 3. 4. 5. v G u w

18 The shifting strategy allows to bound the error of a divide-and-conquer approach by applying it repetitively, and eventually- selecting the most favorable solution. The Shifting Strategy Hochbaum and Mass, 1984

19 Covering with Planar Disks Given: set P of n points in the plane. some numerical value D. Let value l be called the “shifting parameter”. The goal: to cover P ’s points with the minimal number of disks of diameter D. Illustration: D

20 The Shifting Strategy Illustration: Step 1 : Wrapping P’s points with an area we refer as I.

21 Illustration: This is how the optimal solution might look. We’ll refer to It as OPT. The Shifting Strategy

22 Illustration: Step 2 : We subdivide I into vertical stripes of width D. Each stripe is left closed and right open groups of l consecutive stripes. l*D DDD Note: At this point (for better understanding) let’s deal with l =3 and D =1 The Shifting Strategy

23 Illustration: Note 1 : At this point we shall assume that an algorithm (A s ) was given to us. furthermore, this algorithm could yield an optimal solution within the range of a given stripe. l*D The Shifting Strategy

24 Illustration: Note 2 : although an optimal solution could be yielded at any stripe (in separate), their union doesn’t guarantee an optimal solution of entire rectangle’s area. hence – one should consider using Shifts of those stripes, in order to reach as close as he can to OPT. l*D ≠ OPT The Shifting Strategy

25 Illustration: (SHIFT 0) Step 3 : We’ll notice that there are l ways to partition that area to stripes of width l*D. The Shifting Strategy

26 Illustration: (SHIFT 1) Step 3 : We’ll notice that there are l ways to partition that area to stripes of width l*D. The Shifting Strategy

27 Illustration: (SHIFT 2) Step 3 : We’ll notice that there are l ways to partition that area to stripes of width l*D. The Shifting Strategy

28 Algorithm Flow num = ∞ For i = 1 to l // A s (SHIFT i ) is an application of A s on all stripes of SHIFT i num = min(A s (SHIFT i ), num) Return num Note: we claim that this algorithm is a close and good enough approximation of OPT. Let’s prove it!

29 First, let’s take a look on how the union of all Shifts might look: Observation 1: each circle intersects with no more than one vertical line. (!) remember- those lines are left closed and right opened. Approximation Proof

30 Let’s take a look on the different shifts’ results in comparison to OPT: |SHIFT 0 | = 11 |SHIFT 1 | = 9 |SHIFT 2 | = 9 |OPT| = 9 Approximation Proof

31 Observation 2: there exists SHIFT i for some value of i, that contains a number of intersected OPT circles which is < (1/ l * |OPT|). note: in our case it’s less than ((1/3) * 9). Now, let’s take a look on the number of circles from OPT that are being intersected by every Shift’s vertical lines: SHIFT 0 SHIFT 1 SHIFT 2 OPT Approximation Proof

32 Proof: in proof by contradiction we assume that in every SHIFT i, the number of intersected circles (originated from OPT ) is (1/3*|OPT|) We get an immediate contradiction! Intuition: The Pigeonhole Principle. (1/3*|OPT|) OPT SHIFT 1 SHIFT 2 SHIFT 0 Approximation Proof

33 At this point, we’ll take SHIFT 1 that sustains the: (1/3*|OPT|) property. and compare it to OPT by terms of the stripes of this particular SHIFT. OPT A s (SHIFT 1 ) We’ll count the number of circles in every separate stripe (“splits” in OPT will be counted twice!), and come to the conclusion that this SHIFT’s accumulated number should definitely be less than the number of circles we count in OPT. On the other hand, we already proved that this number is (1 +1/3) * |OPT|. Approximation Proof

34 Which proves that by a given algorithm A s we can (and will) get a (1+1 /l)*|OPT| approximation of the optimal solution. or in other words: But… We should produce such algorithm A s, rather than assuming its existence… Σ j∈Sij∈Si | OPT j | min i=1,..., l 1 l 1 + () |OPT| Approximation Proof

35 Exploring Algorithm A s Let’s take a look at a particular stripe in order to understand how A s should work: l*D Assume we can compute an optimal solution in each square, by an algorithm Bs.

36 Exploring Algorithm A s Let’s take a look at a particular stripe in order to understand how A s should work: l*D Assume we can compute an optimal solution in each square, by an algorithm Bs. Apply the shifting techniques with square shifts.

37 Exploring Algorithm A s Let’s take a look at a particular stripe in order to understand how A s should work: l*D Assume we can compute an optimal solution in each square, by an algorithm Bs. Apply the shifting techniques with square shifts.

38 Exploring Algorithm A s Let’s take a look at a particular stripe in order to understand how A s should work: l*D Assume we can compute an optimal solution in each square, by an algorithm Bs. Apply the shifting techniques with square shifts.

39 Exploring Algorithm A s Let’s take a look at a particular stripe in order to understand how A s should work: l*D Assume we can compute an optimal solution in each square, by an algorithm Bs. Apply the shifting techniques with square shifts.

40 Exploring Algorithm A s Let’s take a look at a particular stripe in order to understand how A s should work: l*D Assume we can compute an optimal solution in each square, by an algorithm Bs. Apply the shifting techniques with square shifts.

41 Exploring Algorithm A s Let’s take a look at a particular stripe in order to understand how A s should work: l*D Assume we can compute an optimal solution in each square, by an algorithm Bs. Apply the shifting techniques with square shifts.

42 Exploring Algorithm A s Let’s take a look at a particular stripe in order to understand how A s should work: l*D Assume we can compute an optimal solution in each square, by an algorithm Bs. Apply the shifting techniques with square shifts. Select the shift with minimum number of disks. The solution in a stripe is (1 + 1/ l )-approximation. The entire solution is (1 + 1/ l ) -approximation. 2

43 Optimal Solution in a Square Computed directly using exhaustive search in polynomial time.

44 Optimal Solution in a Square Computed directly using exhaustive search in polynomial time. A square of size l D * l D can be covered with 2 l disks 2 Lemma 1:

45 Optimal Solution in a Square Computed directly using exhaustive search in polynomial time. There is an optimal solution in which each disk with > 2 vertices has two vertices on its boundary. Lemma 2:

46 Optimal Solution in a Square Computed directly using exhaustive search in polynomial time. Lemma 3: Each two points have two options for disk placements.

47 Optimal Solution in a Square Computed directly using exhaustive search in polynomial time. Lemma 3: Each two points have two options for disk placements. Let n = 2 * ( ) n2n2

48 Optimal Solution in a Square Computed directly using exhaustive search in polynomial time. Lemma 3: Each two points have two options for disk placements. Let n = 2 * ( ) n2n2 Total number of combinations: n * (n-1) * … * (n - 2 l ) < n 2 4 l 2

49 Summary Optimal solution in a square in polynomial time (1 +1/ l )-approximation in a stripe in polynomial time (1 + 1 / l ) - approximation in the original area I in polynomial time 2 PTAS for the problem of Covering with Planar Disks For any  there is l such that (1 + 1 / l ) < 1 +  2


Download ppt "Polynomial Time Approximation Schemes Presented By: Leonid Barenboim Roee Weisbert."

Similar presentations


Ads by Google