Assume an old-fashioned scale balance in which weights can be placed on either side. The associated set of weights (each of which is greater than zero) is

**'complete'**for some W if it is capable of measuring all integer weights from 1 to W.

Clearly it is possible for such sets to exist even if no combination of the weights themselves can be balanced against any combination of the remaining weights - the set {1,2,4,8..} is just one such example.

On the other hand, the set {1,1,2,4} is also **'self-measuring'**, because, assuming that one of the weights were unmarked, a stranger could neverthless establish its value by weighing it in the scales with the others.

Question: You are allowed 5 weights. They must form a set which is complete, and also self-measuring.

What is the largest possible value of W, given these constraints?

Bonus: What is the largest possible value of W, if 8 weights are allowed?