Jason H.

# 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.

Kevin B.

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

Chosse 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 column 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, bec 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 zeroes 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!

Report

07/29/18

By:

Tutor
New to Wyzant

Pharmacist looking to reach out

## Still looking for help? Get the right answer, fast.

Get a free answer to a quick problem.
Most questions answered within 4 hours.

#### OR

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