Next is a riddle that I found interesting and I decide to share it with you. Try solve it by yourself before reading the answer.
A merchant has 13 fair gold coins with one fake among them. The fake coin have been made by a skillful thief and look identical to the real coins, except for it's weight, its different, it might be lighter or heavier then the real one. The merchant has a balance that allows him to compare the weight of two groups of coins. Can he distinguish the fake coins from the fair coins with only 3 weights?
- 13 coins
- 1 of the 13 is fake
- Fake coin is lighter or heavier
- 3 weights
SPOILER ALERT: Bellow is the answer!
To make it easier to explain, I will use the next marks:
1. First weighting: $4U$ vs $4U$ | not weighting $5U$
if 1 is even: So we know that the fake coin is among the 5 we didn't weight, and the one we did are real. So we got 5 unknown and 8 real coins.
2. Second weighting: $1R + 1U$ vs $2U$ | not weighting $7R + 2U$
if 2 is even: so it must be at those 2 coins we put did not weighted.
3. Third weighting: $1R$ vs $1U$ | not weighting $10R + 1U$
If it's even than the fake coin is the one we weighted, if its not, then the fake coins is the one we put aside.
if 2 is not even and left side is lighter I replace the 1U with 1R from the right side, I take the other 1U from the right side and move it to the left side, and I will add 2R for the right side, so now we will weight:
4. Third weighting: $2U + 1R$ vs $3R$ | not weighting $6R + 1U$
Now we done with the case where 1 is even, now lets see what if it's not.
Lets assume that left side is the lighter one. First I take 3U from the lighter side and place them aside, then I take 3U from the heavier side and place them on the lighter side of the weight, and finally I take 3R and place them on the heavier side.
5. Second weighting: $4U$ vs $3R + 1U$ | not weighting $3U + 2R$
if 5 did not changed Than the fake coin is not in $3U$ we moved or put aside, but in those we did not moved, so we got 1 weighting left for $2U$ it's the same solution as we did for 3. Third weighting.
if 5 changed sides, swapped So we know that the fake coin is in those 3U we moved, and we also know the fake coin weight!
If 5 is even So we know that the fake coin is in those we put aside, and since we only took the heavier one, we also know the fake coin weight!
So in order to find the fake coin among 3 coins while we know that the weight of the coin we do the next, its the same as 4. Third weighting
5. Third weighting $1U$ vs $1R$
And this is it!