An apothecary has a set of five weights for use in the pans of his balance. By proper selection of weights, he is able to measure every multiple of 0.5 g, from 0.5 g up to a total of the five weights together. If the arrangement of weights is such that the apothecary can weigh the maxium possible amount, what are the five weights?

.5,1, 2, 4, 8

that allows you to have masses totalling
.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 6, 7, 7.5, 8, and up to 15.5 g

To determine the five weights, we can use a binary representation approach. Suppose we label the weights as follows: A, B, C, D, and E. Weights A, B, C, and D each represent powers of 2, while weight E represents 0.5 g.

Since the apothecary can measure every multiple of 0.5 g from 0.5 g up to the total of the five weights together, we can deduce that weight E must be present. Now let's determine the values of weights A, B, C, and D.

Weight E: 0.5 g
Weight D: If we include D, we can measure up to a total of 0.5 g + D. So, D must be the next highest power of 2 greater than 0.5 g. The only option is 1 g.

Now, with weights E and D accounted for (0.5 g + 1 g = 1.5 g), we need to determine the remaining three weights: A, B, and C.

The apothecary can measure every multiple of 0.5 g up to the total of the five weights. This means that with weights E, D, A, B, and C together, the maximum possible total is required. Therefore, A + B + C = 2^k - 1, where k is the number of weights used (in this case, 3).

To find A, B, and C, we need to express the maximum possible total of 1.5 g using the sum of three powers of 2, with each weight representing a different power. The highest power of 2 less than 1.5 g is 1 g (D). We are left with a remaining weight of 0.5 g to distribute among three weights, A, B, and C.

To distribute the remaining weight equally, we use the binary representation of the numbers from 1 to 7 (which represent the sum of three bits): 001, 010, 011, 100, 101, 110, 111. We exclude 000 (representing zero) since we always need to include weight E.

Out of these options, the one that gives us an equal distribution of weight (0.5 g) is 011. Therefore, A = B = 0.5 g, and C = 0 g (since there is no need to use a weight when all three values are the same).

Summing up the weights:
Weight E = 0.5 g
Weight D = 1 g
Weight A = 0.5 g
Weight B = 0.5 g
Weight C = 0 g

So, the five weights are 0.5 g, 0.5 g, 0.5 g, 1 g, and 0.5 g, respectively.