Re: Algorithm Request
- Posted by "C. K. Lester" <cklester at yahoo.com> Apr 07, 2003
- 388 views
Howdy, Matt, When I said, "as close to being equal in value as possible," I meant their sums... > Could you define 'equal amounts?' I assume you don't mean simply splitting > n numbers into k piles, so that each pile k has either int(n/k) or > int(n/k)+1 numbers. Right. I don't mean that... > Are you concerned with the sum of the numbers? Yes! So, with this set: 1, 2, 4, 5, 8, 11 split into two groups, it would create TWO groups of 3 numbers each whose sums were the closest possible to equal... 1, 4, 11 = 16 2, 5, 8 = 15 When there are groupings of equal difference, uh... I don't know. Doesn't matter at this point... Thanks!