
David P. answered 05/05/15
Tutor
5
(3)
PhD with teaching and tutoring experience, Math/Science
We have 5 unknowns: the weights of barrels B1, B2, B3, B4, and B5. So solve for these we need to come up with 5 independent equations. We know that the sum of two barrels is equal to the recorded weights, but not which two. However, we can figure out a few things.
First, let's number the barrels B1-B5 in order of increasing weight. B1 < B2 < B3 < B4 < B5
Since B1 is the lightest and B2 is the second lightest, the sum of the two lightest barrels must be the smallest recorded weight. That means:
B1 + B2 = 60
We can also come to the conclusion that B1 + B3 = 62. We can't say anything the next one, since 63 could be B1 + B4 or B2 + B3.
Now, let's go to the heaviest two barrels. We know that B5 + B4 = 71. And, like with the second lightest, the second heaviest combination is B5 + B3 = 70.
That's 4 equations, but we need five. We know that the barrels were weight in all possible combinations. So, if we sum all of those combinations that must be equal to the sum of all the weights:
(B1 + B2) + (B1 + B3) + (B1 + B4) + (B1 + B5) + (B2 + B3) + (B2 + B4) + (B2 + B5) + (B3 + B4) + (B3 + B5) + (B4 + B5) = 60 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 70 + 71
This simplifies to
4*(B1 + B2 + B3 + B4 + B5) = 656
or
B1 + B2 + B3 + B4 + B5 = 164
We can now begin substituting the various equations into each other
B1 + B3 = 62, rearrange to get B1 = 62 - B3
B1 + B2 = 60, rearrange to get B2 = 60 - B1, then plug in the previous equation to get B2 = 60 - 62 + B3 or B2 = B3 - 2
B5 + B3 = 70, rearrange to bet B5 = 70 - B3
B5 + B4 = 71, rearrange to get B4 = 71 - B5, then plug in the previous equation to get B4 = 71 - 70 + B3 or B4 = B3 + 1
Plug all of these into our 5th equation:
B1 + B2 + B3 + B4 + B5 = 164
(62 - B3) + (B3 - 2) + B3 + (B3 + 1) + (70 - B3) = 164
B3 + 131 = 164
B3 = 33
We have equations for B1, B2, B4, and B5 in terms of B3, so we can now solve for the rest of the barrel weights.
There is a simpler way to do this using a matrix representation of the system of equations:
B1 + B2 = 60
B1 + B3 = 62
B3 + B5 = 70
B4 + B5 = 71
B1 + B2 + B3 + B4 + B5 = 164
Becomes A*B = C where
A = [1 1 0 0 0
1 0 1 0 0
0 0 1 0 1
0 0 0 1 1
1 1 1 1 1]
B = [B1
B2
B3
B4
B5]
C = [60
62
70
71
164]
You can invert the matrix A to solve for B
B = A-1*C
B = [29
31
33
34
37]