Finding a Heavier Coin
You have beans that look identical, but one is heavier than the rest, which all weigh the same. Using a two-pan balance scale (which only tells you which side is heavier, or if they balance), what is the minimum number of weighings needed to guarantee identifying the heavy bean?
Work it out, then compare with the answer.
SolutionShow the worked solution
Lower bound. Each weighing has three outcomes: left heavier, right heavier, or balance. A strategy of at most weighings may let later weighings depend on earlier results, but it can still be drawn as a ternary decision tree of depth . Such a tree has at most leaves.
Each of the beans could be the heavy one, and each possibility must end at a different leaf. So we need . Since , two weighings cannot suffice.
Three weighings suffice.
- First weighing: split the beans into three groups of and weigh two of the groups against each other. If one pan is heavier, the heavy bean is in that group. If the pans balance, it is in the third group. Either way, candidates remain.
- Second weighing: split these into three pairs and weigh two pairs against each other. By the same reasoning, candidates remain.
- Third weighing: put one remaining bean on each pan. The heavier bean is the odd one.
Generalisation. The same argument works for beans with one known to be heavier. The counting bound gives . Conversely, a weighing can always split the candidates into two equal pans and a remainder, each part of size at most , where is the current number of candidates. Hence the minimum number of weighings is .