Ten coin machines and one weighing
product-puzzle case · difficulty 2/5 · 15 minutes · other
Prompt
There are 10 machines that each produce 10-gram coins, except one machine that produces 9-gram coins. You have a digital scale and may use it exactly once. How can you find the faulty machine?
Context
A classic interview puzzle. Core idea: Take 1 coin from M1, 2 from M2... 10 from M10. Weigh all together. Talk through your reasoning; the interviewer cares as much about structure as about the answer.
Clarifying questions
- Can you take multiple coins?
- Yes. Each machine has plenty of coins, you can take any number from each, and the digital scale gives an exact weight.
Recommendation
**Answer:** Weigh 1, 2, ..., 10 coins from machines 1 to 10 together. The number of grams below 550 is the faulty machine. **Why:** Taking a different number of coins from each machine makes the weight shortfall a direct code for the faulty machine.
Risks
- Taking the same number of coins from each machine, which shows a 1-gram shortfall without saying which machine
- Forgetting to compare with the expected total of 550 grams
Next steps
- Find the method if the faulty machine could produce either lighter or heavier coins by an unknown 1 gram
- Find a method for 3 faulty machines (harder)