Fake coin detection and relationship between coins and comparisons

discrete mathematicsinductionpuzzle

I am reading about the problem of detecting a fake coin among a collection of $m$ coins optimally.
The first task is to define what we mean by optimally.
It starts with $m$ coins as a given and the following reasoning:

If we compare 2 coins by their weights we have 3 possible outcomes of
such a comparison which are tip to the left, tip to the right and even
balance. So with $n$ comparisons we have $3^n$ different outcomes at
most

So far so good. Then

Suppose we have $m$ coins and at most 1 is fake. Then there are $1 + 2m$
possible possibilities which are 1 (all genuine) + $m$ (one of the m
coins is fake/lighter) + $m$ (one of the m coins is fake/heavier)

(a) At this point I am not really sure why it is $2m$ and not $\frac 2 m$ since it is $\frac 1 m$ that is fake (heavier/lighter).

Then it says:

with $n$ comparisons, the number of coins among which a fake can be
detected is at most $m$ where $1 + 2m = 3^n$. More precisely if the
number of m coins is greater than $\frac {(3^n – 1)} 2$ then it is not possible
to guarantee we can find the fake coin with n comparisons

So optimally here means with $n$ comparisons.

(b) At this point though I don't really understand how the $n$ (as number of comparisons) showed up and determined/defined $m$ when all we had as given when we started is that we have $m$ coins.

Could someone please help me with (a) and (b)

Best Answer

For a, let there be $m=5$ coins. We can call them $A,B,C,D,E$. It is asserted that there are $2 \cdot 5+1=11$ possibilities. Either one of the coins is heavy ($5$ possibilities because it can be any coin), all the coins are correct, or one of the coins is light (again $5$ possibilities.)

For b, let us continue with $m=5$. Each weighing has $3$ possible results. If we weigh twice, there are $3 \cdot 3=9$ possible results. As we can only distinguish $9$ possibilities with two weighings, it must take at least $3$ weighings to find a possible fake coin among $5$. You determine $n$ by finding the smallest $n$ so that $3^n \ge 2m+1$ so you can distinguish enough possibilities. This does not prove that the coin can be found in $n$ tries, it only proves that it cannot be found with certainty in $n-1$. To prove that $n$ will work, one needs to lay out a strategy of weighings.

$m=5, n=3$ should be easy because $3^3=27$ is so much more than $11$. We first weigh $AB$ vs $CD$. If they balance $ABCD$ are all good and we weigh $E$ against any other coin and have the result. If $AB$ are heavier than $CD$ we can have either of $AB$ heavy or $CD$ light. We can then weigh $AC$ against $BD$. If $AC$ is heavy either $A$ is heavy or $D$ is light. We weigh $A$ against $B$ and have the answer. The other results are similar. We have shown that $3$ weighings suffice for $m=5$ coins.

Related Question