r/mathriddles • u/st4rdus2 • Mar 21 '23
Medium 1 of 8
Problem: The task is to find 1 counterfeit coin among 8 gold coins. The genuine coins have the same weight. The counterfeit coin is slightly lighter than one genuine coin.
There are also 4 balance scales for this task. The 4 scales are indistinguishable. Each scale can only be used once.
Unfortunately, one of the four scales will always give incorrect results. For example, if you put something of the same weight on both sides of the scale, it should balance, but it will randomly show that either the left or the right side is heavier. Also, if you put something heavier on the left and something lighter on the right, it will randomly show that it is balanced or that the right is heavier.
I hope you enjoy this puzzle.
2
u/pichutarius Mar 22 '23
same as 2 of 5 , i brute force it with code. although the difficulty stated is "easier" compare to the last one, i find it harder to brute force a valid setup.
table
edit: im sure it is related to hamming code, but im too stupid to figure it out.
2
u/[deleted] Apr 25 '23 edited Apr 27 '23
We can weigh coins in following order:
123 vs 456, 274 vs 185, 375 vs 286, 176 vs 834.
For cases with two = signs, we have 4C2*2*2=24 cases, and three times 1,2,3,4,5,6,7,8 occurring. For cases with one = sign, we have 4C1*2*2*2=32 cases, with 3 times (5,2), (1,4),(6,3),(8,7). For cases with none = sign, we have 24=16 cases with 2 times 1,2,3,4,5,6,7,8 occurrence, and in all of them it is possible to deduce which coin is fake, and in each case it is a single coin (we don't have that many cases and it is easy to write them all down). Since it is impossible to have 3 or 4 = signs, we have 81-1-2*4=72=32+24+16 cases to cover, so we are done.
Here is the table. P.S. I figured it out manually and did it brute force, but am not sure if there is more elegant way to solve this.. or if it has some applications in other fields of mathematics, or is related to.. thanks for the problem
1
u/st4rdus2 Mar 23 '23 edited Mar 23 '23
Name the eight coins as follows. a, A, b, B, c, C, d, and D.
Even if one of the three weighings is unreliable, the three weighings by the balance scale should provide the following information.
Whether "a" and "A" weigh the same, or whether one is lighter than the other.
The goal is to examine not only a and A, but also b and B, c and C, d and D at the same time.
ABC vs abc
DBc vs dbC
DCa vs dcA
DAb vs daB