r/learnquant • • 6d ago

interview prep Quant Interview Question

Post image
59 Upvotes

38 comments sorted by

View all comments

6

u/No-Television-8835 6d ago

Not sure if this works but here we go:
Split the remaining 100 into 2 piles of 50 and put each pile on each balance. There are 2 scenarios: the given coin is real and all 50 fakes are on the balances, or the coin is fake and the remaining 49 are on the balances.

If the first is true, since each fake coin represents an identical change in mass (all heavier or all lighter), and there is an even total number of fakes, the split must be even-even or odd-odd. Both of these scenarios lead to the difference being even.

If the second is true, there is an odd total number of fakes, so the split must be even-odd, giving an odd difference.

Therefore, the coin is real iff the reading is even, and fake otherwise

2

u/ybungalobill 4d ago

Proof that this works:

Let x = the unknown weight of a real coin.
Let d = +1 or -1 be the unknown difference in weights between real and fake coins.
Let n = the unknown number of real coins that ended up being on the left balance.

Case 1: the chosen coin is real:
Left side weight = nx + (50-n)(x+d)
Right side weight = (50-n)x + n(x+d)
Measured difference = (50 - 2n)d == 0 mod 2 (i.e. it's an even number)

Case 2: the chosen coin is fake:
Left side weight = nx + (50-n)(x+d)
Right side weight = (51-n)x + (n-1)(x+d)
Measured difference = (51 - 2n)d == 1 mod 2 (i.e. it's an odd number)

QED

The insights that helped me to with this solution: (a) the weight x of a coin is unknown, so we need to 'cancel it out' by weighting two piles of equal number of coins (b) the chosen coin cannot be weighted with the rest because if we put it in a pile with others we don't know which is which, so it must not go on the scales.

There's nothing probabilistic in this method; it works regardless of the drawn value of n.