[This is a solution to the heavy coin puzzle posted earlier]
A brief description of the problem:
You have 96 coins of weight H, 4 of weight L, with H>L. With two or fewer uses of a two pan balance, find a heavy coin.
Make three groups, A with 33 coins, B with 33 coins and C with 34 coins.
Weigh A against B.
If A is heavier, then A can have at most one light (L) coin.
Now we can take two coins from A and weigh them against each other. Pick the heavier one if of different weight, or pick any one if equal.
The case when B is heavier is similar to the above case.
If A and B are of equal weight, then we have the following possible scenarios
ABC33H33H30H+4L32H+L32H+L32H+2L31H+2L31H+2L34H
Now move one coin from A to B (call the result as Ba).
Weigh Ba against C.
If Ba is heavier than C, then the coin you moved was a heavy coin.
If C is heavier, then any coin in C is a heavy coin.
If Ba and C are equal, then the coin you just moved is a light coin, and the 32 coins left in A are all heavy.
A brief description of the problem:
You have 96 coins of weight H, 4 of weight L, with H>L. With two or fewer uses of a two pan balance, find a heavy coin.
Solution
Make three groups, A with 33 coins, B with 33 coins and C with 34 coins.
Weigh A against B.
If A is heavier, then A can have at most one light (L) coin.
Now we can take two coins from A and weigh them against each other. Pick the heavier one if of different weight, or pick any one if equal.
The case when B is heavier is similar to the above case.
If A and B are of equal weight, then we have the following possible scenarios
ABC33H33H30H+4L32H+L32H+L32H+2L31H+2L31H+2L34H
Now move one coin from A to B (call the result as Ba).
Weigh Ba against C.
If Ba is heavier than C, then the coin you moved was a heavy coin.
If C is heavier, then any coin in C is a heavy coin.
If Ba and C are equal, then the coin you just moved is a light coin, and the 32 coins left in A are all heavy.
No comments:
Post a Comment