Generalized Solution of 12 Coin Problem

Second look at 9 coin problem

Although the way of generalizing the 9 coin problem is fairly obvious, let me present a slightly different way of looking at it that can then be applied to the 12 coin problem.

Let us start by solving the problem for 3 coins. The solution is simply to weigh any 2 of them.

To go from 3 coins to 9 coins, replace each of the of three coins with a stack of 3 coins. Apply the previous method treating each stack like a single coin. That is, place one stack on each side of the balance to determine which stack that the counterfeit is in. For the final weighing place two of the coins from each stack on different balance pans. Note that the final weighing does not depend on knowing the result from previous weighing.

To go from 3n coins to 3(n+1) coins, replace each of the coins with a stack of 3 coins and for the first n weighings apply the method for 3n coins to each of the stacks. For the last weighing separate the coins from each stack as in the previous paragraph.

Generalization of 12 coin problem

I found this method in The Mathematics of Games by John Beasley. This is a very fine book but at the time that I am writing it is out of print.

Let us start with 3 coins, one of which may be heavy or light. There are 6 possibilities, which can be decided in 2 weighings using the following procedure: Place two coins on the balance for the first weighing. For the second weighing, remove the coin from the left pan, move the coin from the right pan to the left pan and move the coin that was not weighed to the right pan. It should be easy to convince yourself that this procedure will determine the counterfeit coin.

It may seem that there was an excess of coin shuffling in this procedure, but this was done to ensure that no coin is on the same pan for each weighing. It is crucial to the procedure that this always be true.

To go from 3 coins to 9 coins, replace each coin with a stack of 3 coins and repeat the above two weighings using the stacks of 3 coins in place of the single coins. At the end of 2 weighings we know which stack contains the counterfeit coin and also whether it is heavy or light. For the final weighing we will place two coins from each stack on the left and right balance, but we are not ready yet for the final weighing.

Introduce 3 more coins. Modify the procedure by having one of the 3 coins stay on the left pan for the 2 weighings and another coin to stay on the right balance for both weighings with the last of the 3 coins off the balance for each weighing.

Since the procedure for weighing 3 coins guaranteed that no coin was in the same pan for all 3 weighings we know that none of the stacks of 3 coins remains in the same pan. Therefore we will know that the counterfeit coin is one of the 3 additional coins if the balance behaves the same for both weighings.

The final weighing will include the single coin that was on the right pan moved to the left pan and the coin that was off the balance moved to the right pan. Additionally, from each stack of 3 coins, place one one the left pan and another on the right pan. This will allow the final weighing to determine which of the 12 coins was counterfeit and again guarantees that no coin is on the same pan for all 3 weighings.

If we designate by f(w) the number of coins used in w weighings, the above procedure can be used to go from f(w) to f(w+1) = 3*f(w) + 3 by replacing each of the coins by from the previous weighing by a stack of 3 coins and introducing 3 more coins. After w weighings, if the pans behave the same on each weighing, then the counterfeit must be one of the 3 additional coins. Otherwise, we know which stack of 3 contains the counterfeit and also whether it is heavy or light. For the final weighing shift the 3 added coins as above and choose two coins from each group of 3 to be on the left and right pans. Then the next weighing determines the counterfeit. Again no coin is on the same pan for every weighing

Let us look at the number of coins covered by each weighing.
f(2) = 3
f(3) = 3*f(2) + 3 = 3*3 + 3 = 32 + 3 = 12
f(4) = 3*f(3) + 3 = 33 + 32 + 3 = 39

For weighing w we get the geometric series:
f(w) = 3 + 32 + 33 + ... + 3(w-1) =
3*(1 + 3 + 32 + ... + 3(w-2)) = 3*(3(w-1) -1)/2 (by the formula for geometric series) =
(3w - 3)/ 2. Refer to my topic on geometric series for a derivation of the formula.

f(w) = (3w - 3)/ 2 .

Since each coin may be light or heavy, the total number of possibilities is
2*f(w) = (3w - 3), which is just 3 less than the maximum possibilities of 3w that can be determined in w weighings.

In view of the formula for the number of coins, let us take another look at the above algorithm to see how neatly everything ties together. In weighing (w+1), the first w weighings are based on the previous weighing for (3w - 3)/ 2 coins requiring (3w - 3) different weighing outcomes. Each coin is replaced by a stack of 3 coins and at the end of the w weighings it is known which stack of 3 contains the counterfeit coin and whether the stack is heavy or light. When the 3 additional coins are added, there are 3 additional outcomes for whether the left pan, right pan or neither pan goes down each time. The total number of possibilites for the first w weighings is therefore (3w - 3) + 3 = 3w, which is the maximum possible for w weighings.



Home