The Puzzle: You have 10 stacks of coins. Each stack has 10 coins.
- In 9 stacks, each coin weighs 10 grams.
- In 1 stack (the fake one), each coin weighs 9 grams.
- You have a digital scale that gives an exact reading. How can you find the fake stack in only ONE weighing?
1. The Strategy: Weighted Sum
If you take one coin from each stack and weigh them, you will know that a fake exists, but you won’t know which stack it came from. The trick is to take a different number of coins from each stack.
- Take 1 coin from Stack 1.
- Take 2 coins from Stack 2.
- Take 3 coins from Stack 3. …
- Take 10 coins from Stack 10.
2. The Math
Total coins = 1 + 2 + 3 + … + 10 = 55 coins.
- If all were real: The weight would be 55 × 10 = 550 grams.
- If Stack 1 is fake: The weight will be 549 (1 gram light).
- If Stack 2 is fake: The weight will be 548 (2 grams light).
- If Stack k is fake: The weight will be 550 - k.
3. Result
The difference between 550 and your actual reading tells you exactly which stack number is the fake one!
Interview-Focused Questions
Q: Why didn’t we use a balance scale strategy here?
A: The puzzle provides a digital scale (exact reading). A digital scale provides much more information than a binary balance (Left/Right). We take advantage of that extra “bandwidth” to solve the problem in a single step using unique weights.
Q: What if you only had 5 coins in each stack?
A: Then you couldn’t take 10 from Stack 10. You would have to use a different unique representation, such as binary weights (1,2,4,8…) to identify the stack, provided the scale has enough precision.
Key Takeaway
This is a classic “Information Encoding” problem. By assigning a unique multiplier to each stack, you “encode” the stack’s ID into the final weight.
Premium Content
Unlock Detective Coin Stack and all premium lessons with a subscription.
From ₹199.99/year — See plans