partition set of integers - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

partition set of integers

lore337lore337 Posts: 1Member
Hello,

I need to partition a set S of integers into k subsets, so that the variance of the sum of the integers in each partition is minimized.

Example, for k=3

the original set:
S = {1, 1, 2, 4, 6, 17, 19, 25, 28, 39, 49}

is split into:
s1={28,19,17}
s2={39,25}
s3={49,6,4,2,1,1}

because it minimizes var(63, 64, 64)

Note that S can have a large number of elements... so I need something relatively efficient.

Any help would be appreciated.

Thanks!!

Comments

Sign In or Register to comment.