Let indicate that item is placed in the first bin; otherwise it is placed in the second. The two-bin load balancing problem has the familiar mixed-integer formulationThe continuous variable becomes the maximum of the two bin loads at an optimum. A pure binary integer program, avoiding any integrality assumption on the weights or on , is obtained by labelling a heavier bin as the first bin:The constraint ensures that the first load is at least the second, so the objective is their maximum. Every partition can be relabelled in this way, and every binary solution gives a partition. Thus this all-integer assignment formulation has exactly the original optimal value.
Use the relative-error approximation for minimization convention: an -approximation returns a feasible solution of value with on every instance, where is the optimum. Equivalently the relative excess is at most ; the multiplicative-ratio convention reports instead.
Before item is assigned, the total load already placed is . The lighter of two bins has load at most half that total. Positivity of the weights givesChoose a bin attaining the final maximum load , and let be its last assigned item. No later item enters that bin, soEvery feasible schedule has and . HenceThe ordered weights make the greedy loads after two assignments and then , regardless of how the final tie is resolved. The optimal partition has loads . Thus the factor is attained, not merely a loose bound. We conclude the sharp greedy two-bin scheduling bound
Several other approaches illustrate the range between fast heuristics, certified bounds and approximation schemes.
Sorting weights in decreasing order before greedy assignment avoids the example : it starts with the weight , then places both unit weights in the other bin, giving the optimum. This is a useful scheduling heuristic, although improvement on one example is not a proof of an arbitrary claimed approximation ratio. Local improvement can additionally move a single item or swap items between bins whenever it reduces the maximum load; it produces a local optimum, which need not be global.
A linear-programming relaxation replaces by . The choice for every item gives load in both bins, and summing the load constraints shows that no smaller relaxed value is possible. Together with the indivisibility bound this provides a lower bound on the integer optimum. Any feasible heuristic schedule gives an upper bound . Their ratio is a computable quality certificate. Branch-and-bound can improve these bounds by fixing assignment variables and solving subproblems, although worst-case exact running time need not be polynomial.
For integer weights one can instead solve the problem exactly by dynamic programming. Start with attainable subset sums and updatediscarding values above . Let be the largest retained sum. Choosing that subset for one bin gives loads and maximum , which is optimal because every partition has a lighter side of weight at most . The running time is pseudopolynomial: it depends on numeric magnitude, not merely the binary length of .
This exact algorithm also yields rounded dynamic programming for two-bin load balancing. For rational weights and , choose and scaled integer weights . Their total is at most , so exact dynamic programming on them costs arithmetic operations. Let be its optimal scaled maximum load. The original optimal partition is feasible for the scaled problem with load at most , so . When the scaled partition is lifted, each bin contains at most rounding errors, each smaller than . Therefore its original maximum load satisfiesThis is a fully polynomial-time approximation scheme: for each requested tolerance it gives a certified feasible solution in time polynomial in the encoded rational input and , with rational arithmetic accounted for. It works here because two-bin balancing has the subset-sum structure; one cannot infer that arbitrary combinatorial optimization problems admit such a scheme.
Articles by others on the same topic
There are currently no matching articles.