In: Statistics and Probability
Seneca and Artie are lab partners in science class. Today they have to weigh liquid. They have a try of 80 weights that they can use. There are four different kinds of weights: 50 grams, 25 grams, 15 grams, and 5 grams. The first liquid weights 85 grams. How many different combinations of weights will balance the scale for the first liquid ?
If you want to be certain you've got all the possible solutions,
you need to go through all the possible combinations.
So:
If you start with using the 50g weight:
50+50=100, so you can only ever use one 50g weight.
50+25=75, so you need 10 more grams to get 85
The only way to get 10 using the weights you've got is 5+5,
so 50+25+5+5 is the only combination using both 50 and 25.
50+15=65, so you need 20 more grams to get 85
You can 20 using the weights you've got either using 15+5 or from
using 5+5+5+5, so the only two combinations using 50 and 15 are
50+15+5+5+5+5 and 50+15+15+5.
You've worked out all the combinations for 50 using 25 and 15, so
the only other weight you have is 5, so the final possible
combination using a 50g weight is 50+5+5+5+5+5+5+5.
You now have all the combinations using 50g so can repeat this
process for the other weights:
so: using the 25 gram weights (but remembering you've already got
any combinations using the 50g weights, including those with the
25g weights so you need only look for combinations with 25g but not
using the 50g weight):
25+25+25=75, so you need 10 to make 85. The only way to do this is
using 5+5, so the only combination with 25+25+25 is
25+25+25+5+5
25+25=50, so you need 35 to make 85. You can make 35 using the
weights you have in three ways:
either 15+15+5 or 15+5+5+5+5 or 5+5+5+5+5+5+5, so the possible
combinations using 25+25 are:
25+25+15+15+5
25+25+15+5+5+5+5
25+25+5+5+5+5+5+5+5
You now know all the combinations using multiples of 25. You can
now look at the combinations using one 25 and the 15 and 5 gram
weights:
25+15+15+15+15=85
All the other combinations for 25 are going to be 25 plus either
1,2 or 3 15 gram weights, plus the number of 5 gram weights needed
to make up the difference, so:
25+15+15+15=70+5+5+5=85
25+15+15=65+5+5+5+5+5+5=85
25+15=40+5+5+5+5+5+5+5+5+5=85
These are all the combinations possible for 25 and 15 gram weights,
so the only combination you have left is using one 25 gram weight
and making up the rest of the 85g target with 5g weights, so:
25+5+5+5+5+5+5+5+5+5+5+5+5
You now have all the combinations using 50g and 25g so can repeat
this process for just using 15g and 5g:
15+15+15+15+15=75. You can only make 10 using the 5g weights, so
the only combination using 5 15g weights is
15+15+15+15+15+5+5
Since you only have 5g weights left, other than 15g weights, the
only other combinations you can make for 15 are going to be either
1,2,3 or 4 15 gram weights, plus the number of 5 gram weights
needed to make up the difference, so you get:
15+15+15+15+5+5+5+5+5
15+15+15+5+5+5+5+5+5+5+5
15+15+5+5+5+5+5+5+5+5+5+5+5
15+5+5+5+5+5+5+5+5+5+5+5+5+5+5
You now have all the combinations possible for 50g, 25g and 15g
weights, so the only remaining combination is just 5g:
5+5+5+5+5+5+5+5+5+5+5+5+5+5+5+5+5