Packing Rectangles into Bins Nikhil Bansal (CMU) Joint with Maxim Sviridenko (IBM)

Slides:



Advertisements
Similar presentations
Alexander Kononov Sobolev Institute of Mathematics Siberian Branch of Russian Academy of Science Novosibirsk, Russia.
Advertisements

On allocations that maximize fairness Uriel Feige Microsoft Research and Weizmann Institute.
Minimum Clique Partition Problem with Constrained Weight for Interval Graphs Jianping Li Department of Mathematics Yunnan University Jointed by M.X. Chen.
Minimum Vertex Cover in Rectangle Graphs
1 Cutting Plane Technique for Solving Integer Programs.
Approximation Algorithms for Capacitated Set Cover Ravishankar Krishnaswamy (joint work with Nikhil Bansal and Barna Saha)
1 of 56 Linear Programming-Based Approximation Algorithms Shoshana Neuburger Graduate Center, CUNY May 13, 2009.
Polynomial Time Approximation Schemes Presented By: Leonid Barenboim Roee Weisbert.
Approximation Algorithms Chapter 5: k-center. Overview n Main issue: Parametric pruning –Technique for approximation algorithms n 2-approx. algorithm.
1/17 Optimal Long Test with One Free Bit Nikhil Bansal (IBM) Subhash Khot (NYU)
The Stackelberg Minimum Spanning Tree Game Jean Cardinal · Erik D. Demaine · Samuel Fiorini · Gwenaël Joret · Stefan Langerman · Ilan Newman · OrenWeimann.
PTAS for Bin-Packing. Special Cases of Bin Packing 1. All item sizes smaller than Claim 1: Proof: If then So assume Therefore:
Complexity 16-1 Complexity Andrei Bulatov Non-Approximability.
Bin Packing With Fragile Objects Nikhil Bansal (CMU) Joint with Zhen Liu (IBM) & Arvind Sankar(MIT)
Parameterized Approximation Scheme for the Multiple Knapsack Problem by Klaus Jansen (SODA’09) Speaker: Yue Wang 04/14/2009.
1 Optimization problems such as MAXSAT, MIN NODE COVER, MAX INDEPENDENT SET, MAX CLIQUE, MIN SET COVER, TSP, KNAPSACK, BINPACKING do not have a polynomial.
AT&T Labs1 The Sensor Cover Problem Alon Efrat (U. Arizona) Adam Buchsbaum (AT&T Labs) Shaili Jain (Harvard) Suresh Venkatasubramanian (AT&T Labs) Ke Yi.
Primal-Dual Algorithms for Connected Facility Location Chaitanya SwamyAmit Kumar Cornell University.
Approximation Algorithms for MAX-MIN tiling Authors Piotr Berman, Bhaskar DasGupta, S. Muthukrishman S. Muthukrishman Published on Journal of Algorithms,
1 Introduction to Approximation Algorithms Lecture 15: Mar 5.
(work appeared in SODA 10’) Yuk Hei Chan (Tom)
10/31/02CSE Greedy Algorithms CSE Algorithms Greedy Algorithms.
Chip Planning 1. Introduction Chip Planning:  Deals with large modules with −known areas −fixed/changeable shapes −(possibly fixed locations for some.
Minimizing Flow Time on Multiple Machines Nikhil Bansal IBM Research, T.J. Watson.
LP formulation of Economic Dispatch
A tale of 2-dimensional (Guillotine) bin packing Nikhil Bansal (IBM) Andrea Lodi (Univ. of Bologna, Italy) Maxim Sviridenko (IBM)
Paging for Multi-Core Shared Caches Alejandro López-Ortiz, Alejandro Salinger ITCS, January 8 th, 2012.
10/31/02CSE Greedy Algorithms CSE Algorithms Greedy Algorithms.
Dana Moshkovitz, MIT Joint work with Subhash Khot, NYU.
Improved results for a memory allocation problem Rob van Stee University of Karlsruhe Germany Leah Epstein University of Haifa Israel WADS 2007 WAOA 2007.
Minimizing Makespan and Preemption Costs on a System of Uniform Machines Hadas Shachnai Bell Labs and The Technion IIT Tami Tamir Univ. of Washington Gerhard.
1 The Santa Claus Problem (Maximizing the minimum load on unrelated machines) Nikhil Bansal (IBM) Maxim Sviridenko (IBM)
 Optimal Packing of High- Precision Rectangles By Eric Huang & Richard E. Korf 25 th AAAI Conference, 2011 Florida Institute of Technology CSE 5694 Robotics.
LP-based Algorithms for Capacitated Facility Location Chaitanya Swamy Joint work with Retsef Levi and David Shmoys Cornell University.
Graph Coalition Structure Generation Maria Polukarov University of Southampton Joint work with Tom Voice and Nick Jennings HUJI, 25 th September 2011.
Why is bin packing interesting?
Round and Approx: A technique for packing problems Nikhil Bansal (IBM Watson) Maxim Sviridenko (IBM Watson) Alberto Caprara (U. Bologna, Italy)
Approximation schemes Bin packing problem. Bin Packing problem Given n items with sizes a 1,…,a n  (0,1]. Find a packing in unit-sized bins that minimizes.
Design Techniques for Approximation Algorithms and Approximation Classes.
Approximating Minimum Bounded Degree Spanning Tree (MBDST) Mohit Singh and Lap Chi Lau “Approximating Minimum Bounded DegreeApproximating Minimum Bounded.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
© 2009 IBM Corporation 1 Improving Consolidation of Virtual Machines with Risk-aware Bandwidth Oversubscription in Compute Clouds Amir Epstein Joint work.
Approximation schemes Scheduling problems. Polynomial Time Approximation Scheme (PTAS) Let Π be a minimization problem. An approximation scheme for problem.
Primal-Dual Algorithms for Connected Facility Location Chaitanya SwamyAmit Kumar Cornell University.
© 2010 AT&T Intellectual Property. All rights reserved. AT&T and the AT&T logo are trademarks of AT&T Intellectual Property. Case Studies: Bin Packing.
Speaker: Yoni Rozenshein Instructor: Prof. Zeev Nutov.
Approximation algorithms for TSP with neighborhoods in the plane R 郭秉鈞 R 林傳健.
Approximation Schemes Open Shop Problem. O||C max and Om||C max {J 1,..., J n } is set of jobs. {M 1,..., M m } is set of machines. J i : {O i1,..., O.
On the Approximability of Geometric and Geographic Generalization and the Min- Max Bin Covering Problem Michael T. Goodrich Dept. of Computer Science joint.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Outline Introduction Minimizing the makespan Minimizing total flowtime
1/19 Minimizing weighted completion time with precedence constraints Nikhil Bansal (IBM) Subhash Khot (NYU)
Operational Research & ManagementOperations Scheduling Economic Lot Scheduling 1.Summary Machine Scheduling 2.ELSP (one item, multiple items) 3.Arbitrary.
New algorithms for Disjoint Paths and Routing Problems
The full Steiner tree problem Theoretical Computer Science 306 (2003) C. L. Lu, C. Y. Tang, R. C. T. Lee Reporter: Cheng-Chung Li 2004/06/28.
The bin packing problem. For n objects with sizes s 1, …, s n where 0 < s i ≤1, find the smallest number of bins with capacity one, such that n objects.
1 Approximation algorithms Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij TexPoint fonts used in EMF. Read the TexPoint manual.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Feb 23, 2010 University of Liverpool Minimizing Total Busy Time in Parallel Scheduling with Application to Optical Networks Michele Flammini – University.
Instructor: Shengyu Zhang 1. Optimization Very often we need to solve an optimization problem.  Maximize the utility/payoff/gain/…  Minimize the cost/penalty/loss/…
Approximation Algorithms based on linear programming.
TU/e Algorithms (2IL15) – Lecture 11 1 Approximation Algorithms.
Chart Packing Heuristic
Algorithms for Routing Node-Disjoint Paths in Grids
Computability and Complexity
k-center Clustering under Perturbation Resilience
Chapter 6. Large Scale Optimization
PTAS for Bin-Packing.
Bin Packing Michael T. Goodrich Some slides adapted from slides from
Chapter 6. Large Scale Optimization
Presentation transcript:

Packing Rectangles into Bins Nikhil Bansal (CMU) Joint with Maxim Sviridenko (IBM)

2/61 Problem Given: Collection of rectangles (by height, width) Goal : Pack in min # of unit square bins  Rectangles parallel to bin edges  Cannot be rotated Rectangles Bins

3/61 Problem Given: Collection of rectangles (by height, width) Goal : Pack in min # of unit square bins  Rectangles parallel to bin edges  Cannot be rotated d Bin Packing Rectangles

4/61 Motivation Many Applications: Real World packing of (real world) bins  Placing ads in newspapers  Cloth cutting: Minimizing sheets to buy  Truck Loading  Memory allocation in paging systems ……

5/61 1-d Bin Packing Special case of 2-d packing 1-dim bin packing: Collection of intervals with length in [0,1], Pack into min # of unit bins !

6/61 1-d Bin Packing Special case of 2-d packing 1-dim bin packing: Collection of intervals with length in [0,1], Pack into min # of unit bins (NP-Hard) !

7/61 Approximation algorithms An algorithm is a  approximation (  > 1) if  runs in polynomial time  Value of solution ·  Opt Opt: value of optimum solution Polynomial time approximation scheme (PTAS) is a family of 1+  approximation algorithms for every  > 0. E.g., Running Time

8/61 1-d bin packing: Inapproximability Cannot get a poly time approximation < 3/2 Partition problem (NP-Hard): Given s 1,…,s n, S= s 1 +s 2,…,s n 9 a subset of elements that sums to exactly S/2 ? S/2 s1s1 s6s6 s2s2 s5s5 s3s3 s4s4 But maybe can get Opt + 1 in poly time ?

9/61 Asymptotic PTAS Alg · (1+  ) Opt + f(  ) f(  ) depends only on  e.g. (1/  ) (1/  ) For 1-d bin packing: Alg · (1+  ) Opt + O(1/  2 ) [de la Vega, Lueker 81]

10/61 Outline Introduction APTAS for 1-d packing [de la Vega, Lueker 81] Results for 2-d packing Conclusions

11/61 APTAS for 1-d bin packing Theorem: [de la Vega, Lueker 81] Alg(I) · Opt(I)/(1-  ) + 1/  2 ¼ Opt(I) (1+  ) + f(  ) !

12/61 Main idea Simplify Original instance I -> I’  I’: easy to solve  Solutions of I and I’ close (within 1+  )

13/61 Ideas applied to 1-d packing ·  : Small ¸  : Big 1) I ! I’ with 1/  2 different big sizes & solns. within 1+  2) I’ easy: If k= O(1) different big sizes, can get Opt + k

14/61 1-d: Rounding to a simpler instance 0 1 I Various object sizes

15/61 1-d: Rounding to a simpler instance I b : I restricted to bigs. Let b = # of bigs (i.e. ¸  ) 0 1  IbIb 1 Various object sizes

16/61 1-d: Rounding to a simpler instance Partition big into 1/  2 groups, each group has b ¢  2 objects 0 1  IbIb I b : I restricted to bigs. Let b = # of bigs (i.e. ¸  ) (here b ¢  2 =3)

17/61 1-d: Rounding to a simpler instance Partition big into 1/  2 groups, each group has b ¢  2 objects Instance I’ b : Ignore largest b ¢  2 objects. Round up sizes to smallest size in next higher group 0 1  0 1  I’ b IbIb I b : I restricted to bigs. Let b = # of bigs (i.e. ¸  )

18/61 1-d: Rounding to a simpler instance Partition big into 1/  2 groups, each group has b ¢  2 objects Instance I’ b : Ignore largest b ¢  2 objects. Round up sizes to smallest size in next higher group Alg(I’ b ) · Alg(I b ) 0 1  0 1  I’ b IbIb I b : I restricted to bigs. Let b = # of bigs (i.e. ¸  )

19/61 1-d: Rounding to a simpler instance Partition big into 1/  2 groups, each group has b ¢  2 objects Instance I’ b : Ignore largest b ¢  2 objects. Round up sizes to smallest size in next higher group Alg(I b ) · Alg(I’ b ) + b   0 1  I’ b IbIb I b : I restricted to bigs. Let b = # of bigs (i.e. ¸  )

20/61 1-d: Rounding to a simpler instance Partition big into 1/  2 groups, each group has b ¢  2 objects Instance I’ b : Ignore largest b ¢  2 objects. Round up sizes to smallest size in next higher group Alg(I’ b ) · Alg(I b ) · Alg(I’ b ) + b   0 1  I’ b IbIb I b : I restricted to bigs. Let b = # of bigs (i.e. ¸  )

21/61 1-d: Rounding to a simpler instance Partition big into 1/  2 groups, each group has b ¢  2 objects Instance I’ b : Ignore largest b ¢  2 objects. Round up sizes to smallest size in next higher group Alg(I’ b ) · Alg(I b ) · Alg(I’ b ) + b  2 Opt(I b ) ¸ b  ) b  2 ·  Opt(I b ) 0 1  0 1  I’ b IbIb I b : I restricted to bigs. Let b = # of bigs (i.e. ¸  )

22/61 1-d: Solving the “few and big” case I’ b : 1/  2 different sizes > . Call these s 1,…,s k. Configuration: A way to pack a bin ( Eg: C = [3 s 1, 17 s 3, 5 s 18 ] ) |Configurations| · (1/  2 ) 1/  = O(1) x i : # of bins with configuration i n j : # of objects of size s j in instance c ij : # of objects of size s j in configuration i. Minimize  i x i  i c ij x i ¸ n j 8 j 2 [1,..,1/  2 ] x i ¸ 0 8 i, x i 2 Z IP for I’ b

23/61 1-d: “Few and Big” using LP Minimize  i x i  i c ij x i ¸ n j 8 j 2 [1,..,1/  2 ] x i ¸ 0 (Relaxed to be fractional) Clearly, LP (I b ’) · OPT(I b ’) x i could be fractional. Round up to next integer ( Eg: > 18) Adds · # configurations = (1/  2 ) 1/  = O(1) In fact, adds · 1/  2 (non-zero x i ’s in basic soln)

24/61 1-d: Filling in the smalls So, Alg(I b ) · Opt(I)/(1-  ) + 1/  2 Packing smalls:  In each bin, fill as many smalls as possible.  If bins not enough, open new bins to fill smalls. Proof:  If no new bins opened, done.  If new bins opened, all bins (except maybe last) filled 1-  So, Alg(I) · Area(I)/(1-  ) + 1 · Opt(I)/(1-  ) + 1

25/61 1-d: Overview 0) Partition into small and big 1) Pack small objects later 2) Round large objects to O(1) sizes. Solve the “few and big” case almost optimally.

26/61 Outline Introduction APTAS for 1-d packing [de la Vega, Lueker 81] Results for 2-d packing Conclusions

27/61 Outline Introduction APTAS for 1-d packing [de la Vega, Lueker 81] Results for 2-d packing  Square packing problem  General rectangle packing problem Conclusions

28/61 Square Packing Problem Given a collection of squares (hypercubes for d>2) Pack into min # of unit bins !

29/61 Square Packing: Previous Work 2-dim: [Chung, Garey, Johnson 82] …… [Epstein, van Stee 03] d-dim: (3/2) d [Coppersmith, Raghavan 89] …… 2-(2/3) d [Kohayakawa et al 02] We give an APTAS (i.e., Alg(I) · 1+  Opt(I) + f(  ) )

30/61 Outline Introduction APTAS for 1-d packing [de la Vega, Lueker 81] Results for 2-d packing  Square packing problem O(1) Approximation APTAS  General rectangle packing problem Conclusions

31/61 O(1) Approximation: Square Packing Opt ¸ Total area of squares in I. If we can use constant fraction of area in each bin ) O(1) approximation. Eg: If use ¸ 1/100 th area in each bin ) 100 approx

32/61 O(1) approximation: Square Packing If big (length ¸ 1/3), put in its own bin. Use ¸ 1/9 th area. Big uses > 1/9 th area Need a way to pack small objects efficiently.

33/61 Shelf Packing Given a rectangular region of size a £ b Goal: Pack squares of length · s a b

34/61 Shelf Packing Given a rectangular region of size a £ b Goal: Pack squares of length · s Algorithm: Decreasing size shelf packing. 1 3 a b 2 Take squares in decreasing size Place sequentially

35/61 Shelf Packing Given a rectangular region of size a £ b Goal: Pack squares of length · s Algorithm: Decreasing size shelf packing. 1 3 a b 2 Take squares in decreasing size Place sequentially If next does not fit, open a new shelf

36/61 Shelf Packing Given a rectangular region of size a £ b Goal: Pack squares of length · s Algorithm: Decreasing size shelf packing a b Take squares in decreasing size Place sequentially If next does not fit, open a new shelf

37/61 Shelf Packing Given a rectangular region of size a £ b Goal: Pack squares of length · s Algorithm: Decreasing size shelf packing a b Take squares in decreasing size Place sequentially If next does not fit, open a new shelf

38/61 Shelf Packing Given a rectangular region of size a £ b Goal: Pack squares of length · s Algorithm: Decreasing size shelf packing. Wasted Space · s(a+b) a b

39/61 Shelf Packing Given a rectangular region of size a £ b Goal: Pack squares of length · s Algorithm: Decreasing size shelf packing. Wasted Space · s(a+b) Right side: At most s £ a a b

40/61 Shelf Packing Given a rectangular region of size a £ b Goal: Pack squares of length · s Algorithm: Decreasing size shelf packing. Wasted Space · s(a+b) Right side: At most s £ a Top · s 16 b a b

41/61 Shelf Packing Given a rectangular region of size a £ b Goal: Pack squares of length · s Algorithm: Decreasing size shelf packing. Wasted Space · s(a+b) Right side: At most s £ a Top · s 16 b Shelf 1: (s 1 –s 3 ) b a b

42/61 Shelf Packing Given a rectangular region of size a £ b Goal: Pack squares of length · s Algorithm: Decreasing size shelf packing. Wasted Space · s(a+b) Right side: At most s £ a Top · s 16 b Shelf 1: (s 1 –s 3 ) b Shelf 2: (s 4 – s 8 ) b … a b

43/61 Shelf Packing Given a rectangular region of size a £ b Goal: Pack squares of length · s Algorithm: Decreasing size shelf packing. Wasted Space · s(a+b) Right side: At most s £ a Top · s 16 b Shelf 1: (s 1 –s 3 ) b Shelf 2: (s 4 – s 8 ) b …. Adding all, at most (s 1 -s 16 ) b a b

44/61 Square Packing: Packing Smalls If all squares · s, waste in a £ b region · s(a+b) If a=b=1, s · 1/3 ) Waste · 2/3 O(1) approximation follows.

45/61 Outline Introduction APTAS for 1-d packing [de la Vega, Lueker 81] Results for 2-d packing  Square packing problem O(1) Approximation APTAS  General rectangle packing problem Conclusions

46/61 Square Packing 0 1 Squares with various lengths

47/61 Square Packing  0 =1 0 11 mm  1/   m+1 22 …… G0G0 G1G1 GmGm G 1/  -1

48/61 Square Packing  0 =1 0 11 mm  1/   m+1 22 …… G0G0 G1G1 GmGm G 1/  -1 G m =[  m+1,  m ) be such that area ·  (total area) Small Big Medium

49/61 Square Packing  0 =1 0 11 mm  1/   m+1 22 …… G0G0 G1G1 GmGm G 1/  -1 Pack medium in separate bins using O(1) approx Adds at most O(  ) to the number of bins. Ignore medium jobs from now on. Small Big Medium G m =[  m+1,  m ) be such that area ·  (total area)

50/61 Square Packing  0 =1 0 11 mm  1/   m+1 22 …… G0G0 G1G1 G 1/  -1 Pack medium in separate bins using O(1) approx Adds at most O(  ) to the number of bins. Ignore medium jobs from now on. Small Big G m =[  m+1,  m ) be such that area ·  (total area)

51/61 Square Packing  0 =1 0 11 mm  1/   m+1 22 …… G0G0 G1G1 G 1/  -1 Pack medium in separate bins using O(1) approx Adds at most O(  ) to the number of bins. Ignore medium jobs from now on. Small Big  0 = 1,  i =   i-1 2 (1, ,  3,  7,…) G m =[  m+1,  m ) be such that area ·  (total area)

52/61 Square Packing Packing bigs: Rounding technique similar to 1-d case, ! O(1) different lengths Opt(I b ’) · Opt(I b ) · Opt(I b ’)/(1-  ) LP to find close to optimum packing of I b ’  0 =1 0 11 mm  1/   m+1 22 …… G0G0 G1G1 G 1/  -1 Small Big

53/61 Square Packing: Filling in the smalls Bigs use ¼ Opt bins What about smalls?

54/61 Square Packing: Filling in the smalls Divide the free space into rectangular gaps. Fill smalls in gaps using decreasing size shelf algorithm Rectangular Gaps

55/61 Square Packing: Filling in the smalls # bigs · 1/  m 2, gaps · 4/  m 2 Recall: Packing · s in a £ b wastes at most s(a+b) a+b · 2, s ·  m+1 =   m 2 Total waste · 2 s ¢ #gaps · 2   m 2 ¢ 4/  m 2 · 8  Rectangular Gaps Small ·  m+1, big ¸  m

56/61 Square Packing If no new bins opened for smalls, done. If we do, waste in each bin (except maybe last) is O(  ), hence done by area lower bound. Thm: ALG(I) · (1+  ) Opt(I) + Generalizes to d>2 dimensions with few modifications.

57/61 Square Packing: Technique Summary Partition into big, medium, small Ignore mediums Gap between big and small Ideas from 1-d + packing smalls with low waste

58/61 Outline Introduction APTAS for 1-d packing [de la Vega, Lueker 81] Results for 2-d packing  Square packing problem  General rectangle packing problem Conclusions

59/61 Rectangle packing Problem: Pack rectangles into min # of unit bins. (no rotation) approximation [ Chung, Garey, Johnson 82] 2+  [ Kenyon, Remila 96] Best known: 1.691… +  [Caprara 02] Prior to our work: APTAS open

60/61 Results for Rectangle Packing Main Thm: No APTAS exists for 2-d rectangle packing. Hence for d>2. Proof: Lets skip it.

61/61 Conclusion and Open Problems Impossibility of APTAS for rectangle packing APTAS for square packing 1-d Case: (1+  ) Opt + O(1/  2 ) [de la Vega, Lueker 81] Opt + O(log 2 (Opt)) [Karmarkar, Karp 82] Opt + O(1) ? d =2 :  [Caprara 02] d > 2: d [Csirik, Van Vliet 93]  (c d ) lower bounds for d-dim bin packing ?

62/61 Results for Rectangle Packing Main Thm: No APTAS exists for 2-d rectangle packing. Hence for d>2. Thm [Kenyon, Correa 04] : APTAS if allow Alg to pack in (1+  ) £ (1+  ) size bins Alg * (I) · (1+  ) Opt(I) + f(  ) Thm: APTAS if allow Alg to pack in 1 £ (1+  ) size bins.

63/61 Hardness 2-d Vector Packing Problem: Given 2-d vectors (equivalently rectangles). In each bin,  widths · 1, and  heights · 1. ValidInvalid

64/61 Hardness of Vector Packing X={x 1,…,x n }, Y={y 1,…,y n }, Z={z 1,…,z n }, T= {t 1,…,t n } Each >b/5 and < b/3 Goal: Max. number of disjoint 4-tuples that sum to exactly b SNP-Hard: 9  Cannot distinguish if n such tuples or (1-  ) n [ Woeginger’s construction’ 97] X i ’ = (.2 + x i /5b,.3 – x i /5b) Y i ’ = (.2 + y i /5b,.3 – y i /5b) Z i ’ = (.2 + z i /5b,.3 – z i /5b) T i ’ = (.2 + t i /5b,.3 – t i /5b) Observation: All these fit in a bin iff x i +y j +z k +t l = b

65/61 Rectangle Packing 2 rectangles for each object in X,Y,Z,T (Thin, Tall) and (Fat, Short) for each object in X,Y,Z (Fat, Tall) and (Thin, Short) for each object in T YjYj Y’ j ZkZk TlTl XiXi X’ i Z’ k T’ l Details to show that other patterns do not work