Originally posted by Paul Clapham:
Oh, I see, your problem is that you don't know how to allocate the objects into the buckets of different sizes and you're looking for suggestions.
But you still need to define "close enough". If you have 10 objects and you want to put them into two buckets which are both defined as 50%, do you absolutely have to end up with 5 objects in each? Or is 4 in one and 6 in the other "close enough"?
So for close enough I would say, if it can be divided exactly then it should be. If not then it should be as close as possible.
So if there are 100 objects and the percentages are 10%,20%,30%,40% then they should be divided as 10,20,30,40.
However if the are 99 objects, then ideally it would be 10,20,30,39.
If there are only 3 objects, then 1,1,1 would have to suffice.