# Problem 9

Suppose a coffee shop owner has a balance beam scale which balances equal weights on each side.  She is deciding what standard weights to buy to use the balance to weigh coffee. For example if she bought 2 weights, a 1-ounce weight and a 3-ounce weight, she could weigh out 1,2,3, or 4 ounces of coffee.  One ounce of coffee is weighed by putting the 1-ounce weight on one side and enough coffee on the other side to balance.  Two ounces of coffee together with the 1-ounce weight on the same side will balance the 3-ounce weight on the other side.  Three ounces of coffee on one side of the scale balances with the 3-ounce weight on the opposite side.  And 4 ounces of coffee on one side will balance with both the 1 and 3-ounce weights on the other side.  Suppose the coffee shop owner wants purchase some weights so that she can weigh out all integral numbers of ounces up to n:  1, 2, 3,…,n.

a)      What 3 weights should she buy to maximize n and what is the maximum value of n using 3 weights?

b)      What 4 weights should she buy to maximize n and what is the maximum value of n using 4 weights?

c)      What p weights should she buy to maximize n and what is the maximum value of n using p weights? (p can be any integer greater than 0.)

[Problem submitted by Walter O’Connell, LACC Professor Emeritus of Physics.]

Solution:

a)      As explained above 1, 2, 3, and 4 ounces of coffee can be weighed with a 1-ounce and a 3-ounce weight.  Suppose a 1-ounce, 3-ounce, and 9-ounce weight are used.  Five ounces of coffee together with the 1 and 3-ounce weights will balance the 9-ounce weight.  Six ounces of coffee and the 3-ounce weight balance the 9-ounce weight.  Seven ounces of coffee and the 3-ounce weight balance the 1 and 9-ounce weights.  And so on up to n = 1 + 3 + 9 = 13.

b)      Using a same approach as in part a), 1, 3, 9, and 27-ounce weights would make n = 1 + 3 + 9 + 27 = 40.

c)      The general idea is that the next weight should always be one plus twice the sum of the previous weights.  If is the pth weight and  is the sum of the p weights, then .  So, the next weight is always three times the previous one.  The weights are , , ,…,and n is the sum of this sequence of numbers.  Note that    is a geometric series.  Using the formula for the sum of a geometric series, .

A very interesting analysis of this problem (pointed out by our department chairman, Roger Wolf) is a correspondence between where the weights are placed and two base three numbers whose difference is the weight of the coffee.

In base three the right digit of a number is the one’s place, the next digit is the three’s place, the next the nine’s place and so on.  So, counting from 1 to 10 in base three is 1, 2, 10, 11, 12, 20, 21, 22, 100, 101.  Another example is 100 in base ten is 10201 in base three; that is, 1x81 + 0x27 + 2x9 + 0x3 + 1x1.

Note that any base three number containing one or more 2’s can be written as the difference of two base three numbers with only 1’s and 0’s.  For example 10212 (104 in base ten) = 10220 – 1 (105 – 1 in base ten) = 11000 – 11 (108 – 4 in base ten).

Suppose we think of the weights which are placed on the opposite side of the scale from the coffee as positive 1’s in a base three number, weights placed with the coffee as being negative 1’s in a base three number and, weights which are not used as 0’s.  For example, 1011 – 100 would mean a 27, 3, and 1-ounce weights opposite the coffee and a 9-ounce weight with the coffee.  Another example is 1001 – 10 which would mean 27 and 1-ounce weights opposite the coffee, a 3-ounce weight with the coffee, and a 9-ounce weight not used.

Using this interpretation, one can easily see where to place the weights to weigh any amount of coffee by writing the number of ounces of coffee to be weighed in base three, and if that base three number has any 2’s rewriting it as the difference of two base three numbers containing only 1’s and 0’s.  For example, where should the weights be placed to weight 257 ounces of coffee?  In base three 257 is 100112 = 100120 – 1 = 100200 –11 = 101000 – 111.  So, 243 and 27-ounce weights would be placed opposite the coffee; 9, 3, and 1-ounce weights with the coffee; and the 81-ounce weight would not be used.  Of course if the weight of coffee in base three contains no 2’s, then the base three number simply represents the weights which need to be placed opposite the coffee, and no weights would be placed with the coffee.  For example 109 ounces of coffee is 11001 in base three indicating 81, 27, and 1-ounce weights opposite the coffee.