Problem:
Given 10 identical bottles of identical pills (each bottle contain hundred of pills). Out of 10 bottles, 9 have 1 gram of pills but 1 bottle has pills of the weight of 1.1 gram. Given a measurement scale, how would you find the heavy bottle? You can use the scale only once.
Solution:
First, arrange the bottles on the shelf and now take, 1 pill from the first bottle, 2 pills from the second bottle, 3 pills from the third bottle, and so on.
Ideally, you would have (10)*(11)/2=55 pills weighing 55 grams. When you put the entire pile of pills on the weighing scale, the deviation from 55g would tell you which bottle contains the heavy pills.
If the deviation is .1 gram more, it is the 1st bottle which has heavy pills, if it is .2 gram more then 2nd bottle has heavy pills, if it is .3 gram more then 3rd bottle has heavy pills, if it is .4 gram more then 4th bottle has heavy pills, and so on.
Given 10 identical bottles of identical pills (each bottle contain hundred of pills). Out of 10 bottles, 9 have 1 gram of pills but 1 bottle has pills of the weight of 1.1 gram. Given a measurement scale, how would you find the heavy bottle? You can use the scale only once.
Solution:
First, arrange the bottles on the shelf and now take, 1 pill from the first bottle, 2 pills from the second bottle, 3 pills from the third bottle, and so on.
Ideally, you would have (10)*(11)/2=55 pills weighing 55 grams. When you put the entire pile of pills on the weighing scale, the deviation from 55g would tell you which bottle contains the heavy pills.
If the deviation is .1 gram more, it is the 1st bottle which has heavy pills, if it is .2 gram more then 2nd bottle has heavy pills, if it is .3 gram more then 3rd bottle has heavy pills, if it is .4 gram more then 4th bottle has heavy pills, and so on.
0 comments:
Post a Comment