Presentation is loading. Please wait.

Presentation is loading. Please wait.

Approximation Algorithms for MAX-MIN tiling Authors Piotr Berman, Bhaskar DasGupta, S. Muthukrishman S. Muthukrishman Published on Journal of Algorithms,

Similar presentations


Presentation on theme: "Approximation Algorithms for MAX-MIN tiling Authors Piotr Berman, Bhaskar DasGupta, S. Muthukrishman S. Muthukrishman Published on Journal of Algorithms,"— Presentation transcript:

1 Approximation Algorithms for MAX-MIN tiling Authors Piotr Berman, Bhaskar DasGupta, S. Muthukrishman S. Muthukrishman Published on Journal of Algorithms, 2003 Presented by Sera Kahruman

2 Outline  Definition  Approximation algorithms Greedy Slice and Dice Greedy Slice and Dice Recursive slice and dice-Binary space partitionings Recursive slice and dice-Binary space partitionings  Conclusion

3 Outline  Definition  Approximation algorithms Greedy Slice and Dice Greedy Slice and Dice Recursive slice and dice-Binary space partitionings Recursive slice and dice-Binary space partitionings  Conclusion

4 Definition Given a 2-dimensional array A[1,…,n][1,…,n] s.t. each A[i][j] stores a non-negative number  A tile is a subarray A[l,…,r][t,…,b] of A  Weight of a tile T, w(T) = sum of all array entries in that tile  A tiling of A is a collection of tiles of A s.t. each entry of A is contained in exactly one tile 22314 1 3 11 2 3 4 512 4 2 136 1 1 31 4

5 Max-Min Tiling Problem Given a weight bound W, find a tiling of A such that: Given a weight bound W, find a tiling of A such that: 1. Each tile is of weight at least W 2. The number of tiles is maximized Max-Min tiling is NP-hard! Data mining…..an application area

6 More definitions  (r, s) approximation of max-min tiling is a solution that produces a tiling of A with at least rp* tiles each of which has weight at least s(W-c) where; p* = max number of tiles used in an optimal solution p* = max number of tiles used in an optimal solution c≥0 is a constant c≥0 is a constant

7 Slice and Dice Technique  Partition the input array into a number of slices (rectangles) using some criteria (depending on the problem)…..slicing step  Search for a better solution by looking at the neighbor slices and repartitioning the entries…..dicing step

8 Outline  Definition  Approximation algorithms Greedy Slice and Dice Greedy Slice and Dice Recursive slice and dice-Binary space partitionings Recursive slice and dice-Binary space partitionings  Conclusion

9 Approximation algorithms for Max-Min tiling  Greedy slice and dice Linear in number of non- zero entries (m) Linear in number of non- zero entries (m) Greedily slice the array into strips and dice each slice Greedily slice the array into strips and dice each slice  Recursive slice and dice: binary space partitionings Use BSP of isothetic rectangles Use BSP of isothetic rectangles Special case : Every cut of BSP is either a vertical or horizontal line Special case : Every cut of BSP is either a vertical or horizontal line (r,s) approx. time A is arbitrary (1\3,1)O(m+n) (4\9,1\3) O(n 7 ) A is binary (1\2,1\4) O(n 7 ) (2\5,1)O(m+n) Results

10 Greedy Slice and Dice Algorithm Observation 1: Given an instance array A of the MAX-MIN tiling problem, let A’ be the array obtained from A in which every element larger than 1 is replaced by 1. Then, any feasible solution for A’ is also a feasible solution for A and vice versa.

11 Greedy Slice & Dice Algorithm Greedy Slice & Dice Algorithm  Scale the array such that W=1 if necessary  After scaling w(A) becomes an upper bound  A good tile is a tile whose weight is at least 1  The algorithm finds a solution with t good tiles Such that w(A)< r*t + 2  Input array : array of row lists where each row i contains an entry (j, x) for each A[i][j]=x > 0 O( m+n) space O( m+n) space m = number of non-zero entries m = number of non-zero entries

12 Slicing Step  Slices are composed of complete rows  Start with the bottom row and proceed upwards  Find minimal slices  Last slice is the remainder slice, others regular

13 Example : Slicing step 0.30.2 0.1 0.40.60.20.1 0.20.50.30.4 0.30.20.30.1 0.20.50.30.4 0.30.20.30.1 0.40.60.20.1 0.30.2 0.1 S1 S3 S2 R4 R3 R2 R1 Compute L and the array t where: L= number of regular slices t[i] = Row index such that Si consists of the rows in between t[i-1] and t[i] Can compute in O(m +n) time!

14 Dicing Step  Partition each slice Si using the slicing algorithm considering columns instead of rows  V-slices (vertical slices) are produced  α(i) = # of V-slices obtained from Si  V i,1, …., V i, α(i) are regular, V i, α(i)+1 remainder  Combine V i, α(i)+1 with V i, α(i) for preliminary partition

15 Example: Dicing step 0.20.5 0.30.2 0.30.4 0.30.1 0.20.50.30.4 0.30.20.30.1 0.40.60.20.1 0.30.2 0.1 0.30.2 0.1 0.20.10.40.6 Done in O(m+ n) time

16 Dicing step : Cont’  Estimate weight of each part w(V L i,j ) < 1 w(V L i,j ) < 1 Summation of all w(V R i,j ) of Si < 1 Summation of all w(V R i,j ) of Si < 1 w(V C i,j ) ≤ 1 w(V C i,j ) ≤ 1 L R C  Split each V-slice V i,j into 3 parts V L i,j : all columns except last V L i,j : all columns except last V R i,j : last column except its topmost element V R i,j : last column except its topmost element V C i,j :topmost element of last column V C i,j :topmost element of last column

17 Cont’  Guarantee an approx. ratio of 4 (use at least floor(w(A))/4 tiles) Proof : Proof : Let t be the # of tiles obtained using the algorithm Let t be the # of tiles obtained using the algorithm w(Si) < 2+ 2α(i) ≤ 4α(i) w(Si) < 2+ 2α(i) ≤ 4α(i) w(A) < 1 + w(S1)+……..+w(SL)w(A) < 1 + w(S1)+……..+w(SL) < 1 + 4*(α(1)+……+ α(L) ) < 1 + 4*t 4*t ≥ floor(w(A))  Do additional dicing to improve the ratio

18 Additional Dicing Step  Each additional dicing on S i-1 US i is done in O(β+2 ) where β is total number non-zeros in S i-1 US i  Total running time still O(m+n)  Define σ(i) =1 if # of tiles increased when S i-1 U S i processed σ(i) =0 ow

19 Cont’  With the additional dicing step, approximation ratio becomes 3. Proof: need to show that t ≥ floor((w(A)+1)/3) w(A) < 3*t + 2 w(S 1 )+……..+w(S L ) < 3*t + 1 need to show : Proved by induction!!! Since

20 Outline  Definition  Approximation algorithms Greedy Slice and Dice Greedy Slice and Dice Recursive slice and dice-Binary space partitionings Recursive slice and dice-Binary space partitionings  Conclusion

21 Recursive Slice & Dice  Based on binary space partitioning of a set of isothetic rectangles  isothetic rectangle = rectangle with edges parallel to principal axes  Given a rectangular region R containing a set of n disjoint isothetic rectangles, a BSP of R consists of recursively partitioning R by a horizontal or vertical line into 2 sub regions and continuing in this manner for all the sub regions until each obtained region has at most 1 rectangle. If a rectangle is cut by a line, it is split into disjoint rectangles  Size(BSP)= # of regions produced  A set of rectangles form a tiling if they partition some rectangular region R.  Use dynamic programming – min size BSP in O(n 5 ) time.

22 Theorems Proof of Theorem 3: Consider an optimal solution OPT using p* tiles. So there exists a BSP of OPT that has at most 2p* regions in which each rectangle of OPT is cut into at most 4 pieces( from thm 2) If a rectangle is cut into i pieces, at least one piece has weight at least W/i. fraction of rectangles which has a weight of at least W/4 = 1/2 fraction of rectangles which has a weight of at least W/3 = 4/9

23 Recursive Slice & Dice How to compute such a BSP of A?  Definitions HBP : Hierarchical binary partition HBP : Hierarchical binary partition An HBP of an array is either the entire array or the unions of HBPs of the two sub arrays of the array. An HBP of an array is either the entire array or the unions of HBPs of the two sub arrays of the array. Γ(I,j,k,l,p) = HBP of the sub array A[ i,.,j ][ k,…,l ] in which there exists p tiles of weight at least s*W. Γ(I,j,k,l,p) = HBP of the sub array A[ i,.,j ][ k,…,l ] in which there exists p tiles of weight at least s*W.  A BSP of OPT is also a HBP of A  Use dynamic programming to find { Γ(1,n,1,n,p) | 0 ≤ p ≤ n2 }

24 Time analysis  There are at most O(n 4 ) sub arrays of A  If the weight of the sub array A[ i,.,j ][ k,..,l ] is at least s*W, then # of ways to construct a HBP of it is # of ways to construct a HBP of it is (j - i) + (l – k ) + 3 ≤ 2n-1…………O( n ) (j - i) + (l – k ) + 3 ≤ 2n-1…………O( n )  0 ≤ p ≤ n 2 Since we are looking for the answer for each p, Since we are looking for the answer for each p, Total running time is O( n 4 * n * n 2 )=O(n 7 )

25 Outline  Definition  Approximation algorithms Greedy Slice and Dice Greedy Slice and Dice Recursive slice and dice-Binary space partitionings Recursive slice and dice-Binary space partitionings  Conclusion

26 Conclusion  Authors introduce two approximation algorithms for MAX-MIN tiling problem using slice and dice technique  They state that efficient approximation algorithms for this problem in higher dimensions can be improved using variations of this approach

27 QUESTIONS ???

28 Homework 1. Formulate MAX-MIN tiling problem as an optimization problem. 2. In the paper, authors also mention MIN- MAX tiling problem. Define MIN-MAX tiling problem and state the main differences between the two problems.


Download ppt "Approximation Algorithms for MAX-MIN tiling Authors Piotr Berman, Bhaskar DasGupta, S. Muthukrishman S. Muthukrishman Published on Journal of Algorithms,"

Similar presentations


Ads by Google