Balanced number partitioning
Balanced number partitioning is a variant of multiway number partitioning in which there are constraints on the number of items allocated to each set. The input to the problem is a set of n items of different sizes, and two integers m, k. The output is a partition of the items into m subsets, such that the number of items in each subset is at most k. Subject to this, it is required that the sums of sizes in the m subsets are as similar as possible.
An example application is identical-machines scheduling where each machine has a job-queue that can hold at most k jobs. The problem has applications also in manufacturing of VLSI chips, and in assigning tools to machines in flexible manufacturing systems.
In the standard three-field notation for optimal job scheduling problems, the problem of minimizing the largest sum is sometimes denoted by "P | # ≤ k | Cmax". The middle field "# ≤ k" denotes that the number of jobs in each machine should be at most k. This is in contrast to the unconstrained version, which is denoted by "".
Two-way balanced partitioning
A common special case called two-way balanced partitioning is when there should be two subsets. The two subsets should contain floor and ceiling items. It is a variant of the partition problem. It is NP-hard to decide whether there exists a partition in which the sums in the two subsets are equal; see problem . There are many algorithms that aim to find a balanced partition in which the sum is as nearly-equal as possible.- Coffman, Frederickson and Lueker present a restricted version of the LPT algorithm, in which inputs are assigned in pairs. When inputs are uniformly-distributed random variables, the expected largest sum of RLPT is exactly. The expected work-difference is.
- Lueker presents a variant of the LDM algorithm. Its expected work-difference is.
- Tsai presents an algorithm called Restricted Largest Difference. Its work-difference is almost surely.
- Yakir presents a balanced variant of the LDM algorithm for m = 2, called BLDM. Its expected work-difference is.
- Mertens presents a complete anytime algorithm for balanced two-way partitioning. It combines the BLDM algorithm with the complete-Karmarkar–Karp algorithm.
Balanced triplet partitioning
- Kellerer and Woeginger adapt the LPT algorithm to triplet partitioning. Their algorithm is called modified-LPT or MLPT. It orders the items from large to small, and puts each item in turn into the bin with the smallest sum among those bins that contain fewer than 3 items. They show that the MLPT algorithm attains at most of the minimum largest sum, which is the same approximation ratio that LPT attains for the unconstrained problem. The bound is tight for MLPT.
- Chen, He and Lin show that, for the same problem, MLPT attains at least of the maximum smallest sum, which is again the same ratio that LPT attains for the unconstrained problem.
- Kellerer and Kotov present a different algorithm, that attains at most of the minimum largest sum.
Balanced partitioning with larger cardinalities
- Babel, Kellerer and Kotov study a variant in which there are k×''m items, and each of the m'' sets must contain exactly k items. They present several heuristic algorithms for approximating the minimum largest sum:
- * Folding algorithm: optimal for m = 2, and in general has tight approximation ratio.
- * Exchange algorithm: tight approximation ratio. It is not known if it runs in polynomial time.
- * Primal-dual algorithm.
- *The also conjecture that Modified-LPT has an approximation ratio . Currently, this conjecture is known to be true only for k = 3. For k > 3, it is known that its approximation ratio is at most 2.
- Michiels, Korst, Aarts, van Leeuwen and Spieksma study a variant in which each of the m sets must contain either ceiling or floor items. They extend the Balanced-LDM from m=2 to general m. The generalized algorithm runs in time. They prove that its approximation ratio for the minimum largest sum is exactly 4/3 for k = 3, 19/12 for k = 4, 103/60 for k = 5, 643/360 for k = 6, and 4603/2520 for k = 7. The ratios were found by solving a mixed integer linear program. In general, the approximation ratio is at least and at most. The exact MILP results for 3,4,5,6,7 correspond to the lower bound. For k>7, no exact results are known, but the difference between the lower and upper bound is less than 0.3%. When the parameter is the number of subsets, the approximation ratio is exactly.
- Zhang, Mouratidis and Pang show that BLDM might yield partitions with a high work-difference, both when the inputs are distributed uniformly, and when their distribution is skewed. They propose two alternative heuristics: LRM reduces the work-difference to 1/3 the work-difference of BLDM when the distribution is uniform; Meld reduces the work-difference when the distribution is skewed. A hybrid algorithm combines BLDM, LRM and Meld and adapts dynamically to different data distributions.
- When k is fixed, a PTAS of Hochbaum and Shmoys can be used for balanced partitioning. When k is part of the input, no PTAS is currently known.
- Dell'Amico and Martello study the problem of minimizing the largest sum when the number of items in all sets is at most k. They show that the linear-program relaxation of this variant has the same optimal value as the LP relaxation of the unconstrained variant. The expression, where xi are the inputs ordered from large to small, is a lower bound for the optimal largest-sum, and its worst-case ratio is 1/2 in both variants. The improved expression has worst-case ratio 2/3 in the unconstrained variant and 1/2 in the constrained variant. The approximation ratio of the modified list scheduling is 1/2 for the unconstrained variant, but it is 0 for the constrained variant. The approximation ratio of the modified LPT algorithm is at most 2. They also show that the lower bound of has a tight worst-case performance ratio of 3/4, and that their PD algorithm has a tight performance ratio of 4/3.
- He, Tan, Zhu and Yao consider the problem of maximizing the smallest sum. They show that the FOLDING algorithm has tight approximation ratio. They present a new algorithm, HARMONIC1, with worst-case ratio at least. Both these algorithms are ordinal – they partition the items based only on the order between them rather than their exact values. They prove that any ordinal algorithm has ratio at most for maximizing the smallest sum. This indicates that HARMONIC1 is asymptotically optimal. For any fixed k, any ordinal algorithm has ratio at most the smallest root of the equation. When k tends to infinity, this upper bound approaches 0.
Relations between balanced and unconstrained problems
- Babel, Kellerer and Kotov prove that the ratio between the unconstrained optimum and the constrained optimum is at most, and it is tight.
- Kellerer and Kotov prove that every heuristic for balanced partitioning with capacity k and approximation-ratio r can be employed to obtain a heuristic for unconstrained partitioning with approximation-ratio. In particular, their -approximation algorithm for triplet partitioning can be used to obtain a heuristic for unconstrained partitioning with approximation-ratio.
Different cardinality constraints
Categorized cardinality constraints
Another generalization of cardinality constraints is as follows. The input items are partitioned into k categories. For each category h, there is a capacity constraint kh. Each of the m subsets may contain at most kh items from category h. In other words: all m subsets should be independent set of a particular partition matroid. Two special cases of this problem have been studied.Kernel partitioning
In the kernel balanced-partitioning problem, some m pre-specified items are kernels, and each of the m subsets must contain a single kernel. Here, there are two categories: the kernel category with capacity 1, and the non-kernel category with unlimited capacity.- Chen, He and Yao prove that the problem is NP-hard even for k = 3. They then present an algorithm called Kernel-LPT : it assigns a kernel to each subset, and then runs the modified LPT algorithm. They prove that, with k = 3, KLPT has an approximation ratio for the minimum largest sum. However, Chen, He and Lin claim that its tight approximation ratio is for the minimum largest sum, and for the maximum smallest sum.