Bottom-Left Placement Theorem for Rectangle Packing

This paper proves a bottom-left placement theorem for the rectangle packing problem, stating that if it is possible to orthogonally place n arbitrarily given rectangles into a rectangular container without overlapping, then we can achieve a feasible …

Authors: Wenqi Huang, Tao Ye, Duanbing Chen

Botto m-Left Placement Theorem for Rectangl e P ac king W enqi Huang, T ao Y e ∗ Scho ol of Computer Sci enc e and T e chnolo gy, Huaz hong Univer sity of Scienc e an d T e chnolo gy, Wuhan, 430074, China Duan bing Chen Scho ol of Computer Scienc e, University of Ele ctr onic Scienc e and T e chnolo gy of China, Chengdu, 610054, Chi na Abstract This pap er prov es a b ottom-left placemen t theorem for the rectangle p acking problem, stating that if it is p ossible to orthogonally place n arb itrarily giv en rectangles in to a rectangular con tainer with ou t o v erlapping, then w e can ac hieve a feasible packing by successiv ely placing a rectangle on to a b ottom-left corner in the cont ainer. This theorem sh o ws that ev en for the real-parameter rectangle pac king problem, we can solv e it after finite times of b ottom-l eft p lacemen t actions. Based on this th eorem, w e migh t d ev elop efficien t heuristic algorithms for solving the rectangle pac king p roblem. Keywor ds: rectangle p ac kin g, b ottom-left, b ottom-left placemen t theorem, NP h ard 1. In tro duction W e consider the f ollo wing Rectangle P ac k in g (RP) p roblem: Giv en a set J = { 1 , 2 , · · · , n } of n rectangles, eac h ha ving width w j and h eight h j , and a rectangular con tainer of wid th W and height H , ask whether it is p ossible to orthogonally place all rectangles into the co nta iner without ov erlappin g. If it is p ossible, w e should answ er yes and present a non -ov erlappin g pac king pattern; otherwise we shou ld answer no. Note that: (1) w j , h j , W and H are p ositiv e r e al num b ers. (2) Rectangles are rota table, i.e., eac h rectangle can b e horizonta lly or v ertically placed in to the con tainer. ∗ Corresponding Auth or. T el: 86 -27-8754-3885; Email: y eetao@gmail. com The rectangl e pac king pr oblem arises in many ind ustrial app lications, suc h as cutting woo d , glass, pap er and steel in manufacturing, pac king go o ds in transp ortation, arranging articles and advertisemen ts in publish ing. V ar- ious algorithms ha v e b een prop osed to solv e this problem. They can b e divided into three categories: appro ximate algorithms, heuristic algorithms and exact algorithms [10, 14]. Most algorithms solv e the RP p roblem by successiv ely placing an un- pac k ed rectangle in to th e con tainer. Then a basic p roblem arises: where to place a new rectangle wh en the conta iner is already partially o ccupied b y some pac k ed rectangles? Generally , there are t w o approac hes to handle this problem. The first approac h assu mes that the parameters of the RP problem are int egers and rectangles can only b e placed at some lattice sites [3, 7 , 8, 15]. This app roac h enumerates all p ossible p ositions for a rectangle, th us no feasible solution will b e missed. On the other hand , the n umber of p ossib le p ositions for a recta ngle is u s ually v ery large and th is approac h is not app licable to the real-parameter RP prob lem. The seco nd appr oac h adopts some placemen t h eu ristic w h ic h sp ecifies several candidate p ositions for a recta ngle [1, 2, 5, 9 , 11]. Using placemen t heuristic is usu ally more efficien t b ecause the num b er of ca ndid ate p ositions for a r ectangle is muc h smaller, and it is also applicable to the real-parameter RP problem. Ho w- ev er, a risk conceals und er the p lacemen t heuristic: wh en there exist feasible solutions, can we ac hiev e one b y successiv ely placing a rectangle in to the con- tainer using the place ment heur istic? If the answ er is y es, then w e sa y the placemen t heur istic is complete ; otherwise, incomplete . If a p lacemen t heuristic is incomplete, then any algorithm based on it is fored o omed to fail on some instances. F or example, Bak er et.al. [1] h av e pro v ed that the Bottom-Left heur istic, whic h places a rectangle on to the lo we st p ossible p osition and left-justify it, is incomplete. Th ey found an instance for which an y feasible solution can not b e ac hieved using th e Bottom-Left h eu ristic, no m atter what ord ering of the rectangles is used. Martel lo and Vigo [15] prop osed a placemen t heuristic and dev elop ed an exact algorithm for the three dimens ional bin p acking problem. Later, Bo ef et.al. [4] found that some instances can not b e s olved using the placemen t h euristic prop osed by Martello and Vigo [ 15]. It is u sually very difficult to pro v e a placemen t heur istic’s completeness or incompleteness. Nev ertheless, for a sp ecial case of the R P problem, the 2D rectangular p erfect pac king problem, Lesh et.al. [13] ha ve sh o wn that the Bottom-Left heuristic is complete. They presented the follo wing the- orem: F or every p erfe ct p acking, ther e is a p ermutation of the r e ctangles that yie lds that p acking using the Bottom-L eft heuristic. An efficien t b ranc h 2 and b oun d algorithm is also d ev elop ed based on this th eorem. Besides this result, we hav e n ot found other pap er in literature p ro ving a certain p lace- men t heur istic’s completeness. Particularly , no placemen t heur istic has b een rigorously pro v ed to b e complete for the general R P pr ob lem. This pap er giv es a placement heur istic and rigorously prov es its com- pleteness. W e presen t the follo wing b ottom-left placemen t theorem: if it is p ossible to ortho gonal ly plac e n arbitr arily given r e ctangles into a r e ctan- gular c ontainer witho ut overlapping, then we c an achieve a fe asible p acking by suc c essively placing a r e ctangle onto a b ottom-left c orner. This theorem la ys a solid foundation for man y efficient and exact algorithms for solving the RP problem[7, 8, 12]. It is also p ossible to d ev elop efficient and effectiv e heuristic algorithms b ased on this theorem. The rest of th e pap er is organize d as follo w s . Section 2 presen ts s ev- eral notations and defin itions. S ection 3 pro v es the b ottom-left placement theorem. Finally , Section 4 concludes th is pap er and p resen ts some op en problems. 2. Notations and definitions W e d esignate th e b ottom-left corner p oin t of the con tainer as the origin of the xy -plane and let its four sides parallel to x and y axis, resp ectiv ely . A placemen t of r ectangle i ( i = 1 , 2 , · · · , n ) in the cont ainer can b e d escrib ed b y three v ariables ( x i , y i , v i ), wh ere x i , y i ∈ R is the co ordinate of its b ottom-left corner p oin t, v i ∈ { 0 , 1 } d enotes its orienta tion, v i = 1 m eans it is v ertically placed, v i = 0 otherwise. A pac king pattern of n rectangles can b e d escrib ed b y a v ector of 3 n elemen ts: X = ( x 1 , y 1 , v 1 , x 2 , y 2 , v 2 , · · · , x n , y n , v n ). W e giv e the f ollo win g definitions. Definition 1 (F easible P ac king). A feasible (or non-o v erlapping) pac k- ing must satisfy the follo wing th ree conditions: (1) Eac h r ectangle must b e orth ogonally p laced into th e conta iner. (2) Eac h r ectangle must not ov erstep eac h b order of the con tainer. (3) The o v erlapping area b et w een any t w o rectangles m ust b e zero. Definition 2 (Bottom-Left Sta bility). In a feasible pac king, a rectangle is b ottom-left stable if and only if it ca n not mo v e do wnw ards or left wa rds without o v erlapping others [6]. A feasible pac king is b ottom-left stable if and only if eac h r ectangle in this pac kin g is b ottom-left stable. See Fig.1, eac h rectangle in the depicted p acking has b ottom-left stabilit y and the packing is b ottom-left stable. 3 y x A B C D E Figure 1: Bottom-left stability and b ottom- left corners      Figure 2: Rectangles 2 an d 3 are over rectangle 1 Definition 3 (Bottom-Left C orner) . A b ottom-left corner is an uno c- cupied p osition where an advisably large rectangle has b ottom-le ft stabilit y . See Fig.1 , there are in total five b ottom-left corners: A, B, C, D and E . Definition 4 (Bottom-Left Placement Action). A b ottom-left p lace- men t action is an action that places a rectangle ont o a b ottom-left corner and makes that rectangle b ottom-left stable. Definition 5 (Rectangle j Over Rectangle i ). W e sa y rectangle j is o ver rectangle i if and only if there exists a p ositiv e real num b er d s u c h that if rectangle i mov es u p wa rds by a distance of d , then the o v erlapping area b et we en rectangles i and j is greater than zero. See Fig.2, rectangles 2 an d 3 are o v er rectangle 1, rectangles 4 and 5 are n ot o v er rectangle 1. W e sa y rectangle i c an move upwar ds fr e ely if and only if no rectangle is o ver rectangle i . Definition 6 (Rectangle j On the Righ t of Rectangle i ). W e say r ect- angle j is on the r ight of rectangle i if and only if there exists a p ositiv e real n umber d suc h that if r ectangle i mo ve s right wa rds by a d istance of d , then the o verlapping area b et w een rectangles i and j is greater than zero. S ee Fig.3, rectangles 2 and 3 are on the righ t of rectangle 1, rectangles 4 and 5 are not on the r igh t of r ectangle 1. W e say rectangle i c an move rightw ar ds fr e ely if and only if no r ectangle is on the right of rectangle i . 4      Figure 3: Rectangles 2 an d 3 are on the righ t of rectangle 1 x y 4 1 3 2 (a) Not bottom-left stable x y 4 1 3 2 (b) Bottom-left stable Figure 4: A feasible packing and its equ iv alent b ottom-left stable packing 3. Bottom-left placemen t theorem This section prov es the b ottom-left p lacement theorem. W e first present t w o imp ortant lemmas. Lemma 1. Any fe asible p acking c an b e r eplac e d by another fe asible p acking wher e e ach r e ctangle has b ottom-left stability. Pr oof. See Fig.4, the left p ac king can b e replaced b y the right b ottom- left stable one. Given a feasible p acking X 0 , w e prov e that an equiv alen t b ottom-left stable pac king can b e found from X 0 . Keep the orienta tion of eac h r ectangle unchange d, su pp ose that eac h rectangle can mo v e freely and consider the follo wing fu nction: O = n − 1 X i =0 n X j = i +1 O ij (1) where O ij ( i, j = 1 , 2 , · · · , n ) is the o v erlapping area b et w een rectangles i and j . O 0 i ( i = 1 , 2 , · · · , n ) is the o ve rlapping area b et we en rectangle i and the outside of the con tainer. O = O ( X ) = O ( x 1 , y 1 , x 2 , y 2 , · · · , x n , y n ) is a con tin uous fu nction defined on R 2 n . Let S 0 b e a set of zero p oints of 5 O : S 0 = {X | O ( X ) = 0 } . Then eac h p oin t in S 0 corresp onds to a n on- o v erlapping packi ng. S 0 is a non-empty , closed and b ounded set b ecause: • X 0 is a zero p oint of O , so S 0 is not empty . • O is a contin u ous fun ction, th us the limit of a sequ en ce of zero p oints of O is also a zero p oint, which imp lies S 0 is a closed s et. • I n an y f easible pac king, eac h rectangle must not ov erstep ea c h b order of the con tainer, so S 0 is a b oun ded s et. Then let’s consider a con tin uous fun ction defined on S 0 : L = N X i =1 ( x i + y i ) (2) According to r eal analysis, a con tin uous fu nction ov er a non-empty , clo sed and b ounded set m ust atta in its minim um. Let X ∗ = ( x ∗ 1 , y ∗ 1 , x ∗ 2 , y ∗ 2 , · · · , x ∗ n , y ∗ n ) b e the p oint in S 0 where L attains its minim um. X ∗ corresp onds to a fea- sible pac kin g where eac h rectangle can not mo ve d o wn wa rds or leftw ard s without ov erlapping others; otherwise, we can find another p oint in S 0 with a sm aller L , con tradicting the fact that L attains its min im um on X ∗ .  Note that Lemma 1 has b een exp licitly men tioned by [7, 8, 15] an d implicitly u sed by almost all algorithms f or solving the rectangle pac king problem. Ho wev er, to the b est of our kno wledge, a rigorous and formal pro of is firs t presented h ere. Lemma 2 (Escaping Lemma). In any fe asible p acking, if we take away the four b or ders of the c ontainer, then ther e is a r e c tangle which c an move upwar ds and rightwar ds fr e ely. Pr oof. See Fig.5(a), the highligh ted rectangle can mo ve up wa rds and righ t- w ards freely . Giv en a feasible pac king with n r ectangles, we sort the top-righ t corner p oints of the rectangles lexicographically by increasing < x, y > and ren umb er the rectangles acco rdin g to th is order (See Fig.5(b )). W e search for the rectangle whic h can mo v e r ight wards and up w ards freely as follo ws. First, we consider the highest num b ered rectangle among all n rectangles, i.e., rectangle n (12 in Fig.5(b)). Its top-righ t corner p oin t is the rightmost, th us it can mo v e right wa rds f r eely . If no rectangle is ov er recta ngle n , th en 6 y x (a) 11 12 9 10 8 7 2 1 6 4 5 3 y x (b) Figure 5: Examples for Lemma 2 n is th e rectangle we wan t to find. O therwise, we consider the h ighest num- b ered rectangle among all the rectangles ov er r ectangle n . Let it b e rectangle i (10 in Fig.5(b)). Its top-right corner p oint is the rightmost among all the rectangles ov er rectangle n . Therefore, it ca n mo ve righ t w ards freely . If n o rectangle is o ver rectangle i , then i is the rectangle we wa nt to fi n d. Oth- erwise we consider the highest num b ered rectangle among all the rectangles o v er rectangle i and contin ue the searc h as describ ed ab o ve . Because there are only n rectangles, the ab o v e searc h will term in ate and we can finally fi nd a rectangle w hic h can mov e upw ards and right wa rds freely .  Theorem 1. F or any fe asible, b ottom-left stable p acking, ther e exists a numb ering of n r e c tangles such that r e ctangle i ( i = 1 , 2 , · · · , n ) lo c ates on a b ottom-left c orner forme d by r e ctangles 1 , 2 , · · · , i − 1 and the four b or ders of the c ontainer. Pr oof. According to Lemma 2, there is alw a ys a rectangle wh ic h can mo v e righ t w ards and upw ards freely in an y feasible pac king. Consequen tly , for a feasible p ac kin g w ith n rectangles, we can empty the con tainer b y succes- siv ely taking ou t a rectangle whic h can mov e right wa rds and u p w ards freely . W e then n umber the r ectangles according to the order in wh ic h r ectangles are take n out. Und er this num b ering, a h igher n umbered rectangle is not o v er or on th e right of a lo w er num b ered rectangle (See Fig.6(a)). No w we consider a new n umb ering whic h is the rev ersion of the pr evious n umber in g, i.e., the num b er of rectangle i ( i = 1 , 2 , · · · , n ) b ecomes n − i + 1 (See Fig.6(b)). Und er this new n umbering, a lo w er num b ered rectangle is 7 5 4 y x 3 2 1 (a) Numb ering According to Lemma 2 1 2 y x 3 4 5 (b) New Numbering Figure 6: Examples for Theorem 1 not o v er or on the right of a higher num b ered rectangle. Then, for rectangle i ( i = 1 , 2 , · · · , n ), the lab eled num b ers of th e rectangles forming the b ottom- left corner w h ere rectangle i lo cates are smaller than i . The new num b ering of the rectangles can b e tak en as an order in whic h rectangles are p laced in to the con tainer. Under this order, when we place rectangle i into the conta iner, rectangles 1 , 2 , · · · , i − 1 are already in the con tainer and rectangles i + 1 , i + 2 , · · · , n are not. Then this theorem sho ws that, an y feasible, b ottom-le ft stable pac king can b e ac hiev ed thr ough a sequence of placemen t actions, among wh ic h the i th ( i = 1 , 2 , · · · , n ) ac- tion is to place rectangle i on to a b ottom-left corner formed by r ectangles 1 , 2 , · · · , i − 1 and the four b orders of the con tainer. That is to sa y , an y feasible, b ottom-left s table pac kin g can b e ac h iev ed through a sequence of b ottom-left placemen t actions.  Theorem 2 (Bottom-Left Placemen t Theorem) . Arbitr arily given N r e ctangles and a r e ctangular c ontainer, if it i s p ossible to ortho g onal ly plac e al l r e ctangles into the c ontainer without overlap ping, then we c an find a fe asible p acking thr ough a se quenc e of b ottom-left plac ement action s. Pr oof. According to Lemma 1, ther e exists a feasible pac king where eac h rectangle has b ottom-left stabilit y . Then according to Theorem 1, this b ottom-left sta ble pac kin g can b e found through a sequence of bottom-left placemen t actions.  Theorem 3. The r e ctangle p acking pr oblem c an b e solve d after finite times of b ottom-left plac ement actions. That is to say, the r e c tangle p acking pr ob- lem c an b e solve d after finite times of b asic arithmatic and lo gic al op er ations on the r e al input p ar ameters ( W, H, w 1 , h 1 , w 2 , h 2 , · · · , w n , h n ) . 8 Pr oof. Th e pr o ofs of T heorems 1 and 2 sho w that, if it is p ossible to place all n r ectangles int o the con tainer without o v erlapping, then we can fin d a feasible pac king by p erforming only fin ite times of b ottom-left placemen t actions. The n um b er of all p ossible b ottom-left placemen t actions is less than n ! ∗ 2 n ∗ ( θ n ) n , w here n ! d enotes all possib le p erm utations of n r ectangles, 2 n all p ossible orien tations of n rectangles, and θ n is an upp er b ound of all p ossible b ottom-left corners for a rectangle. n ! ∗ 2 n ∗ ( θ n ) n is finite, therefore, the searc h for a f easible pac king will fin ish when all p ossib ilities are c hec k ed or once a feasible pac king is found . In the end, if a feasible pac king is found, w e can ans wer ye s and present the foun d feasible pac king; otherwise, we can answ er no, i.e., it is imp ossible to orthogonally p lace all n rectangles into the contai ner without o v erlapping. Note th at eac h b ottom-left placemen t action can b e d etermined b y only finite times of basic arithmatic and logical op erations, so the theorem is pro v ed.  4. Op en problem In this pap er, w e ha v e pro v ed a b ottom-left p lacemen t theorem stati ng that if there exist feasible pac kings for the RP problem, then w e can achiev e one by successiv ely placing a rectangle onto a b ottom-left corner. In the future, we wan t to dev elop efficient heuristic algorithms for th e RP problem based on this theorem. Finally , we ma y p resen t an op en pr oblem: Is there an analogue of the b ottom-left placemen t theorem for the 3D rectangle pac king p roblem? References [1] B. S. Bak er, R. G. J . Coffman, R.L. Riv est. Orthogonal packi ngs in tw o dimensions, S IAM Journ al on C omputing 9 (1980) 846. [2] J. O. Berke y , P . Y. W ang. Two -dimensional fin ite bin -pac king algo- rithms, The Jour nal of the Op erational Researc h So ciet y 38 (5) (1987) 423-4 29. [3] J.E. Beasley , An exact t w o-dimensional n on-guillotine cutting tree searc h pro cedure. Op erations Researc h 33 (1985) 49-64. [4] E. D. Bo ef, J. Korst, S. Martello, D. Pisinger, D. Vigo. Erratum to” The three-dmensional bin pac king p roblem”: Rob ot-pac k able and orthogo - nal v arian ts of pac king pr oblems, Op erations Researc h 53 (4) (200 5) 735. 9 [5] E. K. Burke , G. Kendall, G. Whit we ll. A new placemen t heuristic for the orthogonal sto c k-cutting problem, Op er ations Researc h (2004) 655- 671. [6] B. Chazelle. The b ottom-left b in -pac king h euristic: An efficient imple- men tation, IEEE T ransactions on Compu ters 100 (8) (1983) 697-707. [7] N. C hristofides, C. Whitlo c k. An algorithm for tw o-dimensional cutting problems, O p erations Researc h 25 (1) (1977) 30-44 . [8] E. Hadjiconstanti nou, N. Christofid es. An exact alg orithm for general, orthogonal, t wo -dimensional knapsac k problems, E urop ean Journal of Op erational Researc h 83 (1) (1995 ) 39- 56. [9] W. Hu an g, K. He. A ca ving degree appr oac h for the single con tainer loading problem, Europ ean Journal of Op erational Researc h 196 (2009) 93-10 1. [10] E. Hopp er, B. T u r ton. An empirical in v estigation of meta-heuristic and heuristic algorithms for a 2D pac king pr ob lem, Eur op ean J ournal of Op erational Researc h 128 (1) (2001) 34-57. [11] W. Huang, D. Chen, R . Xu. A new heuristic algorithm for r ectangle pac king, Computers & Op erations Researc h 34 (11) (2007 ) 3270-3280 . [12] M. Kenm o c h i, T. Imamic hi, K. Nonob e, M. Y agiura, H. Nagamoc hi. Exact algorithms for th e t wo -dimensional strip pac king problem with and without rotations, Eu rop ean J ournal of Op erational Researc h 19 8 (1) (2009 ) 73-83. [13] N. Lesh, J. Marks, A. McMahon, M. Mitzenmac her. Exhaustive ap- proac hes to 2D r ectangular p erfect packings, In formation Pro cessing Letters 90 (2004) 7-14. [14] A. Lod i, S. Martello, M. Monaci. Tw o-dimensional pac king pr oblems: A sur v ey , Europ ean Journal of Op erational Researc h 141 (2) (2002) 241-2 52. [15] S. Martello, D. Pisinger, D. Vigo. The th ree-dimensional b in p ac kin g problem, O p erations Researc h 48 (2000) 256-267 . 10

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment