Brainteasers · Weighing and search · Medium
A set of weights
A shopkeeper has a balance with two pans and wants a set of weights, of any whole numbers of grams she likes, with which she can balance a load of every whole number of grams from 1 to 100. The load goes on one pan, and weights may be put on either pan: opposite the load, or beside it. What is the smallest number of weights she needs?
Answer and solution
Answer
5
Solution
Each weight is used in one of three ways, so k weights balance at most (3^k − 1)/2 loads, and powers of 3 achieve that.
Four weights have 3⁴ = 81 placements; one is empty and the other 80 come in mirror pairs that balance a load on opposite sides, so at most 40 loads. Five weights of 1, 3, 9, 27 and 81 grams balance every load from 1 to 121, since every whole number can be written with digits −1, 0 and 1 in base 3. The answer is 5.