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 .
Definition 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.
Variants 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.
Hardness 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-hard when parameterized by the height of the optimal packing.
Properties of optimal solutions
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 .
Polynomial time approximation algorithms 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 .
+Overview of polynomial time approximations Year Name Approximation guarantee Source 1980 Bottom-Up Left-Justified (BL) Baker et al. 1980 Next-Fit Decreasing-Height (NFDH)Coffman et al.First-Fit Decreasing-Height (FFDH) Split-Fit (SF) 1980 Sleator 1981 Split Algorithm (SP) GolanMixed Algoritghm 1981 Up-Down (UD) Baker et al. 1994 Reverse-Fit Schiermeyer 1997 Steinberg 2000 Kenyon, Rémila 2009 Harren, van Stee 2009 Jansen, Solis-Oba 2011 Bougeret et al. 2012 Sviridenko 2014 Harren et al.
Bottom-up left-justified (BL)
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: The approximation ratio of this algorithm cannot be bounded by a constant. More precisely they showed that for each there exists a list of rectangular items ordered by increasing width such that , where is the height of the packing created by the BL algorithm and is the height of the optimal solution for . If the items are ordered by decreasing widths, then . If the item are all squares and are ordered by decreasing widths, then . For any , there exists a list of rectangles ordered by decreasing widths such that . For any , there exists a list of squares ordered by decreasing widths such that . For each , there exists an instance containing only squares where each order of the squares has a ratio of , i.e., there exist instances where BL does not find the optimum even when iterating all possible orders of the items. In 2024 this lower bound has been improved by Hougardy and Zondervan to . In 2025, Hougardy and Zondervan constructed an ordering of rectangles (called the -ordering), such that .
Next-fit decreasing-height (NFDH)
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: The running time can be bounded by and if the items are already sorted even by . For every set of items , it produces a packing of height , where is the largest height of an item in . For every there exists a set of rectangles such that The packing generated is a guillotine packing. This means the items can be obtained through a sequence of horizontal or vertical edge-to-edge cuts.
First-fit decreasing-height (FFDH) 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: The running time can be bounded by , since there are at most levels. For every set of items it produces a packing of height , where is the largest height of an item in . Let . For any set of items and strip with width such that for each , it holds that . Furthermore, for each , there exists such a set of items with . If all the items in are squares, it holds that . Furthermore, for each , there exists a set of squares such that . The packing generated is a guillotine packing. This means the items can be obtained through a sequence of horizontal or vertical edge-to-edge cuts.
The split-fit algorithm (SF) This algorithm was first described by Coffman et al. For a given set of items and strip with width , it works as follows:
Determinate , the largest integer such that the given rectangles have width or less. Divide into two sets and , such that contains all the items with a width while contains all the items with . Order and by nonincreasing height. Pack the items in with the FFDH algorithm. Reorder the levels/shelves constructed by FFDH such that all the shelves with a total width larger than are below the more narrow ones. This leaves a rectangular area of with , next to more narrow levels/shelves, that contains no item. Use the FFDH algorithm to pack the items in using the area as well.
This algorithm has the following properties: For every set of items and the corresponding , it holds that . Note that for , it holds that For each , there is a set of items such that .
Sleator's algorithm For a given set of items and strip with width , it works as follows:
Find all the items with a width larger than and stack them at the bottom of the strip (in random order). Call the total height of these items . All the other items will be placed above . Sort all the remaining items in nonincreasing order of height. The items will be placed in this order. Consider the horizontal line at as a shelf. The algorithm places the items on this shelf in nonincreasing order of height until no item is left or the next one does not fit. Draw a vertical line at , which cuts the strip into two equal halves. Let be the highest point covered by any item in the left half and the corresponding point on the right half. Draw two horizontal line segments of length at and across the left and the right half of the strip. These two lines build new shelves on which the algorithm will place the items, as in step 3. Choose the half which has the lower shelf and place the items on this shelf until no other item fits. Repeat this step until no item is left.
This algorithm has the following properties: The running time can be bounded by and if the items are already sorted even by . For every set of items it produces a packing of height , where is the largest height of an item in .
The split algorithm (SP) This algorithm is an extension of Sleator's approach and was first described by Golan.