Maths WorkshopMaths problems with full solutions
Exercise 1237Combinatorics › Counting principlesOlympiadAdded 4 Nov 2026

Finding the heavy coin with a balance

#algorithms#information#induction#weighings

Statement

Among NN coins, exactly one is heavier than the others, which all have the same weight. You may use a balance scale (comparing the weights of two groups, with three possible outcomes: left heavier, right heavier, balance).

  1. Prove that if N=3kN=3^k, the heavy coin can always be found in kk weighings.
  2. Prove that if N>3kN>3^k, it is not always possible to find it in kk weighings.
Hint

For part 1, divide the coins into three equal groups. For part 2, count the possible sequences of outcomes.

Show solutionHide solution

Solution

1. Strategy. Induction on kk. For k=0k=0 there is a single coin. For k≥1k\ge1, divide the 3k3^k coins into three groups A,B,CA,B,C of 3k−13^{k-1} coins and weigh AA against BB.
- If AA is heavier, the heavy coin is in AA; if BB is heavier, it is in BB.
- If the scale balances, it is in CC.

In each case, the heavy coin is among 3k−13^{k-1} coins, which can be found in k−1k-1 further weighings by the induction hypothesis. In total kk weighings suffice.

2. Lower bound. Fix a strategy using at most kk weighings. Each possible heavy coin gives a sequence of at most kk outcomes, each outcome being one of 33 values. There are at most 3k3^k such sequences.

If two different coins gave the same sequence, the strategy could not tell them apart. So a strategy that always finds the coin must give distinct sequences to distinct coins, hence N≤3kN\le3^k. Therefore N>3kN>3^k coins cannot be handled in kk weighings.

Remark. An information-theoretic argument: each weighing provides at most log⁡23\log_23 bits of information. The harder variant with a coin that may be heavier or lighter is solved by the same principle: 1212 coins in 33 weighings.

Lesson. Optimal algorithm problems come in two halves: an explicit strategy, and a counting argument on outcomes showing that nothing better is possible.