Split into two groups of five bottles.Originally posted by soild79:I have a question and i hope some of u can provide me with an ans/Algorithm:
There are 10 bottles of pill where each bottle contains 100 pills in it. Each pill weighs 1g however there is one defect bottle whereby all the pills weighs only 0.9g.
By using an Electronic weighing machine, how to detect the defective bottle.
1st bottle take 0 pills,Originally posted by soild79:I have a question and i hope some of u can provide me with an ans/Algorithm:
There are 10 bottles of pill where each bottle contains 100 pills in it. Each pill weighs 1g however there is one defect bottle whereby all the pills weighs only 0.9g.
By using an Electronic weighing machine, how to detect the defective bottle.
Then you dun know which bottle that dud pill came from mah.Originally posted by gd4u:Y dun u take 1 pill from each bottle ??
then how you knwo which pill isit? if only can take one weighing that isOriginally posted by gd4u:Y dun u take 1 pill from each bottle ??
Yes hor, i think only can weigh once.Originally posted by hisoka:1st bottle take 0 pills,
2nd bottle take 1 pill,
3rd bottle take 2 pills,
etc.
the go and weigh them all together. if it .1g less than 9 g then its the 2nd bottle and so on.
btw hor, i think you mean only can weigh once. if not just weigh individually lor.
erm basically as i said lor.Originally posted by soild79:Yes hor, i think only can weigh once.
Can u elaborate more....sorri..dun get it.
I get it .. can we just use the whole bottle until we see a weight with decimal instead of individual pillOriginally posted by hisoka:erm basically as i said lor.
first do as i said. so if the 2nd bottle is the one, then the weight of the pills will be 1* 0.9 + 2*1 +3*1 +...+9*1
if its the 3rd then the weight will be 1+2*0.9+3+....+9
and so on.
if its the 1st then the weight will have no decimals.
basically to see easily if its the 1st the weight is a integer, 2nd, the weight will be with a decimal of .9, etc
can also bah. up to you. you can start by taking out 1 pill from the first bottle also. once you get the idea can change around if oyu wantOriginally posted by soild79:I get it .. can we just use the whole bottle until we see a weight with decimal instead of individual pill
Thanks palOriginally posted by hisoka:can also bah. up to you. you can start by taking out 1 pill from the first bottle also. once you get the idea can change around if oyu want
+1Originally posted by CoolMyth:Read Young Kindaichi vol 9.