views:

183

answers:

1

I have implemented the First-Fit-Decreasing bin packing algorithm to split a list of numbers into two 'bins' of equal size. The algorithm almost always finds the optimal packing arrangement but occasionally it doesn't.

For example:

The set of numbers 4, 3, 2, 4, 3, 2 can obviously be split into this arrangement: 1) 4, 3, 2 2) 4, 3, 2

The first fit decreasing algorithm does not find a solution.

It is not acceptable in this circumstance to NOT find the correct solution if one exists.

The original puzzle is to split a sequence of numbers into two sets that have an equal sum.

Is this just a simple bin packing problem or have I used the wrong algorithm?

+1  A: 

this is a duplicate question

klochner