Fog Creek Software
Discussion Board




classic weighing for grandma :)

"solving it is only half the battle. writing up a solution that anyone including your grandma could understand, is very hard"

The solution rephrased:

Put 4 pills on each pan.

Case 1: 
If the scales balance, these 8 pills are all poison. Put two of them on the left pan and put two new pills on the right pan.  If the scales balance again, put one poison pill on the left pan and put one of the two remaining untested pills on the right pan. If the scales balance yet again, the final untested pill is safe; otherwise, the pill on the right pan is safe.

If the second measurement didn't balance, the safe pill is on the right pan: put one poison pill on the left pan, and take one pill from the right pan in your hand. If the scales now balance, the pill in your hand is safe; otherwise, the pill you left on the right pan is safe.

Case 2:
If the scales don't balance on the first measurement, then the safe pill is either one of the 'uppers' on the light pan, or one of the 'downers' on the heavy pan. Put two downers and one upper on each pan. If the scales now balance, the lighter of the two uppers on the table is safe. Otherwise, the safe pill is either the upper on the light pan or one of the downers on the heavy pan. Put the upper from the light pan in your hand and compare the two downers from the heavy pan with each other. If these last two downers balance, the upper in your hand is safe; otherwise, the downer on the heavy pan is safe. 

Chuck Boyer
Monday, August 09, 2004

*  Recent Topics

*  Fog Creek Home