Brainteasers & Puzzles

The Defective Ball

Twelve identical balls hide one of a different weight, but you are not told whether it is heavier or lighter. With only a balance scale and three weighings, can you always name the odd ball and the direction it differs?

solvedhard2 min

You have 1212 identical-looking balls. One is defective, either heavier or lighter than the rest, and you do not know which. You have a balance that only reports which pan is heavier or that the two pans match. In three weighings, identify the defective ball and whether it is heavy or light.

Reveal solutionHide solution

#Why three weighings can suffice

Each weighing returns one of three outcomes, left heavier, balanced, or right heavier, so three weighings yield at most 33=273^3 = 27 distinguishable results. The answer must name one of 1212 balls together with one of two directions, which is 122=2412 \cdot 2 = 24 possibilities. Since 272427 \ge 24, the information is available, and the work is to design weighings that extract it.

1234 heavierbalance5678 heavier
then 1 vs 2
then isolate
swap pans
Three weighings give 27 outcomes, comfortably more than the 24 answers of twelve balls times two directions. The first weighing of four against four routes to one of three second weighings, and each of those isolates the odd ball and its direction in a single further step.

#First weighing

Weigh {1,2,3,4}\{1,2,3,4\} against {5,6,7,8}\{5,6,7,8\} and keep {9,10,11,12}\{9,10,11,12\} aside.

#The balanced branch

If the pans match, the odd ball lies in {9,10,11,12}\{9,10,11,12\} and balls 11 through 88 are known good. Weigh {9,10,11}\{9,10,11\} against the good balls {1,2,3}\{1,2,3\}.

If they match, ball 1212 is the odd one, and a final weighing of 1212 against any good ball reveals its direction. If {9,10,11}\{9,10,11\} is heavier, the odd ball is among 9,10,119,10,11 and is heavy, so weighing 99 against 1010 names it through the heavier pan, or fixes 1111 when they match. If {9,10,11}\{9,10,11\} is lighter, the same final weighing names the light ball.

#The tilted branch

Suppose instead {1,2,3,4}\{1,2,3,4\} is heavier. Then either one of 1,2,3,41,2,3,4 is heavy or one of 5,6,7,85,6,7,8 is light. Weigh {1,2,5}\{1,2,5\} against {3,4,6}\{3,4,6\}.

If they match, the cause sits among the untouched {7,8}\{7,8\} and must be light, so weighing 77 against a good ball finds it. If {1,2,5}\{1,2,5\} is heavier, the only consistent causes are 11 or 22 heavy or 66 light, settled by weighing 11 against 22. If {3,4,6}\{3,4,6\} is heavier, the causes are 33 or 44 heavy or 55 light, settled by weighing 33 against 44.

The remaining first-weighing outcome, {5,6,7,8}\{5,6,7,8\} heavier, mirrors this branch with the two pans' roles swapped.

#Result

Every outcome path terminates on a single ball with its direction, so three weighings always solve the puzzle.