
Hanna H. answered 05/10/20
PhD in Economics
You can solve this problem using some linear algebra. Let X represent the number of the first box type. Let Y represent the number of the second box type. Let Z equal the number of the third box type.
First, set up your equations.
#1 (Cost)
$2 * X + $3 * Y + $2 * Z = $18
#2 (Weight)
1lb *X + 3lb * Y + 3 lb * Z = 19 lbs
#3 (Volume)
1 f3 * X + 4 f3 * Y + 5 f3 * Z = 27 f3
I will drop all units of measurement, as it doesn't matter for our purposes. Seeing that there are three unknowns (X, Y, Z) and three constraints (the three equations), we know that it is possible to solve for this system of equations.
(Note: This problem is possible to solve with matrix algebra, but I will forgo this method)
The second step is to isolate one variable on one side of the equation. I chose to isolate Y in equations #2 and #3.
I then get the following
Y = (27 - X - 5 * Z)/4
Y = (19 - X - 3 * Z)/3
I set these two equations equal to one another and solve for X
(27 - X - 5*Z)/4 = (19 - X - 3 * Z)/3
81 - 3 * X - 15 * Z = 76 - 4 * X - 12 * Z
3 * Z - 5 = X
Now I have one equation with just X's and Z's in it.
The third step is now to find another equation with only X's and Z's in it. To do this, I will isolate Y to one side of the equation for equation #1.
Y = (18 - 2*X - 2*Z)/3
Now I can set the equation equal to one of the previously used Y-isolated equations
(18 - 2*X - 2*Z)/3 = (27 - X - 5*Z)/4
72 - 8 * X - 8 * Z = 81 - 3 * X - 15 * Z
Now isolate so that X is on one side of the equation/
X = (7 * Z - 9)/5
Set this equation equal to the previously solved X and Z equation.
(7 * Z - 9)/5 = 3 * Z - 5
Solve for Z
7* Z = 15 * Z - 16
-8*Z = -16
Z = 2
So you know that there are 2 of the third box type. Plug in 2 for Z in the previous equation
3 * Z - 5 = X
3 * 2 - 5 = X
1 = X
So you know that there is 1 of the first box type. Now plug in 2 for Z and 1 for X in a previous equation
Y = (27 - X - 5*Z)/4
Y = (27 - 1 - 5*2)/4
Y = (27 - 1 - 10)/4
Y = (16)/4
Y = 4
So now you know that there were 4 of the second box type.You can check that these are the correct answers by plugging in these values to equations #1, #2, and #3 and making sure you get the correct cost, weight, or volume.