Billiard Ball Puzzle [From the Archives]

My “Day I Left Pennsylvania” led me to some archived website posts (before blogs were invented) I had written many years ago. I’m re-posting them now. Bear in mind that most of the content in this series is over 5 years old. I have left the content more or less intact. I have removed some links and added some others — but that’s it. Enjoy!


Consider the puzzle:

I have six billiard balls, one of which weighs less than the other five. Otherwise, they are all identical. What is the least number of weighings it will take to identify the lighter ball by using a balance scale?*

This is the classic layout for puzzles like this. The correct answer for this particular puzzle is 2. The formula for this type of puzzle is floor( log (base 2) x ). The function floor( ) means that if the number was a fraction, you round down to the nearest whole number. log (base 2) xmeans the answer is whatever power to which 2 must be raised to reach x.

log (base 2) 2 1 (2 ^ 1 = 2)
log (base 2) 4 2 (2 ^ 2 = 4)
log (base 2) 8 3 (2 ^ 3 = 8)
log (base 2) 6 ~2.585 (2 ^2.585…= 6)

So, using our equation from earlier, we can see that the floor(2.585…) is simply 2. 3 weighings wouldn’t be required until you add an 8th ball.

The question is now, how did we reach that conclusion? We have our cute little formulae and all, but if you really had to do this, how would you do it? (let’s say in this example that the ( 1 ) ball is the light one, but we don’t know that)

Weighing #
Scale’s Left-side
Scale’s Right-side
Set Aside
1
( 1 ) ( 2 ) ( 3 )
( 4 ) ( 5 ) ( 6 )
none
2
( 1 )
( 2 )
( 3 )

Do you get it? The first weighing would show that the left-side pan was lighter, meaning the lighter ball was with that group. Since that group had an odd number of balls, we would take two of them, the ( 1 ) and ( 2 ) in this case, and weigh them against each other. If they were equal, then we would know, by deductive reasoning, that the ( 3 ) was the lighter one. Otherwise, whichever was lighter (the ( 1 ) in this case) is our answer. Let’s try it again with a larger number of balls.

In this example we’ll use a full rack of 15 balls, plus cue ball. Our formula tells us that this would take 4 weighings (floor(log2 16) = 4) Let’s see if that’s correct: (the cue ball will weigh less in this one)

#
Scale’s Left-side
Scale’s Right-side
Aside
1
( 1 )( 2 )( 3 )( 4 )( 5 )( 6 )( 7 )( 8 )
( 9 )( 10 )( 11 )( 12 )( 13 )( 14 )( 15 )( C )
none
2
( 9 )( 10 )( 11 )( 12 )
( 13 )( 14 )( 15 )( C )
none
3
( 13 )( 14 )
( 15 )( C )
none
4
( 15 )
( C )
none

There it is! Exactly 4 weighings. Now why does our formula work for predicting these answers? Why are we using the base 2 log? Our scale has 2 pans, and each weighing we are able to half the amount of balls in each pan. If you look at our last example, you’ll notice that weighing four has 1 ball in each pan, weighing 3 has 2, then 4, then 8. Notice a familiar progression there? (hint: think powers of 2) Doing a log 2essentially mimics mathematically what we are doing with each iteration, that is, decreasing by a power of 2. So why do we take the floor( ) of our answer? Not only to eliminate those annoying decimals, but we are also not concerned with “almost weighings”.

The formula says that for six balls, approximately 2.585 weighings must be done. How do you do .585 of a weighing? You can’t, obviously. When x is not a power of 2 (such as in the first example), you will have to set a ball aside for one or more of the iterations. That’s where the fractions come in. We can eliminate those fractional weighings by deductively reasoning that the ball we set aside is lighter if the remaining balls on the pans are balanced equally.

* Initial question borrowed from Increase Your Puzzle IQ by Marcel Danesi.