"You have 12 coins that all look exactly the same. One is counterfeit and is either heavier or lighter than the other 11. With a balance beam scale, isolate the counterfeit coin in three moves."
Any uses for Negative-base systems?
"You have 12 coins that all look exactly the same. One is counterfeit and is either heavier or lighter than the other 11. With a balance beam scale, isolate the counterfeit coin in three moves."
Any uses for Negative-base systems?
EDIT: According to
> https://en.wikipedia.org/w/index.php?title=Balance_puzzle&ol...
if you know that one coin is different from the others, with 3 weighings, you can even detect it among 13 coins (not just 12).
ABC, one of them is different weight than the other two (either more or less)
Possible ways to weigh them:
A v B
A not enough information
E C is odd one out
B not enough information
A v C
A not enough information
E B is odd one out
C not enough information
B v C
B not enough information
E A is odd one out
C not enough information
AB v C
AB not enough information
E C is odd one out
C C is odd one out
AC v B
AC not enough information
E B is odd one out
B B is odd one out
BC v A
BC not enough information
E A is odd one out
A A is odd one out
In all possible ways to weight 3 coins, all have uncertainty which means you cannot deduce which is the odd one out.It's easier than the 12-coin one different puzzle, but introduces the ternary concept well enough to get you started on the harder problem (there are some other complications to it as well).
Weigh 2 coins. If the scales move you've found the lighter coin. If the scales balance, it's the third coin you didn't weigh.
So I think it goes like this:
- you have 12 coins, and each one has an equal chance of being heavier or lighter than the others - so that's 24 possiblities
- you have 3 moves, and the result of each move could be one side of the beam goes down, one side goes up, or it balances. That means you can create a system that identifies 3^3 = 27 outcomes. So far so good.
- you need each of your outcomes to provide real information. if it was a binary problem that means you're not really getting any information if the beam balances
(bit sketchy on that last point, maybe someone can help with that)
Wrong. If it was true, that would imply that the probability of it balancing is 1, since the information you get is -log2(probability). Obviously the probability of it balancing is lower than 1, so you do get information.
It is a kind of search problem, but the steps aren't recursive and you have to use several tricks to maximize the information you get out of each measurement.
This is because there are 3 possible scenarios:
1. the biased coin is on the right side of the scale,
2. the biased coin is on the left side of the scale,
3. or the biased coin is the coin not measured (since the scale is balanced).
In essence, even though this scale only has 2 sides, you gain information proportional to having 3 sides.
Hence if we were to extend this to a scenario where you had n coins, of which one was biased and others fair, you would only need log_3 n measurements total to find the biased coin.
This idea has pretty neat applications. For example, if you wanted to prove that merge sort has a O(n log n) computational complexity, you can use this scale idea.
Move 1: weigh 6 coins vs 6 coins. Isolate the heavier set for the next move. Move 2: weigh 3 coins vs 3 coins. Isolate the heavier set for the next move. Move 3: weigh any two of the 3 remaining coins. If one is heavier, that is the counterfeit. Otherwise (if coins are equal in weight) the remaining coin is counterfeit.
> One is counterfeit and is either heavier or lighter
It turned out the counterfeit was lighter and you discarded it after the first weighing.
This was a fun one to work out on paper though.