Solve the 12-coin balance puzzle
CoinbaseData Scientist · Technical ScreenLast updated
This question evaluates understanding of combinatorial reasoning, information theory, and decision-tree construction for identifying a single counterfeit coin and whether it is heavier or lighter using constrained balance-scale observations.
Using a balance scale with no weights and exactly three weighings, you have 12 visually identical coins, one of which is counterfeit and either heavier or lighter (unknown). Provide a weighing strategy that always identifies the counterfeit coin and whether it is heavier or lighter. Present the full decision tree: for each weighing, which coins go on each pan and how the next step depends on outcomes (left heavy, right heavy, or balance). Prove correctness and minimality of three weighings.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.