Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Use the simplex method to solve the following linear programming problem.

Maximize
P = 4x + 6y
subject to
3x + y ≤ 24
2x + y ≤ 18
x + 3y ≤ 24
x ≥ 0, y ≥ 0

Solution. For the record, note that this problem is, in fact, a standard maximization problem.
Introduce 3 slack variables, u, v, and w, and rewrite the first three inequalities as equations:

3x + y + u = 24

2x + y + v = 18
x + 3y + w = 24
.

We can now reformulate the problem as follows: among all solutions to the system

3x + y + u = 24

2x + y + v = 18
x + 3y + w = 24
−4x − 6y + P = 0
for which x, y, u, v, w ≥ 0, find one that maximizes P .

We set up the augmented matrix for this system as a so-called simplex tableau (I’ll let you fill in
the missing horizontal line):

x y u v w P | Constant
3 1 1 0 0 0 | 24
2 1 0 1 0 0 | 18
1 3 0 0 1 0 | 24
−4 −6 0 0 0 1 | 0

Find the initial solution. The so-called ”unit columns” are the u, v, w, and P columns. This leaves
x and y. To get an initial solution put x = y = 0 and find u = 24, v = 18, w = 24, and P = 0.

Page 1 of 4 A. Sontag March 25, 2003


Can we improve P by changing x or y? Yes, since the expression P = 4x + 6y has at least one
positive coefficient. This is equivalent to the fact that the bottom row of the tableau has at least
one negative number to the left of the vertical line.

Find the pivot column. Here we’re finding which variable to change. We will change y, since its
coefficient in the expression P = 4x + 6y is largest. In other words, we change y since it’s the
variable corresponding to the lowest negative number in the bottom line of the tableau. Thus the
pivot column is the y-column.

Find the pivot row. Here we’re finding how far we can increase y and still meet the constraints.
Keeping x at 0, the first equation would allow increasing y up to 24, so up to 24. The second
equation would allow increasing y up to 18/1, so up to 18. The third equation would allow
increasing y up to 24/3, so up to 8. Since 8 is the smallest of these three numbers, we can increase
y up to 8 and yet meet all three requirements. Since this 8 came from the third row, the third row
is our pivot row.

Circle the pivot element. The pivot element is where the pivot column and pivot row intersect, so
our pivot element is the 3 in the third row of the y column.

Use row operations, in a particular way, to rewrite the system. First we divide the third row by
3, in order to get a 1 in the pivot location without switching rows or adding one row to another.
The new tableau is:

x y u v w P | Constant
3 1 1 0 0 0 | 24
2 1 0 1 0 0 | 18
1 1
3 1 0 0 3 0 | 8
−4 −6 0 0 0 1 | 0

Now carry out the following three row operations:


Replace Row 1 by Row 1 - Row 3
Replace Row 2 by row 2 - Row 3
Replace Row 4 by Row 4 + (6) Row 3.

The resulting tableau is:

x y u v w P | Constant

8 −1
3 0 1 0 3 0 | 16

5 −1
3 0 0 1 3 0 | 10

1 1
3 1 0 0 3 0 | 8

−2 0 0 0 2 1 | 48

Find the new solution. The new unit columns are y, u, v, and P . This leaves x and w. We now

Page 2 of 4 A. Sontag March 25, 2003


set x = 0 and w = 0, which gives y = 8, u = 16, v = 10, and P = 48. We have, in fact, obtained a
larger value for P .

Can we improve further on this value of P ? Yes, since the bottom row says P = 48 + 2x − 2w and
the coefficient of x is positive. Alternatively, yes, we can improve on P since the bottom row of
our tableau still has a negative entry to the left of the vertical line. So we repeat the process.

Find the new pivot column. In the expression P = 48 + 2x − 2w the only variable with a positive
coefficient is x. Equivalently, in the bottom row of the tableu the only column with a negative
entry to the left of the vertical line is the x-column. So the x column is our new pivot column.

Find the new pivot row. We’re finding how much we can increase x. Keeping w at 0, the top row
would allow x to go up to 16 10
8 , so to 6. The second row lets x go up to 5 , so to 6. Finally, the
3 3
third row lets x go up to 81 , so to 24. The smallest of these three numbers is 6, the restriction that
3
came from the top row and also from the second row. We can use either the top row or the second
row. I’ll choose the top row as the new pivot row.

8
Circle the new pivot element. The chosen pivot element is the 3 that appears where the x-column
intersects the first row of numbers.

Use row operations, in a special way, to transform the system. Multiply the first row of numbers
by 83 to obtain a 1 in the pivot position. The new tableau is then:

x y u v w P | Constant

3 −1
1 0 8 0 8 0 | 6

5 −1
3 0 0 1 3 0 | 10

1 1
3
1 0 0 3
0 | 8

−2 0 0 0 2 1 | 48

Now carry out the following operations.


5
Replace Row 2 by Row 2 - 3
Row 1.
1
Replace Row 3 by Row 3 - 3 Row 1.
Replace Row 4 by Row 4 + 2 Row 1.

The new tableau is

Page 3 of 4 A. Sontag March 25, 2003


x y u v w P | Constant

3 −1
1 0 8 0 8 0 | 6
−5 −1
0 0 8 1 8 0 | 0

−1 3
0 1 8 0 8 0 | 6

3 7
0 0 4 0 4 1 | 60

Find the new solution. The columns that are not unit columns are now the u- and w-columns. So
we let u = 0 and w = 0, which gives x = 6, y = 6, v = 0, and P = 60. As anticipated, we have a
new, still larger value for P .

Can we increase P yet further? No. There are no negative numbers in the bottom row of the
tableau to the left of the vertical line. The bottom row says P = 60 − 34 u − 74 w, and so making
any changes would lead to a decrease in P .

So we quit. The maximum value for P is 60, and it occurs with the values for the variables being
x = 6, y = 6, u = 0, v = 0, w = 0.

In case you’re interested, here’s a sketch of the feasible set for this problem.

The simplex method in this case begins with the corner at the origin, then moves up the y-axis to
the corner labeled P , then moves along the top edge of S to the corner labeled Q, which is where
the maximum value for P occurs.

Page 4 of 4 A. Sontag March 25, 2003

You might also like