Problem #21 HARD

The Marked Coin

Microsoft Adobe Optimization Logic

Problem Statement

A coin inspector has 12 coins that look identical. Exactly one coin is counterfeit — it is either slightly heavier or slightly lighter than the 11 genuine ones, but the inspector does not know which direction. Using a balance scale with no weights, the inspector must not only identify the counterfeit coin but also determine whether it is heavier or lighter — all within exactly 3 weighings. How?

Answer & Quick Explanation

Think you've got it? Click below to check your answer.

3 weighings suffice. Weigh 4v4 first (with 4 aside). Each of the three outcomes leads to a carefully designed second weighing that — combined with the third — uniquely identifies the counterfeit coin and whether it is heavier or lighter.

Detailed Editorial Solution

Want to see the step-by-step breakdown? Click below to reveal the editorial.

Label coins 1–12. Call coins 9–12 the 'aside' group for round 1. The strategy is a ternary decision tree: each weighing branches into three sub-problems, each of which must remain solvable in the remaining rounds. Step 1: Weighing 1: Place {1, 2, 3, 4} on the left vs {5, 6, 7, 8} on the right. Coins {9,10,11,12} are set aside. Step 2: Result A — Balanced: All 8 weighed coins are genuine. The counterfeit is in {9,10,11,12}. Weighing 2: put {9,10,11} against three known-genuine coins. Narrow to one group of 3 or confirm #12. Step 3: Result B — Left heavy: Counterfeit is either heavy in {1,2,3,4} or light in {5,6,7,8}. Weighing 2 mixes suspects from both sides with known-genuine coins to create a new imbalance that points to a smaller suspect group. Step 4: Result C — Left light: Mirror logic of result B, with heavy and light suspects swapped. Step 5: Weighing 3 uses the information from weighing 2 to isolate the exact coin and confirm whether it is heavier or lighter. Step 6: Each of the 24 scenarios maps to a unique sequence of three weighing outcomes — the strategy is essentially a lookup table encoded as a physical procedure. Key Insight: The insight is information-theoretic: 3^3 = 27 outcomes can encode 24 scenarios with room to spare. The challenge is constructing weighings where every branch leads to a sub-problem still solvable in the remaining steps.