High-multiplicity bin packing

From Wikipedia, the free encyclopedia

High-multiplicity bin packing is a special case of the bin packing problem, in which the number of different item-sizes is small, while the number of items with each size is large. While the general bin-packing problem is NP-hard, the high-multiplicity setting can be solved in polynomial time, assuming that the number of different sizes is a fixed constant.

The inputs to the problem are positive integers:

  • d - the number of different sizes (also called the dimension of the problem);
  • B - the bin capacity.
  • s1, ..., sd - the sizes. The vector of sizes is denoted by s.
  • n1, ..., nd - the multiplicities; ni is the number of items with size si. The vector of multiplicities is denoted by n.
    • n denotes the total number of items, that is, n = n1+...+nd.
    • V denotes the largest integer appearing in the description of the problem, that is, V = max(s1, ..., sd, n1, ..., nd, B)

The output is a packing - an assignment of the items to bins, such that the total size of items in each bin is at most B, and subject to this, the number of bins is as small as possible.

Example: suppose d=2, s1=30, s2=40, n1=n2=5, B=120. So there are n=10 items with sizes: 30,30,30,30,30,40,40,40,40,40. Then, a possible packing is: {30,30,30,30}, {40,40,40}, {30,40,40}, which uses 3 bins.

Configurations

A configuration is a set of items that can fit into a single bin. It can be represented by a vector of d integers, denoting the multiplicities of the different sizes in the configuration. Formally, for each configuration c we define an integer vector ac=ac,1, ..., ac,d such that acn and ac·s ≤ B.

In the above example, one of the configurations is c={30,40,40}, since 1*30+2*40 ≤ 120. Its corresponding vector is ac=(1,2). Other configuration vectors are (4,0), (3,0), (2,0), (2,1), (1,0), (1,1), (1,2), (0,1), (0,2), (0,3). If we had only three items of size 3, then we could not use the (4,0) configuration.

It is possible to present the problem using the configuration linear program: for each configuration c, there is a variable xc, denoting the number of bins in which c is used. The total number of bins used is simply the sum of xc over all configurations, denoted by 1·x. The total number of items used from each size is the sum of the vectors ac · xc over all configurations c. Then, the problem is to minimize 1·x such that the sum of ac · xc, over all configurations c, is at least n, so that all items are packed.

Algorithms

Basic algorithms

Suppose first that all items are large, that is, every si is at least e·B for some fraction e>0. Then, the total number of items in each bin is at most 1/e, so the total number of configuration is at most d1/e. Each configuration appears at most n times. Therefore, there are at most combinations to check. For each combination, we have to check d constraints (one for each size), so the run-time is , which is polynomial in n when d, e are constant.[1]

The main problem with this algorithm (besides the fact that it works only when the items are large) is that its runtime is polynomial in n, but the length of the input (in binary representation) is linear in log(V), which is of the order of magnitude of log(n).

Run-time polynomial in the input size

Filippi and Agnetis[2] presented an algorithm that finds a solution with at most OPT+d-2 bins in time O(poly(log V)). In particular, for d=2 different sizes, their algorithm finds an optimal solution in time O(log V).

Goemans and Rothvoss[3][4] presented an algorithm for any fixed d, that finds the optimal solution when all numbers are given in binary encoding. Their algorithm solves the following problem: given two d-dimensional polytopes P and Q, find the minimum number of integer points in P whose sum lies in Q. Their algorithm runs in time . Their algorithm can be adapted to other problems, such as Identical-machines scheduling and unrelated-machines scheduling with various constraints.

Rounding a general instance to a high-multiplicity instance

See also

References

Related Articles

Wikiwand AI