That sounds interesting. I would like to know what the practical application of this is.
To be sure, suppose you meant disjoint subsets, and the sum of the subsets was roughly equal (not average)
In addition, in the example, I could not understand how you decided (for sure) to make 2 sets of 2 and one of 5.
I can think of the greedy under the optimal solution.
- Sort numbers in descending order. (smaller numbers surprise less, so deal later).
- Determine the number of sets that you have. not too sure about it
- (
robin )
.
1,2,3,6,9,10,15,23,27
: 27, 23, 15, 10, 09, 06, 03, 02, 01
27 3 2 1 = 33
23 09 = 30
15 10 06 = 31