I was not able to solve this puzzle. I’ll first discuss my attempts with the problem, an interesting pattern about the solution, and finally some comments about how I plan to use this problem.
One of the
biggest pit-falls I ran into was realizing that the weights did not necessarily
need to sum to 40. However, even after this realization, I worked with this
assumption for a while without success. One of my closest early solutions was
<20, 15, 3, 2>. With these, one can measure most weights, however any
number containing 9 is an issue. After this near success, I searched for
solutions which had some small numbers and one big number. Let this be Strategy
1.
I realized
at one point that if I was able to find 3 weights which can measure everything
up until 20, then I could make the 4th be 20 and the problem would
be solved. I was unable to do this, but it seemed like a promising line of
thought initially. Let this be Strategy 2.
Before I
gave up, I was testing ‘mid-sized consecutive integers’, for instance <11, 12,
13, 14>. However, with these there is no way to sum to 40. Let this be Strategy
3.
The
solution of 1, 3, 9, 27 is very clever. In a way, it is a more nuanced version
of ‘Strategy 2’. Both the solution and this strategy use one large weight, but the
solution leverages it to weigh sizes in the mid-range, not just larger numbers.
In general, the only strategy I can imagine someone coming up with is realizing
that the weights 1 – 40 must be divided up into 3 groups. The first group
measured with small numbers, the second group being the difference of the large
weight with the weights of the first group, and the third group being the sum
of the large weight with the weights of the first group.
To
understand the solution better, I curated the following table on excel. By
color coating whether a weight was on the scale, as well as which side of the scale
it was on, a very clear patter emerges. The weights are periodically taken on
and off the scale as the target weight increases. The larger the weight, the
longer the period. Noting that each weight can be written as 3n, n =
0, 1, 2, 3 , we see that the period of some weight 3n is 3n+1.
Noticing this pattern makes it easy to generate a table describing which
combination of weights one would need to measure any weight from 1 – 121, provided
one has access to weights sized for 1, 3, 9, 27, and 81.
This is a
really excellent ‘low floor, high ceiling’ question. I intended to use this in
the first week of the more advanced classes I teach in order to help students
become familiar with whiteboards. A very simple extension of this question
might be:
How many weights
do you need to measure every weight from 1 – 200? What if I give you some
random number N – how many weights do
you need?
I might
make this question DRAMTICALLY easier by first asking them to solve the case using
3 weights from 1 – 13. A less revealing hint would be to tell them that the 4
weights will sum to 40.