The strip packing problem is a 2-dimensional geometric minimization problem. Given a set of axis-aligned rectangles and a strip of bounded width and infinite height, determine an overlapping-free packing of the rectangles into the strip, minimizing its height. This problem is a cutting and packing problem and is classified as an Open Dimension Problem according to Wäscher et al.
This problem arises in the area of scheduling, where it models jobs that require a contiguous portion of the memory over a given time period. Another example is the area of industrial manufacturing, where rectangular pieces need to be cut out of a sheet of material (e.g., cloth or paper) that has a fixed width but infinite length, and one wants to minimize the wasted material.
This problem was first studied in 1980. It is strongly-NP hard and there exists no polynomial-time approximation algorithm with a ratio smaller than unless . However, the best approximation ratio achieved so far (by a polynomial time algorithm by Harren et al.) is , imposing an open question of whether there is an algorithm with approximation ratio .
An instance of the strip packing problem consists of a strip with width and infinite height, as well as a set of rectangular items. Each item has a width and a height . A packing of the items is a mapping that maps each lower-left corner of an item to a position inside the strip. An inner point of a placed item is a point from the set . Two (placed) items overlap if they share an inner point. The height of the packing is defined as . The objective is to find an overlapping-free packing of the items inside the strip while minimizing the height of the packing.
This definition is used for all polynomial time algorithms. For pseudo-polynomial time and FPT-algorithms, the definition is slightly changed for the simplification of notation. In this case, all appearing sizes are integral. Especially the width of the strip is given by an arbitrary integer number larger than 1. Note that these two definitions are equivalent.
There are several variants of the strip packing problem that have been studied. These variants concern the objects' geometry, the problem's dimension, the rotateability of the items, and the structure of the packing.
Geometry: In the standard variant of this problem, the set of given items consists of rectangles. In an often considered subcase, all the items have to be squares. This variant was already considered in the first paper about strip packing. Additionally, variants where the shapes are circular or even irregular have been studied. In the latter case, it is referred to as irregular strip packing.
Dimension: When not mentioned differently, the strip packing problem is a 2-dimensional problem. However, it also has been studied in three or even more dimensions. In this case, the objects are hyperrectangles, and the strip is open-ended in one dimension and bounded in the residual ones.
Rotation: In the classical strip packing problem, the items are not allowed to be rotated. However, variants have been studied where rotating by 90 degrees or even an arbitrary angle is allowed.
Structure: In the general strip packing problem, the structure of the packing is irrelevant. However, there are applications that have explicit requirements on the structure of the packing. One of these requirements is to be able to cut the items from the strip by horizontal or vertical edge-to-edge cuts. Packings that allow this kind of cutting are called guillotine packing.
The strip packing problem contains the bin packing problem as a special case when all the items have the same height 1. For this reason, it is strongly NP-hard, and there can be no polynomial time approximation algorithm that has an approximation ratio smaller than unless . Furthermore, unless , there cannot be a pseudo-polynomial time algorithm that has an approximation ratio smaller than , which can be proven by a reduction from the strongly NP-complete 3-partition problem. Note that both lower bounds and also hold for the case that a rotation of the items by 90 degrees is allowed. Additionally, it was proven by Ashok et al. that strip packing is W[1]-hard when parameterized by the height of the optimal packing.
There are two trivial lower bounds on optimal solutions. The first is the height of the largest item. Define . Then it holds that
.
Another lower bound is given by the total area of the items. Define then it holds that
.
The following two lower bounds take notice of the fact that certain items cannot be placed next to each other in the strip, and can be computed in . For the first lower bound assume that the items are sorted by non-increasing height. Define . For each define the first index such that . Then it holds that
.
For the second lower bound, partition the set of items into three sets. Let and define , , and . Then it holds that
, where for each .
On the other hand, Steinberg has shown that the height of an optimal solution can be upper bounded by
More precisely he showed that given a and a then the items can be placed inside a box with width and height if
, where .
Since this problem is NP-hard, approximation algorithms have been studied for this problem. Most of the heuristic approaches have an approximation ratio between and . Finding an algorithm with a ratio below seems complicated, and the complexity of the corresponding algorithms increases regarding their running time and their descriptions. The smallest approximation ratio achieved so far is .
This algorithm was first described by Baker et al. It works as follows:
Let be a sequence of rectangular items. The algorithm iterates the sequence in the given order. For each considered item , it searches for the bottom-most position to place it and then shifts it as far to the left as possible. Hence, it places at the bottom-most left-most possible coordinate in the strip.
This algorithm has the following properties:
This algorithm was first described by Coffman et al. in 1980 and works as follows:
Let be the given set of rectangular items. First, the algorithm sorts the items by order of nonincreasing height. Then, starting at position , the algorithm places the items next to each other in the strip until the next item will overlap the right border of the strip. At this point, the algorithm defines a new level at the top of the tallest item in the current level and places the items next to each other in this new level.
This algorithm has the following properties:
This algorithm, first described by Coffman et al. in 1980, works similar to the NFDH algorithm. However, when placing the next item, the algorithm scans the levels from bottom to top and places the item in the first level on which it will fit. A new level is only opened if the item does not fit in any previous ones.
This algorithm has the following properties:
This algorithm was first described by Coffman et al. For a given set of items and strip with width , it works as follows:
This algorithm has the following properties:
For a given set of items and strip with width , it works as follows:
This algorithm has the following properties:
This algorithm is an extension of Sleator's approach and was first described by Golan. It places the items in nonincreasing order of width. The intuitive idea is to split the strip into sub-strips while placing some items. Whenever possible, the algorithm places the current item side-by-side of an already placed item . In this case, it splits the corresponding sub-strip into two pieces: one containing the first item and the other containing the current item . If this is not possible, it places on top of an already placed item and does not split the sub-strip.
This algorithm creates a set <samp> S </samp> of sub-strips. For each sub-strip <samp> s â S</samp> we know its lower left corner <samp> s.xposition</samp> and <samp> s.yposition</samp>, its width <samp> s.width</samp>, the horizontal lines parallel to the upper and lower border of the item placed last inside this sub-strip <samp> s.upper</samp> and <samp> s.lower</samp>, as well as the width of it <samp> s.itemWidth</samp>.
function Split Algorithm (SP) is input: items <samp>I</samp>, width of the strip <samp>W</samp> output: A packing of the items Sort I in nonincreasing order of widths; Define empty list S of sub-strips; Define a new sub-strip s with s.xposition = 0, s.yposition = 0, s.width = W, s.lower = 0, s.upper = 0, s.itemWidth = W; Add s to S; while I not empty do i := I.pop(); Removes widest item from I Define new list S_2 containing all the substrips with s.width - s.itemWidth âÂÂ¥ i.width; S_2 contains all sub-strips where i fits next to the already placed item if S_2 is empty then In this case, place the item on top of another one. Find the sub-strip s in S with smallest s.upper; i.e. the least filled sub-strip Place i at position (s.xposition, s.upper); Update s: s.lower := s.upper; s.upper := s.upper+i.height; s.itemWidth := i.width; else In this case, place the item next to another one at the same level and split the corresponding sub-strip at this position. Find s â S_2 with the smallest s.lower; Place i at position (s.xposition + s.itemWidth, s.lower); Remove s from S; Define two new sub-strips s1 and s2 with s1.xposition = s.xposition, s1.yposition = s.upper, s1.width = s.itemWidth, s1.lower = s.upper, s1.upper = s.upper, s1.itemWidth = s.itemWidth; s2.xposition = s.xposition+s.itemWidth, s2.yposition = s.lower, s2.width = s.width - s.itemWidth, s2.lower = s.lower, s2.upper = s.lower + i.height, s2.itemWidth = i.width; S.add(s1,s2); return end function
This algorithm has the following properties:
This algorithm was first described by Schiermeyer. The description of this algorithm needs some additional notation. For a placed item , its lower left corner is denoted by and its upper right corner by .
Given a set of items and a strip of width , it works as follows:
This algorithm has the following properties:
Steinbergs algorithm is a recursive one. Given a set of rectangular items and a rectangular target region with width and height , it proposes four reduction rules, that place some of the items and leaves a smaller rectangular region with the same properties as before regarding of the residual items. Consider the following notations: Given a set of items we denote by the tallest item height in , the largest item width appearing in and by the total area of these items. Steinbergs shows that if
, , and , where ,
then all the items can be placed inside the target region of size . Each reduction rule will produce a smaller target area and a subset of items that have to be placed. When the condition from above holds before the procedure started, then the created subproblem will have this property as well.
Procedure 1: It can be applied if .
Procedure 2: It can be applied if the following conditions hold: , , and there exist two different items with , , , and .
Procedure 3: It can be applied if the following conditions hold: , , , and when sorting the items by decreasing width there exist an index such that when defining as the first items it holds that as well as
Note that procedures 1 to 3 have a symmetric version when swapping the height and the width of the items and the target region.
Procedure 4: It can be applied if the following conditions hold: , , and there exists an item such that .
This algorithm has the following properties:
To improve upon the lower bound of for polynomial-time algorithms, pseudo-polynomial time algorithms for the strip packing problem have been considered. When considering this type of algorithms, all the sizes of the items and the strip are given as integrals. Furthermore, the width of the strip is allowed to appear polynomially in the running time. Note that this is no longer considered as a polynomial running time since, in the given instance, the width of the strip needs an encoding size of .
The pseudo-polynomial time algorithms that have been developed mostly use the same approach. It is shown that each optimal solution can be simplified and transformed into one that has one of a constant number of structures. The algorithm then iterates all these structures and places the items inside using linear and dynamic programming. The best ratio accomplished so far is . while there cannot be a pseudo-polynomial time algorithm with ratio better than unless
In the online variant of strip packing, the items arrive over time. When an item arrives, it has to be placed immediately before the next item is known. There are two types of online algorithms that have been considered. In the first variant, it is not allowed to alter the packing once an item is placed. In the second, items may be repacked when another item arrives. This variant is called the migration model.
The quality of an online algorithm is measured by the (absolute) competitive ratio
,
where corresponds to the solution generated by the online algorithm and corresponds to the size of the optimal solution. In addition to the absolute competitive ratio, the asymptotic competitive ratio of online algorithms has been studied. For instances with it is defined as
.
Note that all the instances can be scaled such that .
The framework of Han et al. is applicable in the online setting if the online bin packing algorithm belongs to the class Super Harmonic. Thus, Seiden's online bin packing algorithm Harmonic++ implies an algorithm for online strip packing with asymptotic ratio 1.58889.