Suppose you have 27 weights weighing: 1², 2², 3², 4², ........, 25², 26² and 27² grams respectively.
(a)How can you group them into three groups so that each group has the same weight ?
(b) Is it possible to divide it into more than three groups satisfying the same conditions ?
Not knowing how to do this theoretically, I did what I usually do: wrote a program. But first:
The total of the first 27 squares is 6930 so the number of groups must divide evenly into this. The prime factors of 6930 are 2, 3, 3, 5, 7, 11, so above 3, the possibilities are 5, 6, 7, 9, 10, 11, 12, 14, 15, 18, ... with increasing unlikelihood of getting any possibilities given the disparity in sizes of the weights.
Note that the problem doesn't require that the same number of weights be in each group, so the number of groups doesn't have to divide evenly into 27.
The program for 5 groups finds that there are 11,995 ways of arranging the weights into 5 groups that add up to 6930/5 = 1386 each. To take one example:
9², 24², 27²
1², 6², 12², 23², 26²
3², 4², 5², 11², 13², 14², 15², 25²
7², 8², 10², 17², 20², 22²
2², 16², 18², 19², 21²

Posted by Charlie
on 20030531 11:06:01 