Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

12 Balls, 1 slightly heavier

Name: Anonymous 2009-10-01 16:22

I got asked this question at least in 3 different job interviews!  What's the point?  What are they "looking" for?

At least the next 2 times, I already had the answer and just spewed it out.

The question:

You have 12 identical balls but one slightly heavier.  You also have a balance scale.  How would you isolate the slightly heavier ball using the balance scale as little as possible?

Answer:

Divide the balls into 2 groups of 6.  Use the balance scale to find the slightly heavier group and discard the lighter one.  Then divide the remaining 6 into 2 groups of 3 and weight on the scale.  Discard the lighter 3 balls.  Now take 2 of the remaining 3 balls and compare them on the scale.  If they weight the same, then the left over one is heavier.  If there's a difference, then take the heavier one on the scale.

Name: 4tran 2009-10-04 7:06

>>9
yes, the standard trick is to use a binary search
However, I have heard it claimed that (with 12 balls total) you can find the odd ball out using only 3 weighings, if you don't know the odd ball is heavier/lighter.  I heard this a long time ago, and haven't put enough thought into it.  It's probably not as hard as I'm making it out to be.  The puzzle you suggested is interesting.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List