Mathwords logoMathwords

Counterfeit Coin Problem — Definition, Formula & Example

The Counterfeit Coin Problem is a classic puzzle. You must find the one fake coin among identical-looking coins using only a balance scale and as few weighings as possible.

Given nn coins, all genuine except one counterfeit known to be lighter, and a pan balance with three outcomes (left heavier, right heavier, balanced), find the least number of weighings WW that guarantees you identify the counterfeit. Each weighing has 3 outcomes, so kk weighings separate at most 3k3^k cases. This gives W=⌈log⁡3n⌉W = \lceil \log_3 n \rceil. If the counterfeit's direction is unknown and you must also tell whether it is heavier or lighter, kk weighings handle at most 3k−32\frac{3^k - 3}{2} coins. For example, 12 coins need 3 weighings.

Key Formula

W=⌈log⁡3n⌉W = \lceil \log_3 n \rceil
Where:
  • WW = minimum number of weighings needed in the worst case
  • nn = number of coins, exactly one of which is known to be lighter
  • ⌈⋅⌉\lceil \cdot \rceil = ceiling: round up to the nearest whole number

Worked Example

Problem: You have 27 coins that look identical. One is a fake that weighs slightly less than the others. Using a balance scale, what is the fewest number of weighings that always finds the fake?
Step 1: Split the coins into three groups of 9. Weigh two groups against each other. If one pan rises, the fake is in that lighter group. If the pans balance, the fake is in the group left off the scale. Either way, 9 suspects remain.
27÷3=927 \div 3 = 9
Step 2: Split the 9 suspects into three groups of 3 and repeat. One weighing leaves 3 suspects. A third weighing, 1 coin against 1 coin with 1 coin set aside, finds the fake.
9÷3=3,3÷3=19 \div 3 = 3, \quad 3 \div 3 = 1
Step 3: Check that 2 weighings cannot always succeed. Two weighings give only 32=93^2 = 9 possible outcome patterns, but there are 27 possible fakes.
32=9<273^2 = 9 < 27
Answer: The fewest number of weighings is 3, which matches ⌈log⁡327⌉=3\lceil \log_3 27 \rceil = 3.

Why It Matters

The puzzle is a first look at information-theoretic lower bounds. You count the possible answers, count the outcomes each test can produce, and get a limit that no strategy can beat. The same reasoning underlies decision trees in computer science courses and group testing, where labs pool blood samples to find a positive case in fewer tests.

Common Mistakes

Mistake: Splitting the coins into two halves each time, as in binary search, when you already know the fake is lighter.
Correction: A two-pile split ignores the balanced outcome, which wastes one of the scale's three possible results. With 27 coins and a known-lighter fake, halving can take 4 weighings in the worst case: 13 vs 13, then 6 vs 6, then 3 vs 3, then 1 vs 1. Splitting into three nearly equal groups needs only 3 weighings.

Related Terms

  • Handshake Problem — Another classic puzzle solved by systematic counting of cases
  • Missing Dollar Paradox — Classic puzzle where careful bookkeeping exposes flawed reasoning
  • Knight's Tour — Puzzle also solved by searching a tree of choices
  • Magic Square — Recreational puzzle built around balancing equal totals
  • Lower Bound — Each weighing has only 3 outcomes, which sets a minimum number of weighings no strategy can beat
  • Locker Puzzle — Another classic brain teaser solved by logical reasoning
  • Baguenaudier — Another classic puzzle solved with minimal step counting