Thursday, July 14, 2011

Five Jar of Pills and Scale Puzzle

You have five jars of pills. All the pills in one jar only are "contaminated."

The only way to tell which pills are contaminated is by weight.
A regular pill weighs 10 grams; a contaminated pill is 9 grams.
You are given a scale and allowed to make just one measurement with it.
How do you tell which jar is contaminated?

Solution:
The scale in this puzzle gives you an actual weight (unlike the balance in the billiard-balls puzzle).

In a more normal situation, you'd probably weigh a pill from each jar until you found one that weighed 9 grams. That won't work here, since you've got only one measurement Chances are four in five that the first and only pill you get to weigh will be of normal weight.

That means you must weigh pills from more than one jar in your single measurement. Take the simplest case: You weigh five pills, one from each jar. The result will necessarily be 10 + 10 + 10 + 10 + 9 = 49 grams. The trouble is, you know that before making the measurement. The 49-gram result cannot tell which bottle contributed the 9-gram pill.

You need to manufacture a situation in which the weight measurement is informative. One solution is to call the bottles #1, #2, #3, #4, and #5. Take one pill from #1, two from #2, three from #3, four from #4, and five from #5. Answers 197 Weigh the whole lot. Were all the pills normal, the result would be 10 + 20 + 30 + 40 + 50 = 150 grams. In fact, the weight must fall short of this by a number of grams equal to the number of the contaminated bottle. Should the total weight be 146 (4 grams short), then bottle #4 must contain the lighter pills.

An alternate solution, with the arguable virtue of weighing fewer pills, is to weigh 1 + 2 + 3 + 4 pills from the first four bottles only. Then, if the weight is less than 100 grams, the shortfall amount points to the rogue bottle. Should the measurement be 100 grams on the nose, the fifth bottle must be contaminated.

Having answered the question, you might ask the interviewer who the pills are intended for. A good answer is "a horse." A 10-gram pill is over thirty times the size of the usual (325-milligram) aspirin tablet.

This puzzle was mentioned (as a coin weighing) in Martin Gardner's Scientific American column in the mid 1950s. Gardner described it as a "new and charmingly simple variation" on the weighing puzzles popular "in recent years."

Source:
"How Would You Move Mount Fuji?"
Microsoft's Cult Of The Puzzle
By William Poundstone

1 comment:

  1. I havent any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us. brain supplement

    ReplyDelete