Partition an even sized multi-set of whole numbers into two multi-sets of equal size having almost equal sums

Revision en2, by shubhinanugullu, 2016-11-13 14:07:46

We are given a multi-set of whole numbers S of size 2n. All whole numbers in S are in the range [0, d]. We need to partition S into two multi-sets A and B such that |A| = |B| = n. Our task is to find such A and B which minimise |sum(A)-sum(B)|. What is an efficient algorithm to do so?

Tags #multiset, sum, subset sum

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English shubhinanugullu 2016-11-13 14:07:46 73
en1 English shubhinanugullu 2016-11-13 11:27:44 373 Initial revision (published)