Jason H.

asked • 10/07/17# Linear Programing word problem with three variables

A company makes three types of candy and packages them in three assortments. Assortment I contains 4 sour, 4 lemon, and 12 lime candies, and sells for $9.40. Assortment II contains 12 sour, 4 lemon, and 4 lime candies, and sells for $7.60. Assortment III contains 8 sour, 8 lemon, and 8 lime candies, and sells for $ 11.00. Manufacturing costs per piece of candy are $0.20 for sour, $0.25 for lemon, and $ 0.30 for lime. They can make 5,200 sour, 3,800 lemon, and 6,000 lime candies weekly. How many boxes of each type should the company produce each week in order to maximize its profit? What is the maximum profit?

I'm struggling with getting this problem into an equation(s) I can solve.

More

## 1 Expert Answer

Kevin B. answered • 07/04/18

Tutor

New to Wyzant
Pharmacist looking to reach out

Let a be the number of boxes of Assortment 1 sold per week, b be the number of boxes of Assortment 2, and c be the number of boxes of Assortment 3. From the manufacturing cost of each candy, it is easy to compute that Assortment 1 gives a profit of $4 per box, $3 profit for Assortment 2, and $5 per box of Assortment 3.

Therefore we are looking to maximize the profit function p = 4a + 3b + 5c using the following constraints: a>=0, b>=0, c>=0 (since we can't have negative numbers of boxes sold), 4a + 12b + 8c <= 5200, 4a + 4b + 8c <= 3800, and 12a + 4b + 8c <= 6000.

Add slack variables s1, s2, and s3 to the last three constraints respectively to make the inequalities into equations, and then use the simplex method to solve for the maximum profit. I get a maximum profit of $2875 weekly by selling 275 boxes of assortment 1, 175 boxes of assortment 2, and 250 boxes of assortment 3. There are no candies left over.

If you'd like me to list the steps in the simplex method for this problem, let me know and I will respond back.

Edit:
I thought I'd give you an answer in case you weren't familiar with the simplex method. We use separate slack variables for each of the constraints involving <=, and we move all the variables in the profit function over to the left so that only 0 remains on the right. So we have
4a + 12b + 8c + s1 = 5200
4a + 4b + 8c + s2 = 3800
12a + 4b + 8c + s3 = 6000
-4a - 3b - 5c + p = 0
We then write this info in a matrix form like so:
a b c s1 s2 s3 p
4 12 8 1 0 0 0 5200
4 4 8 0 1 0 0 3800
12 4 8 0 0 0 0 6000
-4 -3 -5 0 0 0 1 0
Choose the column with the most negative number in the bottom row. In this case it is the column labeled c. This is now called the "pivot column." Now divide the constants on the right side by the corresponding elements in the pivot column. 5200/8 = 650, 3800/8 = 475, and 6000/8 = 750. Choose the row that gives the smallest positive ratio. In this case it is the second row with ratio 475. This is the "pivot row." The place where the pivot row and pivot column intersect is the actual pivot value. In this case, it is the intersection of the column "c" and row 2, with a value of 8.
We we want to turn the pivot value into a 1, and all other elements in the pivot column to a zero. We do this by:
1) Dividing all the numbers in row 2 by 8, including the constants on the right,
2) Subtract rows 1 and 3 from 8 times the "new" row 2, and making these results the NEW rows 1 and 3, and
3) Adding 5 times the "new" row 2 to row 4 and making this the new row 4. You should get the following (ignoring the labels):
0 -8 0 -1 1 0 0 -1400
1/2 1/2 1 0 1/8 0 0 475
-8 0 0 0 1 -1 0 -2200
-3/2 -1/2 0 0 5/8 0 1 2375
The number at the bottom right is our profit under this arrangement, which is $2375. It is not optimal, though, because we still have negative numbers in the bottom row. We must choose the most negative number (here it is -3/2) to determine a new pivot row and pivot column as before and repeat the process...find the pivot, turn it into a 1, and use row operations to make all the other elements in the column into zeroes. We must repeat this process a third time, as it turns out, before we end up with no negatives in the bottom row, at which point we get this (with labels):
a b c s1 s2 s3 p
0 1 0 1/8 -1/8 0 0 175
0 0 -1 1/16 -1/4 1/16 0 -250
1 0 0 0 -1/8 1/8 0 275
0 0 0 1/16 3/8 3/16 1 2875
Note that there are no negatives in the bottom row, so our bottom right number ($2875) is our maximum profit. The s1, s2, and s3 variables contain numbers other than all ones or zeroes in their columns, so they are all assigned a value of zero. The a column has a single 1, and the constant on the right hand side of that row is 275, so a equals 275. Likewise, b has a single 1 across from 175 in the constant column, so b = 175, and c has a single -1 across from a -250, so -c equals -250, or c equals 250.
Since by our profit function, a, b, and c represented the number of boxes of Assortments 1, 2, and 3 respectively, we have 275 boxes of A1, 175 boxes of A2, and 250 boxes of A3. Not only does this give a maximum profit of $2875 if you work it out, there are no candies left over, as it should be, since all three slack variables ended up as zero. Hope this helps!
## Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.

Most questions answered within 4 hours.

#### OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.

Kevin B.

07/29/18