There are 100 visually identical coins of three types: golden, silver and copper. There is at least one coin of each type. Each golden coin weighs 3 grams, each silver coins weighs 2 grams and each copper coin weighs 1 gram. How to find the type of each coin performing no more than 101 measurements on a balance scale with no weights.
Problem
Source:
Tags: combinatorics, coins, algorithm, Strategy
blawho12
30.11.2019 00:46
Take the first 2 coins and compare them. If they are the same weight, note that they are the same type, and compare one of them to a new coin, until we have an imbalance.
Now, call let these two coins have weight $a, b$, $a < b$.
Compare $b$ against new coins until we get one of weight $c \neq b$.
Case 1: $b < c$
In this case we have $a < b < c \implies a = 1, b = 2, c = 3$. Then we just compare all coins with $c$ which tells us their exact type. We are done in 99 measurements.
Case 2: $c < b$
In this case we measure $a$ vs $c$.
If $a \neq c$ then we have $a < c < b$ or $c < a < b$ which gives us a coin of weight 2 which we can measure everything else against, so we are done in 100 measurements.
If $a = c$ then we measure $a+c$ vs $b$.
If $a + c < b$, then $a = c = 1, b = 3$. Thus $a+c$ has weight 2, which we compare to all other coins to give us their types in 101 measurements.
If $a + c = b$ then $a = c = 1, b = 2$. Thus $a+c, b$ have weight 2, and we can use either to finish in 101 measurements.
If $a + c > b$ then $a = c = 2, b = 2, 3$ Thus $a, c$ have weight 2, and we can use either to finish in 101 measurements.
As in all cases we can finish in 101 measurements, we are done.