Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 Puzzles and Games » Divide set of numbers into 2 sets so diff of their sums is min. » 2009-03-26 04:18:11

mathmagic
Replies: 3

Howdy,

I'm trying to solve this problem, but can't seem to make much progress.

Given a set of positive numbers, divide it into 2 sets (which differ in size by 1, at max) so that the difference of their sums is minimum.

So, for e.g., given the following set: [8, 4, 25, 17], the possible combinations are:

1. [8,4] & [25,17] - 30
2. [8,25] & [4,17] - 12
3. [8,17] & [4,25] - 4

Clearly, the answer is 3: [4, 25] & [8, 17].

Thanks.

Board footer

Powered by FluxBB