#### mssloan

##### Beta member

- Messages
- 1

- Location
- United Kingdom

I need some advice to solve a tricky weight selection problem.

Imagine a scale with a known weight X on one side. There is a selection of smaller weights available of varying size. Some of the smaller weights can be of the same value. The requirement is to choose out of the set of weights the smallest number which, when placed on the other side of the scale, bring the scale closest to being balanced. I have created a brute force method which goes through every possible permutation but this can take a long time if there are a large selection of smaller weights (24 weights gives over 66 million combinations).

Are there simplier and faster computational algorithms which will solve this problem?

mssloan