20 bottles of pills
Oct. 13th, 2017 03:06 pm
You have 20 bottles of pills. 19 bottles have 1.0 grams pills, but one bottle has pills of weight 1.1 grams. You have been provided a weighting device to identify which bottle is the heaviest. You have to weight only once.
Solution below in first comment...
no subject
Date: 2017-10-13 10:31 pm (UTC)2) Now pick numbers of pills from each bottles according to the order they are arranged. For example, pick one pill from bottle #1, two pills from bottle #2, three pills from bottle #3 and so on...
3) Weigh this mix of pills and if all pills were one gram each, the scale would read 210 grams. 1 + 2 + 3 + 4 +...17 + 18 + 19 + 20 = (1 + 20) + (2 + 19) + (3 + 18) + (4 + 17) + .... = 10 * 21 = n/2 * (n + 1) = 210
4) Any "overage" must come from the extra 0.1 gram pills and lets say the total weight be X grams. Then deduct 210 grams from X grams. Let the result be Y and multiply to 10. It will indicate which bottle is heavier. So, this formula will tell you the bottle number: (X - 210) * 10
For example, if the the set of pills weighed 211.3 grams, then bottle #13 would have the heavy pills.