I have a problem, which appears to be similar to number partitioning: a set of numbers partitioned (two-way), such that the sum of the numbers in each subset are as close as possible to a targeted ratio (instead of having the minimum difference, as in the number partitioning problem). Can I use the same algorithms? How would I modify them? Is another approach more suitable?
Context:
I am implementing a load-balancing algorithm, for a work conserving Group Weighted Round Robin (GWRR) scheduler. In some corner-case (some groups have less tasks than CPUs in the system), I want to partition the weighted groups and assign them to the subsets of a partitioning of the set of CPUs, so that the ratio of the sums of (predicted) CPU idle times, in the subsets of the CPU partition, is as close as possible to the ratio of the weight sums, in the subsets of the group partition. The group partition splits the groups, using a normal number partitioning algorithm (CKK), so that group weight sums, in each subset, have the minimum possible difference (but they are unlikely to match, in the general case).
Any ideas?
Factor–r Sum Subsets
orSubset-Sums Ratio
problem, tries to derive two subsets with a target sum ratio, but does not require that all numbers in the original multi-set are included in the subsets ==> https://pdfs.semanticscholar.org/4dcb/83bfcfe2aacf506f58b3274c07bb17db7489.pdf – kavadias Feb 07 '17 at 17:11