Jump to content

Configuration linear program

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Erel Segal (talk | contribs) at 21:41, 25 November 2021 (Solving the integer LP for the rounded instance). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The configuration linear program (configuration-LP) is a particular linear programming used for solving combinatorial optimization problems. It was introduced in the context of the cutting stock problem.[1][2] Later, it has bin applied to bin packing[3][4] and job scheduling.[5][6] In the configuration-LP, there is a variable for each possible combination of items ("configuration") in a bin. Usually, the number of such combinations is exponential in the problem size, but in some cases it is possible to attain approximate solutions using only a polynomial number of configurations.

In bin packing

The integral LP

In the bin packing problem, there are n items with different sizes. The goal is to pack the items into a minimum number of bins of size B. A feasible configuration is a set of sizes with a sum of at most B.

  • Example:[7] suppose the item sizes are 3,3,3,3,3,4,4,4,4,4, and B=12. Then the possible configurations are: 3333; 333; 33, 334; 3, 34, 344; 4, 44, 444. If we had only three items of size 3, then we could not use the 3333 configuration.

For each size s and configuration c, denote:

  • ns - the number of items of size s.
  • as,c - the number of occurences of size s in configuration c.
  • xc - a variable denoting the number of bins with configuration c.

Then, the configuration LP of bin-packing is:

for every size s (- all ns items of size s are packed).

for all c in C (- there are at most n configurations of each type).

The configuration LP is an integer linear program, so in general it is NP-hard. However, it serves as a basis for several approximation algorithms. The general scheme of these algorithms is:

  • Separate the items to "small" (smaller than eB, for some fraction e in (0,1)) and "large" (at least eB).
  • Handle the large items first:
    • Round the item sizes in some way, such that the number of different sizes is at most some constant S.
    • Write the integer LP for the rounded instance. Since the number of sizes is S there are at most 1/e items in each bin, the total number of configurations is at most S1/e.
    • Solve the integer LP.
  • Allocate the small items greedily, e.g. next-fit bin packing. If no new bins are created, then we are done. If new bins are created, this means that all bins (except maybe the last one) are full up to at least (1-e)B. Therefore, the number of bins is at most OPT/(1-e)+1, which is (1+O(e))OPT+1.

The algorithms differ in how they round the instance and in how the solve the integer LP.

Rounding the large-items instance

Suppose the number of sizes is general, but each size is still at least eB. Fernandez de la Vega and Lueker[8] invented the idea of adaptive input rounding. Order the items by their size, and group them into 1/e2 groups of cardinality ne2. In each group, round the sizes upwards to the maximum size in the group. Now, there are only 1/e2 different sizes, so the problem can be solved exactly in time , which is polynomial in n when e is constant. The resulting solution is feasible for the original instance too, but the number of bins may be larger than necessary. To analyze the approximation factor, consider the instance rounded down to the maximum size in the previous group (the first group is rounded down to 0). The rounded-down instance D is almost equal to the rounded-up instance U, except that in D there are some ne2 zeros while in U there are some ne2 large items instead; but their size is at most B. Therefore, U requires at most ne2 more bins than D. Since D requires less bins than the optimum, we get that Bins(U) ≤ OPT + ne2, that is, we have an additive error that can be made as small as we like by choosing e. Moreover, since each bin in OPT can contain at most 1/e items (of size at least eB), OPT must be at least en. Therefore, Bins(U) ≤ (1+e)OPT.

Solving the integer LP for the rounded instance

A simple way to solve the integer LP is by exhaustive search. Since there are at most S configurations, and for each configuration there are at most n possible values, the run-time is , which is polynomial in n when S, e are constant.[7]

A more efficient way is to use the fractional configuration LP. It is the linear programming relaxation of the above ILP. It replaces the last constraint with the constraint . In other words, each configuration can be used a fractional number of times.

  • Example: suppose there are 31 items of size 3 and 7 items of size 4, and the bin-size is 10. The configurations are: 4, 44, 34, 334, 3, 33, 333. The constraints are [0,0,1,2,1,2,3]*x=31 and [1,2,1,1,0,0,0]*x=7. An optimal solution to the fractional LP is [0,0,0,7,0,0,17/3] That is: there are 7 bins of configuration 334 and 17/3 bins of configuration 333. Note that only two different configurations are needed.

Let FOPT(I) be the optimal solution of the fractional LP for instance I, and OPT(I) the optimal solution of the integral LP. Let AVG be the sum of all sizes divided by B (this would be the number of bins if we could cut items).

It is obvious that AVG(I) ≤ FOPT(I) ≤ OPT(I): AVG(I) is the number of bins when all bins are completely full - no solution can be better than this. FOPT(I) is the solution to the LP, which is less constrained than the ILP, so it is at least as good as OPT(I). Karmarkar and Karp[9] prove the following inequalities for any instance I:

  • .
  • .

The inequality OPT ≤ FOPT+(S+1)/2 is proved constructively as follows.

  • Let x be an optimal basic feasible solution of the fractional LP. By definition, the value of x is FOPT(I). Since the fractional LP has S constraints, x has at most S nonzero variables, that is, at most S different configurations are used. We construct from x an integral packing consisting of a principal part and a residual part.
  • The principal part contains floor(xc) bins of each configuration c for which xc is nonzero.
  • For the residual part (denoted by R), we construct two candidate packings:
    • A single bin of each configuration c for which xc is nonzero; all in all S bins are needed.
    • A greedy packing; it can be proved that this packing requires at most 2*AVG(R)+1 bins.
  • The smallest of these packings requires min(S, 2*AVG(R)+1) = AVG(R) + min(S-AVG(R), AVG(R)+1) ≤ AVG(R) + (S+1)/2.
  • Adding to this the rounded-down bins of the principal part yields FOPT(I) + (S+1)/2.
  • The execution time of this conversion algorithm is O(n log n).

Based on these lemmas, they present an algorithm with run-time polynomial in and . Their algorithm finds a solution with size at most .

Improvements

This technique was later improved by several authors:

  • Rothvoss[10] presented an algorithm that generates a solution with size at most .
  • Hoberg and Rothvoss[11] improved this algorithm to generate a solution with size at most . The algorithm is randomized, and its running-time is polynomial in the total number of items.

In machine scheduling

Consider the problem of unrelated-machines scheduling. In this problem, there are some m different machines that should process some n different jobs. When machine i processes job j, it takes time pi,j. The goal is to partition the jobs among the machines such that maximum completion time of a machine is as small as possible. The decision version of this problem is: given time T, is there a partition in which the completion time of all machines is at most T?

For each machine i, there are finitely many subsets of jobs that can be processed by machine i in time at most T. Each such subset is called a configuration for machine i. Denote by Ci(T) the set of all configurations for machine i, given time T. For each machine i and configuration c in Ci(T), define a variable which equals 1 iff the actual configuration used in machine i is c, and 0 otherwise. Then, the LP constraints are:

  • for every machine i in 1,...,m;
  • for every job j in 1,...,n;
  • for every i, j.

Properties

The integrality gap of the configuration-LP for unrelated-machines scheduling is 2.[5]

References

  1. ^ Eisemann, Kurt (1957-04-01). "The Trim Problem". Management Science. 3 (3): 279–284. doi:10.1287/mnsc.3.3.279. ISSN 0025-1909.
  2. ^ Gilmore P. C., R. E. Gomory (1961). A linear programming approach to the cutting-stock problem. Operations Research 9: 849-859
  3. ^ Karmarkar, Narendra; Karp, Richard M. (1982-11-01). "An efficient approximation scheme for the one-dimensional bin-packing problem". 23rd Annual Symposium on Foundations of Computer Science (SFCS 1982): 312–320. doi:10.1109/SFCS.1982.61. S2CID 18583908.
  4. ^ Bansal, Nikhil; Caprara, Alberto; Sviridenko, Maxim (2006-10-01). "Improved approximation algorithms for multidimensional bin packing problems". 2006 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS'06): 697–708. doi:10.1109/FOCS.2006.38. ISBN 0-7695-2720-5. S2CID 7690347.
  5. ^ a b Verschae, José; Wiese, Andreas (2014-08-01). "On the configuration-LP for scheduling on unrelated machines". Journal of Scheduling. 17 (4): 371–383. doi:10.1007/s10951-013-0359-4. ISSN 1099-1425. S2CID 34229676.
  6. ^ Knop, Dušan; Koutecký, Martin (2020-03-04). "Scheduling Kernels via Configuration LP". arXiv:2003.02187 [cs.DS].
  7. ^ a b Claire Mathieu. "Approximation Algorithms Part I, Week 3: bin packing". Coursera.{{cite web}}: CS1 maint: url-status (link)
  8. ^ Fernandez de la Vega, W.; Lueker, G. S. (1981). "Bin packing can be solved within 1 + ε in linear time". Combinatorica. 1 (4): 349–355. doi:10.1007/BF02579456. ISSN 1439-6912. S2CID 10519631.
  9. ^ Karmarkar, Narendra; Karp, Richard M. (November 1982). "An efficient approximation scheme for the one-dimensional bin-packing problem". 23rd Annual Symposium on Foundations of Computer Science (SFCS 1982): 312–320. doi:10.1109/SFCS.1982.61. S2CID 18583908.
  10. ^ Rothvoß, T. (2013-10-01). "Approximating Bin Packing within O(log OPT * Log Log OPT) Bins". 2013 IEEE 54th Annual Symposium on Foundations of Computer Science: 20–29. arXiv:1301.4010. doi:10.1109/FOCS.2013.11. ISBN 978-0-7695-5135-7. S2CID 15905063.
  11. ^ Hoberg, Rebecca; Rothvoss, Thomas (2017-01-01), "A Logarithmic Additive Integrality Gap for Bin Packing", Proceedings of the 2017 Annual ACM-SIAM Symposium on Discrete Algorithms, Proceedings, Society for Industrial and Applied Mathematics, pp. 2616–2625, doi:10.1137/1.9781611974782.172, ISBN 978-1-61197-478-2, S2CID 1647463, retrieved 2021-02-10