A variation on yesterday’s puzzle:
Suppose there are six bottles of pills, and more than one of them may contain defective pills that weigh 6 grams instead of 5. How can we identify the bad bottles with a single weighing?
|
SelectClick for Answer> |
Take 1 pill from the first bottle, 2 from the second, 4 from the third, 8 from the fourth, 16 from the fifth, and 32 from the sixth. This gives us 63 pills that ought to weigh 315 grams. As before, the bad pills will add some excess weight, but now that weight can tell us which combination of bottles is bad. Suppose the 63 pills weigh 336 grams, or 21 grams too much. That extra 21 grams can only have come from the fifth bottle (16 grams), the third (4 grams), and the first (1 gram). The same is true for any overage: Because any integer is uniquely expressible as the sum of powers of 2, the excess weight will always identify uniquely any combination of bad bottles.
|