Probably a very easy puzzle for you guys; my point is more a mathematical one.
FYI, it was shown in an episode of Columbo.
You have 3 bags of coins. Each bag contains 50 identical coins. Two bags contain genuine gold coins, weighing 1 lb each (yes, I know, but that's what Columbo said!), one bag contains fake coins, weighing 1 lb 1 oz each, but for the rest completely identical in appearance to the genuine ones.
The task is to find which bag contains the fake coins, doing a single weighing on a scale with 1 plate (so no, you can't put one bag on one side and one bag on the other).
The solution given by Columbo was the following:
Number the bags from 1 to 3, take 1 coin from bag 1, 2 coins from bag 2 and 3 coins from bag 3. Put all 6 coins together on the scale. If the weight is 6 lb 1 oz, bag 1 contains the fake coins, if it is 6 lb 2 oz, bag 2, if it is 6 lb 3 oz, bag 3.
My doubt is:
Is this method general, meaning could you do it with any number of bags? And in that case would you have to adjust the number of coins taken from each bag? And does that depend on the difference in weight between fake and genuine coins?
The total weight would be something like: $W = \sum_{i}^{N_{bags}} {n_i \cdot w_i}$, where $n_i$ is the number of coins taken from bag $i$ and $w_i$ is the weight of 1 coin in bag $i$.
If only one bag (say the one numbered j) contains fake coins, the sum can be rewritten as: $W = n_j \cdot w_F + (\sum_{i \ne j}^{N_{bags}} {n_i}) \cdot w_G$, where $w_F$ is the weight of a fake coin and $w_G$ is the weight of a genuine coin.
And considering that: $dw = w_F - w_G$, $W$ can be further rewritten as: $W = n_j \cdot dw + (\sum_{i}^{N_{bags}} {n_i}) \cdot w_G$.
So I suppose Columbo's method only works when there is only one distinct value of $W$ for each possible $j$, which I assume can be imposed by an appropriate choice of the values of $n_i$ (although I would not know how).
What do you think? Is there any post or other resource where this theory is discussed?
Thanks!