We can assume that Captain Flint’s lightest piece is magical and has zero mass (otherwise subtract the weight of the lightest stone from all of them, and check that solving this problem is equivalent to solving the original one.)

Now take the finite abelian group A generated by all the weights, m_1, .., m_99. Suppose the total weight is M. Then we have M/2 is in A (because the pieces can be be divided into two equal parts when he takes away the 0-weight piece,) and we also have M-m_i/2 is in A for any index i (this is the total in one of the piles after removing the i’th piece and dividing.) But this means that the difference, m_i/2, is also in A for any i.

But this means that any linear combination of the m_i/2 is also in A, in particular m_j/2 is a linear combination of the m_i and so m_j/2/2=m_j/4 is in A. So by induction, m_j/2^n is in A for any n.

Now suppose some m_j is not zero for some fixed j. Then there’s a problem: any subgroup of an abelian group with finitely many generators will still be finitely generated. But the subgroup of A generated by m_j/2, m_j/4, .., m_j/2^n, … can’t be generated by a finite number of elements (if it were, all the generators would be rational multiples of m_j with a greatest common denominator.) But remember A is finitely generated by construction, so we have a contradiction. So after subtracting the lightest weight, all the weights are zero – hence they were equal at the start.

]]>