chapter 3: simplex method - nc state university - ncsu.edulbpage/book/chapter_3.pdf · chapter 3:...

57
Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming problems using the geometric method. While that method works very nicely for problems in which only 2 unknowns are involved, it becomes considerably more difficult to use in problems that have more than 2 unknowns. For example, if the problem has 3 unknowns, a graphical method could be used, but then instead of graphing lines in the plane the problem would involve graphing planes in 3-dimensional space. If you’re good at graphing things in 3- dimensional space you can see the corner points for the feasible region and determine which planes have intersected at a given corner point. Of course, finding the corner points involves solving 3 equations in 3 unknowns. Another variation on the graphical approach is: 1. Determine all possible intersection points for any combination of three planes (which involves taking every possible combination of three equations and solving for the three unknowns). 2. Check to see which of these points are actually in the feasible region. (i.e. determine which of the intersection points satisfy all of the inequalities.) 3. Substitute the feasible corner points into the objective function and proceed as before. The second technique can be modified for problems with more than three unknowns but, while this method is theoretically possible, practically speaking it quickly becomes unmanageable as the number of equations and variables increases. So instead a technique known as the simplex method is used. The simplex method, like the geometric method, relies on the fact that if a linear function ƒ has a maximum (minimum) on a closed polyhedral region then it occurs at a corner point of the region. However, the simplex method differs from the graphical method in that it’s an algebraic method and relies on matrix techniques. As such, it’s a method that can be programmed on a computer and used to solve problems involving many variables and many constraint inequalities. In the first part of Section 3.1, the simplex procedure is outlined. However, even though the simplex method is an algebraic procedure, the underlying ideas are geometric, so in the last part of Section 3.1, a geometric interpretation of why the simplex method works is presented. When linear programming problems are solved using the simplex method, the problem must first be classified. The two classifications are standard and nonstandard. Standard problems will be dealt with in this section and nonstandard problems will be

Upload: ngokien

Post on 13-Mar-2018

239 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Chapter 3: Simplex Method

3.1 Standard Problems In Chapter 2 you saw how to solve linear programming problems using the geometric method. While that method works very nicely for problems in which only 2 unknowns are involved, it becomes considerably more difficult to use in problems that have more than 2 unknowns. For example, if the problem has 3 unknowns, a graphical method could be used, but then instead of graphing lines in the plane the problem would involve graphing planes in 3-dimensional space. If you’re good at graphing things in 3-dimensional space you can see the corner points for the feasible region and determine which planes have intersected at a given corner point. Of course, finding the corner points involves solving 3 equations in 3 unknowns. Another variation on the graphical approach is: 1. Determine all possible intersection points for any combination of three planes (which involves taking every possible combination of three equations and solving for the three unknowns). 2. Check to see which of these points are actually in the feasible region. (i.e. determine which of the intersection points satisfy all of the inequalities.) 3. Substitute the feasible corner points into the objective function and proceed as before. The second technique can be modified for problems with more than three unknowns but, while this method is theoretically possible, practically speaking it quickly becomes unmanageable as the number of equations and variables increases. So instead a technique known as the simplex method is used. The simplex method, like the geometric method, relies on the fact that if a linear function ƒ has a maximum (minimum) on a closed polyhedral region then it occurs at a corner point of the region. However, the simplex method differs from the graphical method in that it’s an algebraic method and relies on matrix techniques. As such, it’s a method that can be programmed on a computer and used to solve problems involving many variables and many constraint inequalities. In the first part of Section 3.1, the simplex procedure is outlined. However, even though the simplex method is an algebraic procedure, the underlying ideas are geometric, so in the last part of Section 3.1, a geometric interpretation of why the simplex method works is presented. When linear programming problems are solved using the simplex method, the problem must first be classified. The two classifications are standard and nonstandard. Standard problems will be dealt with in this section and nonstandard problems will be

Page 2: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.1: Standard Problems 77

done in Section 3.2. A linear programming problem has to satisfy three requirements in order to be classified as a standard problem:

Standard Problems

1. The objective function is to be maximized. 2. All variables must be nonnegative. 3. Each constraint inequality must have the form:

a1x1 + a2x2 + . . . + anxn ≤ k,

where a1, a2, . . . , an are constants, x1, x2, . . . , xn are the variables, and k is a positive constant.

There are three main steps in the simplex procedure:

1. Setting up the simplex tableau (which is a matrix). 2. Pivoting (this step may need to be done several times). 3. Reading the final solution.

Let’s see how to handle the first step. Slack variables and the initial simplex tableau First let’s look at several examples to see how to set up a linear programming problem in matrix form. The first example to be set up is a problem which was already solved in Chapter 2 using the geometric method. It’s easy to see that this one is a standard problem. (You’ll see how to solve the problems a little later). Example 3.1. A potter is making cups and plates. It takes her 6 minutes to make a cup and 3 minutes to make a plate. Each cup uses 3/4 lb. of clay and each plate uses 1 lb. of clay. She has 20 hours available for making the cups and plates and has 250 lbs. of clay on hand. She makes a profit of $2 on each cup and $1.50 on each plate. How many cups and how many plates should she make in order to maximize her profit? Solution (setting up the simplex tableau): You saw in Example 2.11 of Chapter 2, that this problem reduces to: Maximize P = 2x + 1.5y subject to

.75x + y ≤ 250 6x + 3y ≤ 1200

Page 3: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

78 Chapter 3: Simplex Method

x ≥ 0 y ≥ 0

where x = number of cups produced y = number of plates produced.

The graph of the feasible region looks like

y

x

100

200

300

400

100 300 400

6x + 3y = 1200

.75x + y = 250

(0,250)

(120,160)

(200,0)(0,0)

If (x,y) is some point in the feasible region, then it has to satisfy the constraint inequalities and, in particular, has to satisfy the first two inequalities. However, in order to use matrix methods on linear programming problems, it’s necessary to be dealing with equations, not inequalities. That means the constraint inequalities must be converted to equations. Now in this example, depending on the values chosen for x and y, there may be some unused clay and/or some unused time. Letting u be a variable that represents unused clay and v be a variable that represents unused time and using them in the two constraint inequalities converts the inequalities to equations in the following way:

.75x + y + u = 250 6x + 3y + v = 1200

Variables like u and v are called slack variables. Practically speaking, a slack variable represents the amount of unused resource in a given constraint inequality. So the first step in the simplex procedure is to introduce slack variables into each of the constraint inequalities (except for the ones which require the variables to be nonnegative—those have already been considered in requiring the problem to be a standard problem) to convert the inequalities to equalities. To get the problem in final form for converting to a matrix, the equation for the objective function is rewritten in the following way:

–2x – 1.5y + P = 0

Page 4: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.1: Standard Problems 79

Combining this equation with the other two gives the following set of equations:

.75x + y + u = 250 6x + 3y + v = 1200 –2x – 1.5y + P = 0

with 5 unknowns: x, y, u, v, and P. If the set of equations is now written in the form of an augmented matrix, it becomes:

x y u v P

⎝⎜⎛

⎪⎪⎪.75 1 1 0 0

6 3 0 1 0–2 –1.5 0 0 1 ⎠

⎟⎞250

12000

This augmented matrix is known as a simplex tableau. Here the first two rows correspond to the equations converted from the constraint inequalities, while the last row is always used for the equation involving the objective function. The columns are also labeled with the variables associated with the coefficients used in the equations. Let’s look at a few other examples at this point. For each of them, slack variables will be introduced and the simplex tableau set up. Example 3.2. Maximize P = 3x + 5y

subject to: 2x + y ≤ 12

2x + 3y ≤ 24 x ≤ 6 x ≥ 0

y ≥ 0 Solution (setting up the simplex tableau): Introducing slack variables into the first three constraint inequalities gives the equations:

2x + y + u = 12 2x + 3y + v = 24

x + w = 6 Putting the equation for the objective function in the form described earlier, gives:

–3x – 5y + P = 0 so the system of equations is:

2x + y + u = 12 2x + 3y + v = 24

x + w = 6 –3x – 5y + P = 0

and the simplex tableau is:

x y u v w P

Page 5: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

80 Chapter 3: Simplex Method

⎝⎜⎛

⎪⎪⎪2 1 1 0 0 0

2 3 0 1 0 01 0 0 0 1 0–3 –5 0 0 0 1

⎠⎟⎞12

2460

Example 3.3. Maximize P = 4x + 2y

subject to: x + y ≤ 10

3x + y ≤ 12 4x –3y ≤ 3

x ≥ 0 y ≥ 0

Solution (setting up the simplex tableau): Introducing slack variables gives the equations:

x + y + u = 10 3x + y + v = 12 4x –3y + w = 3

Rewriting the equation for the objective function and listing the equations yields

x + y + u = 10 3x + y + v = 12 4x – 3y + w = 3 –4x –2y + P = 0

so the initial simplex tableau is:

x y u v w P

⎝⎜⎛

⎪⎪⎪1 1 1 0 0 0

3 1 0 1 0 04 –3 0 0 1 0–4 –2 0 0 0 1

⎠⎟⎞10

1230

Now that you see how to set up the simplex tableau, what do you do with it? Well, if the columns of the simplex tableau are examined you can see they fall into two categories:

1. The column is a unit column which means it has a 1 in one of the positions and 0’s in the other positions.

2. The column is not a unit column. In the initial simplex tableau for Example 3.1, the unit columns are the u, v and P columns while the x and y columns are nonunit. The variables associated with unit columns are called basic variables and the variables associated with the nonunit columns are called nonbasic variables. Thus, u, v and P are basic variables for this tableau and x and y are nonbasic variables. To start the simplex procedure the value of each of the

Page 6: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.1: Standard Problems 81

nonbasic variables is set equal to zero. The simplex tableau is then translated into its corresponding system of equations and the basic variables are solved for, assuming the nonbasic variables are zero. Thus, in Example 3.1, letting x = 0 and y = 0 gives u = 250, v = 1200 and P = 0. (That agrees with the original set of equations since if x = 0 and y = 0 then there are 250 lbs. of unused clay and 1200 minutes of unused labor, with a profit of $0.) The solution x = 0, y = 0, u = 250, v = 1200 and P = 0 is called a basic solution.

Finding a basic solution

1. Translate the simplex tableau into its corresponding system of equations.

2. Set the nonbasic variables equal to zero. (The nonbasic variables are the variables whose columns are not in unit form).

3. Solve for the basic variables (the ones associated with the unit columns).

If the same procedure is applied to the simplex tableau of Example 3.2, x and y are found to be nonbasic variables and u, v, w and P are basic variables. Thus in the equations

2x + y + u = 12 2x + 3y + v = 24

x + w = 6 –3x – 5y + P = 0

set x = 0 and y = 0

which gives

u = 12, v = 24, w = 6 and P = 0 as values for the basic variables. The basic solution is x = 0, y = 0, u = 12, v = 24, w = 5 and P = 0. Similarly, using the simplex tableau found in Example 3.3, x and y are nonbasic variables, u, v, w and P are basic variables and that gives a basic solution of

x = 0, y = 0, u = 10, v = 12, w = 3 and P = 0. Now you’re ready for the second step of the simplex procedure, namely pivoting. Pivoting and the complete simplex procedure

Page 7: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

82 Chapter 3: Simplex Method

Once a basic solution is determined it must be tested to see if it gives an optimal solution. Let’s go back to Example 3.1 again. If x = 0 and y = 0, then P = 0. However, it’s clear that P = 0 is not the maximum profit because P can be made bigger by simply producing some cups and/or plates (as long as the potter doesn’t outstrip her resources or, mathematically speaking, as long as the points (x, y) stay in the feasible region). Since

P = 2x + 1.5y, it seems the profit can be improved more by producing cups as opposed to plates, since the coefficient of x is bigger than that of y. To figure that out from the simplex tableau, observe that the number that shows up as the biggest positive coefficient on the right side of the equation

P = 2x + 1.5y is 2 and that corresponds to the number that is most negative (–2) in the last row of the simplex tableau. In the pivoting procedure, the column corresponding to the number in the last row which is most negative is called the pivot column. In this example the pivot column is the x column. Of course, the potter is limited in the number of cups she can produce. Looking at the graph you see that the largest number of cups that can be made and still stay in the feasible region is 200. However, that can be determined from the simplex tableau as well. Look at the pivot column and take each entry in that column (other than the –2 in the last row) and divide it into the constant in the constant column and the same row as that entry. For the .75 entry, the ratio 250/.75 or 1000/3 is obtained and for the 6 entry, the ratio 200. The number in the pivot column which gives the smallest ratio is called the pivot element.

Finding the Pivot Element

1. In the last row, find the negative number that is the largest in absolute value.

2. Divide each positive entry in the pivot column into the number in the column of constants that is in the same row as the entry. The row of the smallest ratio is the pivot row.

3. The number in the pivot row and pivot column is the pivot element.

The next step in the simplex procedure is the pivoting operation.

Page 8: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.1: Standard Problems 83

Pivoting

1. Divide the pivot row by the pivot element so the pivot element becomes 1.

2. Use the pivot row and row operations to get 0ʼs in the rest of the pivot column.

Continuing with Example 3.1, box the pivot element in the simplex tableau and pivot on it to get

x y u v P x y u v P

⎝⎜⎜⎛

⎪⎪⎪⎪.75 1 1 0 0

6 3 0 1 0

–2 –1.5 0 0 1⎠⎟⎞ 250

1200 0

16 R2

⎝⎜⎛

⎪⎪⎪.75 1 1 0 0

1 1/2 0 1/6 0–2 –1.5 0 0 1 ⎠

⎟⎞250

2000

x y u v P

R1 – .75R2

R3 + 2R2

⎝⎜⎛

⎪⎪⎪0 5/8 1 –1/8 0

1 1/2 0 1/6 00 –.5 0 1/3 1 ⎠

⎟⎞100

200400

.

This is a new simplex tableau, having as unit columns the x, u and P columns. Thus, there is a new set of basic variables, x, u and P, and a new set of nonbasic variables, y and v. Applying the pivoting procedure converted x to a basic variable and v to a nonbasic variable. Setting the nonbasic variables equal to 0 and finding the values of the basic variables as was done before, gives x = 200, u = 100, y = 0, v = 0 and P = 400 which is the basic solution at this stage. The new basic solution has improved her profit from P = 0 to P = 400 but is this solution optimal? The answer is no and that can be determined by going to the last row in the simplex tableau. If the last row is converted to its corresponding equation, then

0x – .5y + 0u + 1/3v + P = 400 or P = .5y –1/3v + 400. Her profit can be made larger by making y larger since y is currently equal to zero.

Page 9: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

84 Chapter 3: Simplex Method

(Making v larger would decrease her profit.) But the way to see it directly from the simplex tableau is to note there is still a negative number (–.5) in the last row . That negative number is in the y column. So the y column becomes the new pivot column and the pivot element again needs to be determined. Looking at each entry in the pivot column (other than –.5) and finding the ratios as was done before yields 100 divided by 5/8 and 200 divided by 1/2. The ratios are 160 and 400 respectively and 160 is the smaller of the two ratios. The entry that gave the smallest ratio is 5/8 so that’s the pivot element. Now pivot about 5/8, i.e. multiply that row by 8/5 to convert the pivot element to 1 and then use elementary row operations to convert the pivot column (in this case the y column) to a unit column. The computations are:

x y u v P x y u v P

⎝⎜⎜⎛

⎪⎪⎪⎪0 5/8 1 –1/8 0

1 1/2 0 1/6 00 –.5 0 1/3 1

⎠⎟⎞ 100

200400

85 R1

⎝⎜⎛

⎪⎪⎪0 1 8/5 –1/5 0

1 1/2 0 1/6 00 –.5 0 1/3 1 ⎠

⎟⎞160

200400

x y u v P

R2 – 12 R1

R3 + 12 R1

⎝⎜⎛

⎪⎪⎪0 1 8/5 –1/5 0

1 0 –4/5 4/15 00 0 4/5 7/30 1 ⎠

⎟⎞160

120480

Pivoting converted y to a basic variable and u to a nonbasic variable so the basic variables are now x, y and P and the nonbasic variables are u and v. Thus the basic solution is x = 120, y = 160, u = 0, v = 0 and P = 480. At this point, since u = 0, the potter has used all her clay and since v = 0, she has used all her available time. To test to see if this solution is optimal, look at the equation corresponding to the last row of the simplex tableau and solve for P.

P = –4/5u – 7/30v + 480. Increasing either u or v decreases P. However, again that can be determined from the simplex tableau by noting that there are no longer any negative numbers in the bottom row. Thus, the optimal solution is:

x = 120 y = 160 P = 480 and u = v = 0.

Page 10: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.1: Standard Problems 85

Now that one problem has been solved in detail, let’s summarize the procedure.

Summary: Simplex procedure for standard problems

1. Convert the constraint inequalities to equalities by introducing a slack variable into each inequality. (Remember to exclude the inequalities that require the variables to be nonnegative). Then set up the initial simplex tableau.

2. Determine if the optimal solution has been reached (i.e. check if the bottom row has negative entries). If there are no negative entries, you have the optimal solution: Go directly to step 5. (If there are negative entries then continue with step 3.)

3. Find the pivot element. 4. Pivot using the pivot element and then go back to step 2. 5. The optimal solution is found by determining the basic

solution at this stage.

Now let’s look at Examples 3.2 and 3.3 again. Since Step 1 has already been done for each example, the examples will begin with Step 2. Example 3.2 (continued). Maximize P = 3x + 5y

subject to: 2x + y ≤ 12

2x + 3y ≤ 24 x ≤ 6 x ≥ 0 y ≥ 0

Solution (continued): The initial simplex tableau was:

x y u v w P

Page 11: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

86 Chapter 3: Simplex Method

⎝⎜⎛

⎪⎪⎪2 1 1 0 0 0

2 3 0 1 0 01 0 0 0 1 0–3 –5 0 0 0 1

⎠⎟⎞12

2460

Step 2: There are negative numbers in the last row . Step 3: The most negative is –5, so the pivot column is the y column. Computing ratios gives 12/1 =12 and 24/3 = 8. The smallest ratio is 8 so 3 is the pivot element. It’s good practice to box the pivot element at this stage so as not to lose track of it. Step 4: Pivoting on this pivot element results in the following row operations:

x y u v w P x y u v w P

⎝⎜⎜⎛

⎪⎪⎪⎪

2 1 1 0 0 0

2 3 0 1 0 0

1 0 0 0 1 0–3 –5 0 0 0 1

⎠⎟⎞12

24 60

13 R2

⎝⎜⎛

⎪⎪⎪2 1 1 0 0 0

2/3 1 0 1/3 0 01 0 0 0 1 0–3 –5 0 0 0 1

⎠⎟⎞12

8640

x y u v w P R1 – R2

R4 + 5R2

⎝⎜⎛

⎪⎪⎪4/3 0 1 –1/3 0 0

2/3 1 0 1/3 0 01 0 0 0 1 0

1/3 0 0 5/3 0 1⎠⎟⎞4

8640

Step 2: Since there are no longer any negative numbers in the last row, the basic solution is the optimal solution. Step 5: The optimal solution is: x = 0, y = 8, u = 4, v = 0, w = 6 and P = 40. Example 3.3 (continued). Maximize P = 4x + 2y

subject to x + y ≤ 10

3x + y ≤ 12 4x – 3y ≤ 3 x ≥ 0, y ≥ 0

Solution (continued): The simplex tableau is

Page 12: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.1: Standard Problems 87

x y u v w P

⎝⎜⎛

⎪⎪⎪1 1 1 0 0 0

3 1 0 1 0 04 –3 0 0 1 0–4 –2 0 0 0 1

⎠⎟⎞10

1230

.

Step 2: The solution is not optimal since there are negative numbers in the last row. Step 3: The pivot column is the x column since that is the column associated with the most negative number in the last row. Computing ratios gives 10/1 =10, 12/3 = 4 and 3/4. 3/4 is the smallest ratio so the pivot element is the entry in the third row and first column. Step 4: Boxing the 4 and pivoting on it yields

x y u v w P x y u v w P

⎝⎜⎜⎛

⎪⎪⎪⎪

1 1 1 0 0 03 1 0 1 0 0

4 –3 0 0 1 0

–4 –2 0 0 0 1⎠⎟⎞10

12 3 0

14 R3

⎝⎜⎛

⎪⎪⎪1 1 1 0 0 0

3 1 0 1 0 01 –3/4 0 0 1/4 0

–4 –2 0 0 0 1⎠⎟⎞37/4

39/43/43

x y u v w P

R1 – R3R2 – 3R3

R4 + 4R3

⎝⎜⎛

⎪⎪⎪0 7/4 1 0 –1/4 0

0 13/4 0 1 –3/4 01 –3/4 0 0 1/4 00 –5 0 0 1 1

⎠⎟⎞37/4

39/43/43

.

The basic solution at this stage is x = 3/4, y = 0, u = 37/4, v = 39/4, w = 0 and P = 3. Step 2: There’s still a negative number in the last row so the procedure must be continued. Step 3: The pivot column is now the y column and computing ratios gives (37/4)/(7/4) = 37/7 and (39/4)/(13/4) = 3. (Notice when the ratios were computed, the –3/4 in the third row of the pivot column was ignored since the instructions in step 3 for finding the pivot element specify that the pivot element must be a positive number.) The smallest ratio is 3

Page 13: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

88 Chapter 3: Simplex Method

so the pivot element is 13/4, the entry in the second row of the pivot column. Step 4: Pivoting on this element gives

x y u v w P

⎝⎜⎜⎛

⎪⎪⎪⎪

0 7/4 1 0 –1/4 0

0 13/4 0 1 –3/4 0

1 –3/4 0 0 1/4 00 –5 0 0 1 1

⎠⎟⎞37/4

39/4 3/43

x y u v w P 4

13 R2

⎝⎜⎛

⎪⎪⎪0 7/4 1 0 –1/4 0

0 1 0 4/13 –3/13 01 –3/4 0 0 1/4 00 –5 0 0 1 1

⎠⎟⎞37/4

33/43

x y u v w P

R1 – 74 R2

R3 + 34 R2

R4 + 5R2

⎝⎜⎛

⎪⎪⎪0 0 1 –7/13 2/13 0

0 1 0 4/13 –3/13 01 0 0 3/13 1/13 00 0 0 20/13 –2/13 1

⎠⎟⎞4

3318

.

The basic solution at this stage is x = 3, y = 3, u = 4, v = 0, w = 0 and P = 18. Step 2: However, there’s still a negative number in the last row so the basic solution is not the optimal solution. Step 3: The pivot column is the w column so computing ratios, 4/(2/13) = 26 and 3/(1/13) = 39. Thus the pivot element is 2/13. Step 4: Pivoting on it,

x y u v w P

Page 14: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.1: Standard Problems 89

⎝⎜⎜⎛

⎪⎪⎪⎪

0 0 1 –7/13 2/13 0

0 1 0 4/13 –3/13 01 0 0 3/13 1/13 00 0 0 20/13 –2/13 1

⎠⎟⎞ 4

3318

x y u v w P

132 R1

⎝⎜⎛

⎪⎪⎪0 0 13/2 –7/2 1 0

0 1 0 4/13 –3/13 01 0 0 3/13 1/13 00 0 0 20/13 –2/13 1

⎠⎟⎞26

3318

x y u v w P

R2 + 3

13 R1

R3 – 113 R1

R4 + 213 R1

⎝⎜⎛

⎪⎪⎪0 0 13/2 –7/2 1 0

0 1 3/2 –1/2 0 01 0 –1/2 1/2 0 00 0 1 1 0 1

⎠⎟⎞26

9122

.

Step 5: Since no negative numbers appear in the bottom row, the basic solution is optimal. It is x = 1, y = 9, u = 0, v = 0, w = 26 and P = 22. Of course, the simplex method is most useful in situations where it’s difficult to use the geometric method, so let’s go through one more example, applying the method to a problem which couldn’t be solved before. The following example was introduced as Example 2.14 in Chapter 2. Example 3.4. A manufacturer of outdoor furniture makes wooden couches, tables and chairs, each of which must be fabricated, assembled and finished. Each table requires 1 hour to fabricate, 3 hours to assemble and 4 hours to finish and returns a profit of $10. Each couch requires 6 hours to fabricate, 10 hours to assemble and 8 hours to finish and returns a profit of $12. Each chair requires 1 hour to fabricate, 1 hour to assemble and an hour to finish and returns a profit of $6. The manufacturer has 12,000 staff-hours available each week for fabrication, 30,000 staff-hours for assembling and 40,000 staff-hours for finishing. How many units of each type of furniture should the manufacturer produce each week in order to maximize his profit?

Page 15: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

90 Chapter 3: Simplex Method

Solution: In Chapter 2 the problem was formulated as:

Maximize P = 10x + 12y + 6z subject to

x + 6y + z ≤ 12,000 3x +10y + z ≤ 30,000 4x + 8y + z ≤ 40,000

x ≥ 0, y ≥ 0, z ≥ 0

Step 1: Convert the inequalities to equations by introducing slack variables:

x + 6y + z + u = 12,000 3x +10y + z + v = 30,000 4x + 8y + z + w = 40,000

–10x – 12y – 6z + P = 0 The simplex tableau is:

x y z u v w P

⎝⎜⎜⎛

⎪⎪⎪⎪

1 6 1 1 0 0 0

3 10 1 0 1 0 04 8 1 0 0 1 0

–10 –12 –6 0 0 0 1⎠⎟⎞ 12000

3000040000

0

The basic solution is not optimal so the pivot column and the pivot element are determined and the pivot element is then boxed in the above matrix. Converting the pivot column to a unit column,

x y z u v w P 16 R1

⎝⎜⎛

⎪⎪⎪1/6 1 1/6 1/6 0 0 0

3 10 1 0 1 0 04 8 1 0 0 1 0

–10 –12 –6 0 0 0 1⎠⎟⎞2000

3000040000

0

x y z u v w P

R2 – 10R1R3 – 8R1

R4 + 12R1

⎝⎜⎜⎛

⎪⎪⎪⎪

1/6 1 1/6 1/6 0 0 0

4/3 0 –2/3 –5/3 1 0 0

8/3 0 –1/3 –4/3 0 1 0–8 0 –4 2 0 0 1

⎠⎟⎞2000

10000 2400024000

.

Page 16: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.1: Standard Problems 91

The next pivot element is boxed in the above matrix, and the procedure is continued, converting the new pivot column (the x column) to a unit column.

x y z u v w P 34 R2

⎝⎜⎛

⎪⎪⎪1/6 1 1/6 1/6 0 0 0

1 0 –1/2 –5/4 3/4 0 08/3 0 –1/3 –4/3 0 1 0–8 0 –4 2 0 0 1

⎠⎟⎞2000

75002400024000

x y z u v w P

R1 – 16 R2

R3 – 83 R2

R4 + 8R2

⎝⎜⎜⎛

⎪⎪⎪⎪

0 1 1/4 3/8 –1/8 0 0

1 0 –1/2 –5/4 3/4 0 00 0 1 2 –2 1 00 0 –8 –8 6 0 1

⎠⎟⎞ 750

7500400084000

Now, in trying to find the next pivot column, there are two choices, since both of the negative numbers in the last row have the same value. Either the z or the u column can be picked. Let’s pick the z column. (You might see what happens if the u column is picked—your final answer should be the same). The new pivot element is enclosed in a box in the matrix above. Converting the z column to a unit column gives

x y z u v w P 4R1

⎝⎜⎛

⎪⎪⎪0 4 1 3/2 –1/2 0 0

1 0 –1/2 –5/4 3/4 0 00 0 1 2 –2 1 00 0 –8 –8 6 0 1

⎠⎟⎞3000

75004000

84000

Page 17: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

92 Chapter 3: Simplex Method

x y z u v w P

R2 + 12 R1

R3 – R1

R4 + 8R1

⎝⎜⎛

⎪⎪⎪0 4 1 3/2 –1/2 0 0

1 2 0 –1/2 1/2 0 00 –4 0 1/2 –3/2 1 00 32 0 4 2 0 1

⎠⎟⎞3000

90001000

108000

.

Since the last row has no negative numbers, the procedure is done. The optimal solution is:

x = 9000 v = 0 y = 0 w = 1000 z = 3000 P = 108,000 u = 0

That means the manufacturer should produce 9000 tables, 0 couches, and 3000 chairs for a maximum profit of $108,000. Since he has 1000 excess hours of finishing work, he might also consider reassigning or hiring out a few of the workers assigned to finishing the furniture. (In Section 3.3, you’ll see how he can best decide what to do). The simplex method looks complicated at first but after going through the procedure on a few problems, you’ll quickly get the hang of it. You do have to be careful with your computations and you do need to stick closely to the procedure since deviations from this procedure can mess you up badly. One deviation that is allowed is in picking the pivot column. The procedure calls for choosing a pivot column by looking for the number that is most negative in the last row of the simplex tableau. In fact, you can choose any column that has a negative number in the last row. You might look at Example 3 and see what would happen if you picked y as the pivot column initially. While the simplex method does allow a wide variety of linear programming problems to be solved, there are many technical difficulties that have not been considered that can occur in the process of solving these problems. Some aspects are beyond the scope of this book. However, you should be prepared to deal with a few of the situations that might happen. For example, if the feasible region is unbounded, the objective function may not have a maximum (minimum) on the region. In that case, the simplex method will break down at some point. For instance, when you compute the ratios in the pivot column, you might end up with none of the ratios being positive. Another possible scenario is that there may be more than one solution to the problem (this was discussed when solving problems using the geometric method— two adjacent vertices gave the same optimal value for the objective function). In that case, the choice of pivot column may well affect the final solution. See Exercise 25 at the end of this section. One more situation that can arise is the appearance of a zero in the upper part of the

Page 18: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.1: Standard Problems 93

last column at some point in the simplex procedure. This is associated with a condition called degeneracy. For most problems having only a few variables, the simplex procedure can be followed without difficulty and the optimal solution will then be obtained. However, in some cases degeneracy can lead to a situation known as cycling, in which at some point in the simplex procedure a sequence of simplex tableaux repeats over and over so the objective function stays the same and thus you never arrive at the optimal solution. Cycling is a rare occurrence and there are techniques for dealing with it which are incorporated in computer programs that use the simplex procedure, but they are beyond the scope of this text. Geometric Interpretation of the Simplex Procedure The key to understanding the geometry behind the simplex procedure is recognizing two facts:

1. A basic solution at any stage of the simplex procedure corresponds (in the standard problem) to a vertex of the feasible region.

2. In pivoting the basic solution is exchanged for another one and in the process one

nonbasic variable is also exchanged for another one. Geometrically that corresponds to moving from one vertex to an adjacent one along a boundary line.

Let’s see how to interpret Examples 3.1 and 3.3 geometrically. Example 3.1 (continued): A potter is making cups and plates. It takes her 6 minutes to make a cup and 3 minutes to make a plate. Each cup uses 3/4 lb. of clay and each plate uses 1 lb. of clay. She has 20 hours available for making the cups and plates and has 250 lbs. of clay on hand. She makes a profit of $2 on each cup and $1.50 on each plate. How many cups and how many plates should she make in order to maximize her profit? Solution (geometric interpretation): The mathematical statement of the problem was as follows:

Maximize P = 2x + 1.5y subject to

.75x + y ≤ 250 6x + 3y ≤ 1200

x ≥ 0 y ≥ 0

where x = number of cups produced

y = number of plates produced.

Page 19: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

94 Chapter 3: Simplex Method

y

x

100

200

300

400

100 300 400

6x + 3y = 1200

.75x + y = 250

(0,250)

(120,160)

(200,0)(0,0)

In order to understand the geometric ideas behind the simplex procedure, it’s important to realize that for the graph of the feasible region, each of the boundary lines can be described by setting one of the original variables, x or y, or one of the slack variables, u or v, equal to 0. Thus, the 4 corner points can be represented as the intersection of lines in which two of the variables are set equal to 0. (x = 0 and y = 0 in the case of A, y = 0 and v = 0 in the case of B, u = 0 and v = 0 in the case of C and x = 0 and u = 0 in the case of D).

y

x

100

200

300

400

100 400

C(120,160) or u = 0 , v = 0

6x + 3y = 1200 or v = 0

.75x + y = 250 or u = 0

D(0,250) orx = 0 , u = 0

B(200,0) ory = 0 , v = 0

A(0,0) orx = 0 , y = 0

The first step in the simplex procedure was to set up the simplex tableau.

x y u v P

Page 20: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.1: Standard Problems 95

⎝⎜⎛

⎪⎪⎪.75 1 1 0 0

6 3 0 1 0–2 –1.5 0 0 1 ⎠

⎟⎞250

12000

The basic solution at this point is x = 0, y = 0, u = 250, v = 1200 and P = 0. The values of the nonbasic variables are x = 0 and y = 0 which correspond to the vertex A. The next step is to find the pivot element which was done by finding the pivot column and computing ratios to find the pivot element. The pivot column was the x column and the ratios were 250/.75 = 1000/3 and 1200/6 = 200. The ratios represent the intersection of the x axis (y = 0) with the line .75x + y = 250 (u = 0) and the line 6x + 3y = 1200 (v = 0) respectively. The first point (1000/3, 0) is not in the feasible region while the second point (200, 0) is in the feasible region. Check this out on the graph above. Thus, the smallest ratio represents a limiting point for the feasible region. The next step was to pivot about the pivot element 6 which gave

x y u v P x y u v P

⎝⎜⎜⎛

⎪⎪⎪⎪.75 1 1 0 0

6 3 0 1 0

–2 –1.5 0 0 1 ⎠⎟⎟⎞250

1200

0

16 R2

⎝⎜⎛

⎪⎪⎪.75 1 1 0 0

1 1/2 0 1/6 0–2 –1.5 0 0 1 ⎠

⎟⎞250

200400

x y u v P

R1 – .75R2

R3 + 2R2

⎝⎜⎛

⎪⎪⎪0 5/8 1 –1/8 0

1 1/2 0 1/6 00 –.5 0 1/3 1 ⎠

⎟⎞100

200400

The basic solution (which is not optimal) at this point is x = 200, y = 0, u = 100, v = 0 and P = 400. The basic solution corresponds to the vertex x = 200, y = 0 which is the intersection of the boundary lines y = 0 and v = 0. So, in pivoting, the nonbasic variable x was changed to basic and the basic variable v was changed to a nonbasic variable. Geometrically, the basic solution moved from the vertex A (x = 0, y = 0) along the boundary line y = 0 to the vertex B (y = 0, v = 0). Since the entry in the last row of the y column is negative, y should be increased and v should be kept equal to zero. Moving along the line v = 0, observe that it intersects the line u = 0 at the point (120, 160) and the line x = 0 at the point (0, 400). Clearly the next vertex to move to is (120, 160) since it’s in the feasible region while (0, 400) is not. The corresponding step in the simplex procedure is choosing a pivot column and computing ratios to determine the pivot

Page 21: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

96 Chapter 3: Simplex Method

element. The pivot column is the y column and the ratios are 100/(5/8) = 160 and 200/(1/2) = 400. Again, choosing the smallest ratio in the pivoting step guarantees the solution stays in the feasible region. The next step algebraically was to pivot about 5/8, obtaining

x y u v P x y u v P

⎝⎜⎛

⎪⎪⎪0 5/8 1 –1/8 0

1 1/2 0 1/6 00 –.5 0 1/3 1 ⎠

⎟⎞100

200400

85 R1

⎝⎜⎛

⎪⎪⎪0 1 8/5 –1/5 0

1 1/2 0 1/6 00 –.5 0 1/3 1 ⎠

⎟⎞160

200400

x y u v P

R2 – 12 R1

R3 + 12 R1

⎝⎜⎛

⎪⎪⎪0 1 8/5 –1/5 0

1 0 –4/5 4/15 00 0 4/5 7/30 1 ⎠

⎟⎞160

120480

.

The basic (and optimal) solution at this point is x = 120, y = 160, u = 0, v = 0 and P = 480. The basic solution corresponds to the vertex x = 120, y = 160 which is the intersection of the two boundary lines u = 0 and v = 0. In pivoting, the basic solution moved from the vertex B (y = 0, v = 0) to the vertex C (u = 0, v = 0) along the boundary line v = 0. Example 3.3 (continued). Maximize P = 4x + 2y

subject to: x + y ≤ 10

3x + y ≤ 12 4x – 3y ≤ 3 x ≥ 0, y ≥ 0

Solution (geometric interpretation):

Page 22: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.1: Standard Problems 97

y

x

2

4

6

8

2 4 6 8 10

(1,9) or v = 0, u = 0

3x + y = 12 or v = 0

4x – 3y = 3 or w = 0

x + y = 10 or u = 0

(3,3) or v = 0, w = 0

(3/4,0) or y = 0, w = 0(0,0)

(0,10)or x = 0, u = 0

The simplex tableau is

x y u v w P

⎝⎜⎛

⎪⎪⎪1 1 1 0 0 0

3 1 0 1 0 04 –3 0 0 1 0

–4 –2 0 0 0 1⎠⎟⎞10

1230

.

The initial basic solution is x = 0, y = 0, u = 10, v = 12, w = 3 and P = 0. The vertex corresponding to this is the origin. The pivot column is the x column and the ratios are 10/1 = 10, 12/3 = 4, and 3/4. Those ratios correspond to the intersection of the boundary line y = 0 with the boundary lines u = 0, v = 0 and w = 0 respectively. Picking the smallest ratio of 3/4 keeps the solution in the feasible region. Pivoting about 4 gives

x y u v w P x y u v w P

⎝⎜⎜⎛

⎪⎪⎪⎪

1 1 1 0 0 03 1 0 1 0 0

4 –3 0 0 1 0

–4 –2 0 0 0 1⎠⎟⎞10

12 3 0

14 R3

⎝⎜⎛

⎪⎪⎪1 1 1 0 0 0

3 1 0 1 0 01 –3/4 0 0 1/4 0

–4 –2 0 0 0 1⎠⎟⎞37/4

39/43/43

x y u v w P

Page 23: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

98 Chapter 3: Simplex Method

R1 – R3R2 – 3R3

R4 + 4R3

⎝⎜⎛

⎪⎪⎪0 7/4 1 0 –1/4 0

0 13/4 0 1 –3/4 01 –3/4 0 0 1/4 00 –5 0 0 1 1

⎠⎟⎞37/4

39/43/43

The basic solution is now x = 3/4, y = 0, u = 37/4, v = 39/4, w = 0 and P = 3 which corresponds to the vertex x = 3/4, y = 0 which is the intersection of the boundary lines y = 0 and w = 0. Next the y column is picked as the pivot column and ratios are computed, ignoring the –3/4. (Can you think of a geometric reason why –3/4 is ignored?) The ratios are 37/7 and 3 which represent the intersection of the w = 0 line with u = 0 and v = 0 respectively. Picking the smaller ratio and pivoting on 13/4 gives

x y u v w P

⎝⎜⎜⎛

⎪⎪⎪⎪

0 7/4 1 0 –1/4 0

0 13/4 0 1 –3/4 0

1 –3/4 0 0 1/4 00 –5 0 0 1 1

⎠⎟⎞37/4

39/4 3/43

x y u v w P

413 R2

⎝⎜⎛

⎪⎪⎪0 7/4 1 0 –1/4 0

0 1 0 4/13 –3/13 01 –3/4 0 0 1/4 00 –5 0 0 1 1

⎠⎟⎞37/4

33/43

x y u v w P

R1 – 74 R2

R3 + 34 R2

R4 + 5R2

⎝⎜⎛

⎪⎪⎪0 0 1 –7/13 2/13 0

0 1 0 4/13 –3/13 01 0 0 3/13 1/13 00 0 0 20/13 –2/13 1

⎠⎟⎞4

3318

.

Page 24: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.1: Standard Problems 99

The basic solution is x = 3, y = 3, u = 4, v = 0, w = 0 and P = 18. In pivoting the basic solution has moved to the vertex x = 3 and y = 3 along the boundary line w = 0. This vertex is the intersection of the boundary lines v = 0 and w = 0. The w column now becomes the pivot column. Computing ratios gives 26 and 39. What do these numbers correspond to on the graph? The pivot element is 2/13 and again pivoting,

x y u v w P

⎝⎜⎜⎛

⎪⎪⎪⎪

0 0 1 –7/13 2/13 0

0 1 0 4/13 –3/13 01 0 0 3/13 1/13 00 0 0 20/13 –2/13 1

⎠⎟⎞ 4

3318

x y u v w P

132 R1

⎝⎜⎛

⎪⎪⎪0 0 13/2 –7/2 1 0

0 1 0 4/13 –3/13 01 0 0 3/13 1/13 00 0 0 20/13 –2/13 1

⎠⎟⎞26

3318

x y u v w P

R2 + 3

13 R1

R3 – 113 R1

R4+ 213 R1

⎝⎜⎛

⎪⎪⎪0 0 13/2 –7/2 1 0

0 1 3/2 –1/2 0 01 0 –1/2 1/2 0 00 0 1 1 0 1

⎠⎟⎞26

9122

The basic (and optimal) solution is x = 1, y = 9, u = 0, v = 0, w = 26 and P = 22. The vertex which gives this result is x = 1, y = 9 and represents the intersection of the boundary lines u = 0 and v = 0. Notice that in the simplex procedure the basic solution started out at the origin and, after pivoting, it moved along the boundary line y = 0 to the adjacent vertex (3/4, 0). After another pivoting operation it moved along the boundary line w = 0 to the vertex (3, 3) and the final pivoting operation moved it along the boundary line v = 0 to the vertex (1, 9) which is the vertex corresponding to the optimal solution.

Page 25: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

100 Chapter 3: Simplex Method

Problems In Exercises 1-4, determine if the stated problem is standard or nonstandard. If it is nonstandard, explain why. If it is standard, set up the initial simplex tableau. 1. Maximize P = 2x + 3y 2. Minimize P = 3x + y subject to subject to 4x + 2y ≤ 9 2x + 5y ≤ 14 x + 3y ≤ 12 x + y ≤ 20 x ≥ 0, y ≥ 0 x – 2y ≤ 5 x ≥ 0, y ≥ 0 3. Maximize P = 3x + 2y + z 4. Maximize P = 2x – y + 4z subject to subject to x + y + z ≤ 15 3x + 2y + 4z ≤ 12 x + 6 ≤ –2z x + y ≤ 4 x ≥ 0, y ≥ 0, z ≥ 0 y + 2z ≤ 5 x ≥ 0, y ≥ 0, z ≥ 0 In Exercises 5-8, find the basic solution for the simplex tableau and determine if the solution is optimal. If it is not optimal find the pivot element, go through one complete pivoting step and state the new basic solution. x y u v P x y u v w P

5. ⎝⎜⎛

⎪⎪⎪1 1 1 0 0

2 3 0 1 0–5 –4 0 0 1 ⎠

⎟⎞2

60

6. ⎝⎜⎛

⎪⎪⎪2 1 1 0 0 0

3 1 0 1 0 01 1 0 0 1 0

–3 –2 0 0 0 1⎠⎟⎞6

850

x y u v w P x y z u v w P

7. ⎝⎜⎛

⎪⎪⎪2 0 1 0 –1 0

2 0 0 1 –3 00 1 0 0 1 0

–2 0 0 0 5 1⎠⎟⎞10

66

30

8. ⎝⎜⎛

⎪⎪⎪1/2 0 1 1 0 –1/10 0

3 0 1 0 1 0 01/2 1 0 0 0 1/10 00 0 3 0 0 1/5 1

⎠⎟⎞108

2401224

In Exercises 9-12, introduce slack variables to convert the constraint inequalities to equations. Then graph the feasible region, labeling all boundary lines and vertices, using x = 0, y = 0, etc. Then solve the problem using the simplex procedure. After each complete pivoting step, state the basic solution and find the corresponding vertex on the graph. Check your answer using the geometric method. 9. Maximize P = 2x + y 10. Maximize P = 2x + 3y subject to subject to

Page 26: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.1: Standard Problems 101

x + 2y ≤ 30 –x + y ≤ 1 3x + y ≤ 30 x + y ≤ 4 x ≥ 0, y ≥ 0 x + 2y ≤ 5 x ≥ 0, y ≥ 0 11. Maximize P = 3x + 2y 12. Maximize P = x + y subject to subject to the constraints given in –x + y ≤ 2 Exercise 11 x + y ≤ 6 x – y ≤ 2 x ≤ 3, x ≥ 0, y ≥ 0 In Exercises 13-23, solve the problems using the simplex procedure 13. Maximize P = 3x + 4y 14. Maximize P = x + 4y subject to subject to x + y ≤ 5 2x + y ≤ 10 3y ≤ 9 x + 3y ≤ 10 x ≥ 0, y ≥ 0 x ≥ 0, y ≥ 0 15. Maximize P = 2x + y 16. Maximize P = –4x + 2y + 3z subject to subject to 3x + y ≤ 9 2x – y + z ≤ 3 6x + y ≤ 12 3x + y + z ≤ 5 x ≥ 0, y ≥ 0 –x + y + 3z ≤ 2 x ≥ 0, y ≥ 0, z ≥ 0 17. Maximize P = 3x + 6y + 8z 18. Maximize P = x + 2y + 3z subject to subject to 4x + 2y + z ≤ 36 3x + 2y + z ≤ 11 2x + y + 2z ≤ 36 x – y + 2z ≤ 12 x ≥ 0, y ≥ 0, z ≥ 0 x ≥ 0, y ≥ 0, z ≥ 0 19. Maximize P = 6x + 6y + 5z 20. Maximize P = 7x + 12y + 8z subject to subject to x + y + z ≤ 12 x + 2y + z ≤ 144 3x + 3y + z ≤ 30 5x + 2z ≤ 216 x ≥ 0, y ≥ 0, z ≥ 0 3x + 8y + 6z ≤ 768 x ≥ 0, y ≥ 0, z ≥ 0 21. Maximize P = 5x + 4y + 3z 22. Maximize P = 10 x + 20y + 12z subject to subject to 1/2 x + 1/3 y + 1/2 z ≤ 12 x + 2y ≤ 150 1/2 x + 1/3 y ≤ 8 x + 2z ≤ 150 1/3 y + 1/2 z ≤ 10 2x + z ≤ 80 x ≥ 0, y ≥ 0, z ≥ 0 2x + y + 3z ≤ 225 x ≥ 0, y ≥ 0, z ≥ 0

Page 27: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

102 Chapter 3: Simplex Method

23. Maximize P = 25x + 50y + 80z + 200q subject to x ≤ 15 y ≤ 10 z ≤ 10 q ≤ 3 x + 2y + 2z + 4q ≤ 40 x ≥ 0, y ≥ 0, z ≥ 0, q ≥ 0 24. Try to solve the following problem using the simplex method. Then graph the

feasible region to see what’s happening. Maximize P = 3x + 2y subject to x – y ≤ 3 x – 2y ≤ 2 x ≥ 0, y ≥ 0 25. Solve the following problem using the simplex method by

(a) choosing the x column as the first pivot column (b) choosing the y column as the first pivot column Then solve the problem using the graphical method. Explain your results. Maximize P = 3x + 2y subject to 3x + 2y ≤ 6 x + 2y ≤ 4 x ≥ 0, y ≥ 0

26. A farmer has a 320 acre farm on which she plants two crops: corn and soybeans. For

each acre of corn planted, her expenses are $50 and for each acre of soybeans planted, her expenses are $100. Each acre of corn requires 100 bushels of storage and yields a profit of $60; each acre of soybeans requires 40 bushels of storage and yields a profit of $90. If the total amount of storage space available is 19,200 bushels and the farmer has only $20,000 on hand, how many acres of each crop should she plant in order to maximize her profit? What will her profit be if she follows this strategy?

27. A company manufactures checker sets and chess sets. Suppose each day the

company has available 1900 boards (which can be used for both games) and 80,000 units of wood for making pieces. Each checker set uses 20 units of wood and each chess set uses 80 units of wood. The distributors the company sells to can take up to 1250 checker sets per day and up to 750 chess sets per day. The company makes a profit of $1 on each checker set and $1.25 on each chess set. How many checker sets and how many chess sets should the company make each day in order to

Page 28: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.1: Standard Problems 103

maximize its profits? What is the profit per day using this strategy? 28. A developer is planning to build a new subdivision consisting of townhouses, single-

story detached houses and two-story detached houses. On one acre he can put 6 townhouses or 4 single-story houses or 2 two-story houses and he has 60 acres available. It costs him $40,000 to build each townhouse, $50,000 to build each single-story house and $60,000 to build each two-story house. He makes a profit of $15,000 on each townhouse, $18,000 on each single-story house and $20,000 on each two-story house and he has $2,880,000 of capital available. Townhouses require 2500 hours of labor, single-story houses require 3000 hours of labor and two-story houses require 4000 hours of labor and he has 240,000 hours of labor available. How many houses of each type should he construct in order to maximize his profit?

29. A company makes two types of sofas, regular and long, at two locations, one in

Hickory and one in Lenoir. The plant in Hickory has a daily operating budget of $45,000 and can produce at most 300 sofas daily in any combination. It costs $150 to make a regular sofa and $200 to make a long sofa at the Hickory plant. The Lenoir plant has a daily operating budget of $36,000, can produce at most 250 sofas daily in any combination and makes a regular sofa for $135 and a long sofa for $180. The company wants to limit production to a maximum of 250 regular sofas and 350 long sofas each day. If the company makes a profit of $50 on each regular sofa and $70 on each long sofa, how many of each type should be made at each plant in order to maximize profit? What is the maximum profit?

3.2 Nonstandard Problems In Section 3.1 standard linear programming problems were considered. That meant that the problem had to satisfy three conditions:

1. The objective function had to be maximized. 2. All the variables (including the slack variables) had to be nonnegative. 3. All of the constraint equations (other than the ones implied in condition 2) had

to be written as: a1x1 + a2x2 + . . . + anxn ≤ k , where k is a positive constant.

If any of these three conditions are violated, the problem is nonstandard. This section will deal with handling certain types of nonstandard problems. For that type of nonstandard problem, procedures will be applied to its simplex tableau which will get the simplex tableau of that problem into standard form (no negative numbers in the last column, except possibly in the last row), at which point the method of Section 3.1 can take over. The first type of nonstandard problem that is going to be considered is one in which conditions 2 and 3 hold but the objective function is to be minimized rather than maximized. Since condition 1 is violated, the problem is thus nonstandard. That situation is easily handled by making the following observation: Minimizing the objective function ƒ is equivalent to maximizing the function g = –ƒ.

Page 29: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

104 Chapter 3: Simplex Method

For example, if you had a set of numbers S, where

S = {–1, 3 , 15, –5, 7, 9} then the minimum of S is –5. But

–S = {1, –3, –15, 5, –7, –9} so the maximum of –S is 5. Thus, if an objective function C is to be minimized, the problem can be changed so that –C is the objective function and the goal is to maximize –C. Once the maximum of –C is found then solving for C gives the minimum of C. Let’s look at an example to see how this works in practice. Example 3.5. Minimize C = –3x – 4y

subject to x + y ≤ 6

2x + 3y ≤ 16 x ≤ 4 x ≥ 0 y ≥ 0

Solution: Let’s solve the problem:

Maximize –C = 3x + 4y subject to

x + y ≤ 6 2x + 3y ≤ 16

x ≤ 4 x ≥ 0 y ≥ 0

Since this is a standard problem, it can be solved using the techniques of Section 3.1.

x y u v w –C x y u v w –C

⎝⎜⎜⎛

⎪⎪⎪⎪

1 1 1 0 0 0

2 3 0 1 0 0

1 0 0 0 1 0–3 –4 0 0 0 1

⎠⎟⎞6

16 40

13 R2

⎝⎜⎛

⎪⎪⎪1 1 1 0 0 0

2/3 1 0 1/3 0 01 0 0 0 1 0–3 –4 0 0 0 1

⎠⎟⎞6

16/340

x y u v w –C

Page 30: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.2: Nonstandard Problems 105

R1 – R2

R4 + 4R2

⎝⎜⎜⎛

⎪⎪⎪⎪

1/3 0 1 –1/3 0 0

2/3 1 0 1/3 0 01 0 0 0 1 0

–1/3 0 0 4/3 0 1⎠⎟⎞ 2/3

16/34

64/3

x y u v w –C

3R1

⎝⎜⎛

⎪⎪⎪1 0 3 –1 0 0

2/3 1 0 1/3 0 01 0 0 0 1 0

–1/3 0 0 4/3 0 1⎠⎟⎞2

16/34

64/3

x y u v w –C

R2 – 23 R1

R3 – R1

R4 + 13 R1

⎝⎜⎛

⎪⎪⎪1 0 3 –1 0 0

0 1 –2 1 0 00 0 –3 1 1 00 0 1 1 0 1

⎠⎟⎞2

42

22

The solution is x = 2, y = 4, u = 0, v = 0, w = 2, with the maximum of –C = 22 so the minimum of C is C = –22. A more common (and also more complicated) situation arises when condition 3 is violated. (Condition 3 is the one that requires the constraint inequalities to be written as: a1x1 + a2x2 + . . . + anxn ≤ k, where k is a positive number.) Consider the problem:

Maximize P = 3x + 4y subject to

2x + 3y ≤ 12 2x – y ≥ 4

x ≥ 0 y ≥ 0.

All of the constraint inequalities can be written in the form:

ax + by ≤ k but if that is done, then the second inequality becomes

Page 31: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

106 Chapter 3: Simplex Method

–2x + y ≤ –4

and the constant term on the right is now negative, which is a violation of condition 3. Let’s overlook that difficulty for now and find the initial simplex tableau for the problem which is now stated as:

Maximize P = 3x + 4y subject to 2x + 3y ≤ 12

–2x + y ≤ –4 x ≥ 0, y ≥ 0

As before, introduce slack variables u and v to change the inequalities to equalities. 2x + 3y + u = 12 –2x + y + v = –4 –3x –4y + P = 0

Then write the initial simplex tableau.

x y u v P

⎝⎜⎛

⎪⎪⎪2 3 1 0 0

–2 1 0 1 0–3 –4 0 0 1 ⎠

⎟⎞12

–40

(1)

The basic solution associated with this simplex tableau is:

x = 0 y = 0 u = 12 v = –4 P = 0

However v = –4 is a violation of condition 2 which requires that all variables, including slack variables, have to be nonnegative. Let’s see what’s happening geometrically in this problem, since this problem can be solved graphically.

y

x

2

4

6

8

10

–2x + y = -4 or v=0

(3,2) or u=0, v=0

2x + 3y = 12 or u=0

(2,0)or y=0, v=0

(6,0)or y=0, u=0

Page 32: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.2: Nonstandard Problems 107

Looking at the feasible region for this problem, it’s obvious that the initial basic solution, which says x = 0 and y = 0, is not in the region, so the basic solution is, in fact, not feasible. However, even though the origin is not in the feasible region, it’s still the intersection of the lines x = 0 and y = 0 which are the boundary lines for the constraint inequalities x ≥ 0 and y ≥ 0. If you think about all the standard problems which were done in Section 3.1, you’ll realize that in every case, the initial basic solution (which was the origin) was always a feasible solution. Geometrically, it meant that the origin was always in the feasible region. Of course, it generally wasn’t the optimal solution so, in using the simplex method, the basic solution moved along a boundary line to an adjacent vertex in the feasible region and the new vertex was tested to see if it gave the optimal solution. The part of the simplex method that allowed the basic solution to move to that adjacent vertex was the pivoting operation. It can be shown that the pivoting operation could be used in the above problem to move the basic solution from the origin along a boundary line to an adjacent vertex which will be in the feasible region. The procedure is as follows:

Nonstandard Linear Programming Problems

1. Get all constraint inequalities (other than the ones that require the variables to be nonnegative) in the form

a1x1 + a2x2 + . . . + anxn ≤ k, (k may be negative).

Then introduce slack variables and write the initial simplex tableau.

2. Go to the row which has a negative number in the constant column. (If thereʼs more than one such row, pick any one of them.)

3. Pick any negative number in that row that is to the left of the negative constant. (If thereʼs more than one negative number in the row, pick any one of them.) The column containing that entry will then be the pivot column. Divide each entry in the pivot column (except for the one in the last row) into the number that is in the constant column and the same row as the entry. The entry which gives the smallest positive ratio is the pivot element. Pivot about that entry.

4. Continue with the procedure until there are no negative numbers in the last column (with the possible exception of the entry in the last row and column). At this point the problem is a standard problem so the procedure of Section

Page 33: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

108 Chapter 3: Simplex Method

3.1 can take over. (Algebraically, the basic solution at this stage is a feasible solution. Geometrically, what has happened is the basic solution has moved to a vertex which is in the feasible region.)

Let’s now apply the above procedure to the initial simplex tableau (1). At the same time, look at the graph of the problem to see what’s happening geometrically.

x y u v P

⎝⎜⎛

⎪⎪⎪2 3 1 0 0

–2 1 0 1 0–3 –4 0 0 1 ⎠

⎟⎞12

–40

The only negative entry in the last column is –4 which is in the second row. The only entry in that row to the left of –4 is –2 which is in the first column. So the pivot column is the x column. Computing ratios gives

x y u v P ratios

⎝⎜⎜⎛

⎪⎪⎪⎪2 3 1 0 0

–2 1 0 1 0

–3 –4 0 0 1⎠⎟⎞12

–4 0

12/2 = 6

–4/–2 = 2

The pivot element is –2. (Just as in Section 3.1, notice that the ratios correspond to the intersection of the line y = 0 with the line u = 0 (for the ratio 6) and the line v = 0 (for the ratio 2). In this case, both points are in the feasible region, but –2 in the first column is chosen as the pivot element because the ratio 2 is less than the other ratio which is 6. Note that taking the smallest ratio moves the basic solution along the boundary line to the nearest vertex. In the case of a standard problem that guarantees that the solution stays in the feasible region. In the case of a nonstandard problem it at least gives a systematic way to tackle the vertices). Pivoting about the pivot element,

x y u v P

– 12 R2

⎝⎜⎛

⎪⎪⎪2 3 1 0 0

1 –1/2 0 –1/2 0–3 –4 0 0 1 ⎠

⎟⎞12

20

x y u v P

Page 34: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.2: Nonstandard Problems 109

R1 – 2R2

R3 + 3R2

⎝⎜⎛

⎪⎪⎪0 4 1 1 0

1 –1/2 0 –1/2 00 –11/2 0 –3/2 1 ⎠

⎟⎞8

26

At this stage, the basic solution is x = 2, y = 0, u = 8, v = 0 and P = 6. This solution is feasible since there are no negative entries in the last column. So the simplex tableau is now standard. (And, as you can see, the point (2,0) is in the feasible region). Continuing, using the procedure for standard simplex problems, x y u v P x y u v P

⎝⎜⎜⎛

⎪⎪⎪⎪0 4 1 1 0

1 –1/2 0 –1/2 00 –11/2 0 –3/2 1

⎠⎟⎞ 8

26

14 R1

⎝⎜⎛

⎪⎪⎪0 1 1/4 1/4 0

1 –1/2 0 –1/2 00 –11/2 0 –3/2 1 ⎠

⎟⎞2

26

x y u v P

R2 + 12 R1

R3 + 112 R1

⎝⎜⎜⎛

⎪⎪⎪⎪0 1 1/4 1/4 0

1 0 1/8 –3/8 00 0 11/8 –1/8 1

⎠⎟⎞ 2

317

x y u v P

4R1

⎝⎜⎛

⎪⎪⎪0 4 1 1 0

1 0 1/8 –3/8 00 0 11/8 –1/8 1 ⎠

⎟⎞8

317

x y u v P

Page 35: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

110 Chapter 3: Simplex Method

R2 + 38 R1

R3 + 18 R1

⎝⎜⎛

⎪⎪⎪0 4 1 1 0

1 3/2 1/2 0 00 1/2 3/2 0 1 ⎠

⎟⎞8

618

.

The solution is: x = 6, y = 0, u = 0, v = 8 and P = 18. Check it using the graphical method. Let’s do a few more examples to make sure you understand the technique and how to apply it. In problems where it’s possible, a graph will also be provided. It would be worthwhile for you to look at the graph as the simplex procedure is applied to see what’s happening geometrically. Example 3.6. Maximize P = 3x + y

subject to x + 2y ≥ 18 2x + y ≤ 21 x + y ≥ 10

x ≥ 0 y ≥ 0

Solution:

y

x

20

10 20

2x + y = 21 or v=0

(8,5) or u=0, v=0

x + 2y = 18 or u=0

(2,8) or u=0, w=0(0,10)

(0,21)

x + y = 10 or w = 0

Following the procedure outlined above, multiply the first and third inequalities by –1 to get them in the correct form. Introduce slack variables u, v, and w to get the following equalities:

– x – 2y + u = –18

Page 36: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.2: Nonstandard Problems 111

2x + y + v = 21 – x – y + w = –10.

The initial simplex tableau is

x y u v w P

⎝⎜⎛

⎪⎪⎪–1 –2 1 0 0 0

2 1 0 1 0 0–1 –1 0 0 1 0–3 –1 0 0 0 1

⎠⎟⎞–18

21–10

0

.

Going to step 2 in the procedure for nonstandard problems, either the first or third rows can be chosen. Suppose the first row is chosen. There are two negative entries in the first row and either may be picked. If the –1 is chosen then that means the first column is the pivot column. Computing ratios gives –18/–1 = 18, 21/2 = 10.5 and –10/–1 = 10. The smallest ratio is 10 so the pivot element is the entry in the third row and the first column. Pivoting about this entry,

x y u v w P ratios

⎝⎜⎜⎛

⎪⎪⎪⎪

–1 –2 1 0 0 02 1 0 1 0 0

–1 –1 0 0 1 0

–3 –1 0 0 0 1⎠⎟⎞–18

21 –10

0

–18/–1 = 1821/2 = 10.5

–10/–1 = 10

x y u v w P

–1R3

⎝⎜⎛

⎪⎪⎪–1 –2 1 0 0 0

2 1 0 1 0 01 1 0 0 –1 0–3 –1 0 0 0 1

⎠⎟⎞–18

21100

x y u v w P

R1 + R3R2 – 2R3

R4 + 3R3

⎝⎜⎛

⎪⎪⎪0 –1 1 0 –1 0

0 –1 0 1 2 01 1 0 0 –1 00 2 0 0 –3 1

⎠⎟⎞–8

11030

.

The basic solution corresponding to this tableau is x = 10, y = 0, u = –8, v = 1, w = 0 and P = 30. (What has the pivoting operation accomplished geometrically? At which vertex is the solution? Is it in the feasible region?) Since there’s still a negative number in the last column, the procedure is continued.

Page 37: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

112 Chapter 3: Simplex Method

There are two negative entries in the first row. Let’s pick the one in the y column. So the pivot column is the y column and computing ratios yields: –8/–1 = 8, 1/–1 = –1 and 10/1 = 10. The smallest positive ratio is 8 so the pivot element is the entry in the first row and second column. Pivoting about this entry,

x y u v w P x y u v w P

⎝⎜⎜⎛

⎪⎪⎪⎪

0 –1 1 0 –1 0

0 –1 0 1 2 01 1 0 0 –1 00 2 0 0 –3 1

⎠⎟⎞ –8

11030

–1R1

⎝⎜⎛

⎪⎪⎪0 1 –1 0 1 0

0 –1 0 1 2 01 1 0 0 –1 00 2 0 0 –3 1

⎠⎟⎞8

11030

x y u v w P R2 + R1R3 – R1

R4 – 2R1

⎝⎜⎛

⎪⎪⎪0 1 –1 0 1 0

0 0 –1 1 3 01 0 1 0 –2 00 0 2 0 –5 1

⎠⎟⎞8

92

14

.

The basic solution is x = 2, y = 8, u = 0, v = 9, w = 0 and P = 14. Geometrically, the pivoting operation has moved the basic solution along the boundary line w = 0 to the vertex (2, 8) which is the intersection of the boundary lines w = 0 and u = 0. Now as can be seen from the graph the basic solution is feasible but that can also be determined from the simplex tableau since there are no negative entries in the last column. So the problem is now standard, but of course it’s not finished since the solution isn’t optimal—there’s have a negative number in the bottom row. Continuing with the procedure, x y u v w P x y u v w P

⎝⎜⎜⎛

⎪⎪⎪⎪

0 1 –1 0 1 0

0 0 –1 1 3 0

1 0 1 0 –2 00 0 2 0 –5 1

⎠⎟⎞8

9 214

13 R2

⎝⎜⎛

⎪⎪⎪0 1 –1 0 1 0

0 0 –1/3 1/3 1 01 0 1 0 –2 00 0 2 0 –5 1

⎠⎟⎞8

32

14

x y u v w P

Page 38: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.2: Nonstandard Problems 113

R1 – R2R3 + 2R2

R4 + 5R2

⎝⎜⎛

⎪⎪⎪0 1 –2/3 –1/3 0 0

0 0 –1/3 1/3 1 01 0 1/3 2/3 0 00 0 1/3 5/3 0 1

⎠⎟⎞5

38

29

.

The optimal solution is x = 8, y = 5, u = 0, v = 0, w = 3 and P = 29.

Example 3.7. Maximize P = 4x + y + 2z

subject to 2x + 4y + z ≤ 16 2x + 5y – z ≥ 10

x ≥ 0, y ≥ 0, z ≥ 0 Solution: The initial simplex tableau is:

x y z u v P

⎝⎜⎛

⎪⎪⎪2 4 1 1 0 0

–2 –5 1 0 1 0–4 –1 –2 0 0 1 ⎠

⎟⎞16

–100

There is one negative number in the last column and that’s in the second row. Either the first or second entry in that row can be picked. Choosing the first entry means the first column is the pivot column and after computing ratios, it’s clear that the pivot element is –2, the entry in the second row and first column. Pivoting on that element, x y z u v P x y z u v P

⎝⎜⎜⎛

⎪⎪⎪⎪2 4 1 1 0 0

–2 –5 1 0 1 0

–4 –1 –2 0 0 1⎠⎟⎞16

–10 0

– 12 R2

⎝⎜⎛

⎪⎪⎪2 4 1 1 0 0

1 5/2 –1/2 0 –1/2 0–4 –1 –2 0 0 1 ⎠

⎟⎞16

50

x y z u v P

Page 39: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

114 Chapter 3: Simplex Method

R1 – 2R2

R3 + 4R2

⎝⎜⎜⎛

⎪⎪⎪⎪0 –1 2 1 1 0

1 5/2 –1/2 0 –1/2 00 9 –4 0 –2 1

⎠⎟⎞ 6

520

.

This is a standard simplex tableau so, proceeding as usual, the final simplex tableau becomes:

x y z u v P 12 R1

⎝⎜⎛

⎪⎪⎪0 –1/2 1 1/2 1/2 0

1 5/2 –1/2 0 –1/2 00 9 –4 0 –2 1 ⎠

⎟⎞3

520

x y z u v P

R2 + 12 R1

R3 + 4R1

⎝⎜⎛

⎪⎪⎪0 –1/2 1 1/2 1/2 0

1 9/4 0 1/4 –1/4 00 7 0 2 0 1 ⎠

⎟⎞3

13/232

The optimal solution is x = 13/2, y = 0, z = 3, u = 0, v = 0 and P = 32.

Example 3.8. Minimize C = 2x – 3y

subject to x + y ≤ 6

–x + 2y ≥ 6 x ≥ 0 y ≥ 0

Solution: To solve this problem, it’s necessary to use the technique employed in Example 3.5 as well as the method used in the other examples. Thus, the following problem will be solved:

Maximize –C = –2x + 3y subject to

Page 40: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.2: Nonstandard Problems 115

x + y ≤ 6 x – 2y ≤ –6 x ≥ 0, y ≥ 0

Writing the initial simplex tableau and solving gives:

x y u v –C x y u v –C

⎝⎜⎜⎛

⎪⎪⎪⎪1 1 1 0 0

1 –2 0 1 0

2 –3 0 0 1⎠⎟⎞6

–6 0

– 12 R2

⎝⎜⎛

⎪⎪⎪1 1 1 0 0

–1/2 1 0 –1/2 02 –3 0 0 1 ⎠

⎟⎞6

30

x y u v –C R1 – R2

R3 + 3R2

⎝⎜⎜⎛

⎪⎪⎪⎪3/2 0 1 1/2 0

–1/2 1 0 –1/2 01/2 0 0 –3/2 1

⎠⎟⎞ 3

39

At this stage the basic solution is x = 0, y = 3, u = 3, v = 0 and C = –9. The solution is feasible but not optimal . Continuing, x y u v –C x y u v –C

2R1

⎝⎜⎛

⎪⎪⎪3 0 2 1 0

–1/2 1 0 –1/2 01/2 0 0 –3/2 1 ⎠

⎟⎞6

39

R2 + 12 R1

R3 + 32 R1

⎝⎜⎛

⎪⎪⎪3 0 2 1 0

1 1 1 0 05 0 3 0 1 ⎠

⎟⎞6

618

.

The basic (and also optimal) solution for this problem is x = 0, y = 6, u =0, v = 6 and C = –18. Example 3.9. Minimize C = 6x + 4y

subject to 6x + y ≥ 60 2x + y ≥ 40

Page 41: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

116 Chapter 3: Simplex Method

x + y ≥ 30 x ≥ 0 y ≥ 0

Solution:

x y u v w –C x y u v w –C

⎝⎜⎜⎛

⎪⎪⎪⎪

–6 –1 1 0 0 0–2 –1 0 1 0 0

–1 –1 0 0 1 0

6 4 0 0 0 1⎠⎟⎞–60

–40 –30

0

–1R3

⎝⎜⎛

⎪⎪⎪–6 –1 1 0 0 0

–2 –1 0 1 0 01 1 0 0 –1 06 4 0 0 0 1

⎠⎟⎞–60

–40300

x y u v w –C

R1 + R3R2 + R3

R4 – 4R3

⎝⎜⎜⎛

⎪⎪⎪⎪

–5 0 1 0 –1 0

–1 0 0 1 –1 01 1 0 0 –1 02 0 0 0 4 1

⎠⎟⎞ –30

–1030

–120

At this stage, the basic solution is x = 0, y = 30, u = –30, v = –10, w = 0 and C = 120. The solution is not feasible. Choosing a new pivot element in the matrix above and continuing,

x y u v w –C

– 15 R1

⎝⎜⎛

⎪⎪⎪1 0 –1/5 0 1/5 0

–1 0 0 1 –1 01 1 0 0 –1 02 0 0 0 4 1

⎠⎟⎞6

–1030

–120

x y u v w –C

Page 42: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.2: Nonstandard Problems 117

R2 + R1R3 – R1

R4 – 2R1

⎝⎜⎜⎛

⎪⎪⎪⎪

1 0 –1/5 0 1/5 0

0 0 –1/5 1 –4/5 0

0 1 1/5 0 –6/5 00 0 2/5 0 18/5 1

⎠⎟⎞6

–4 24

–132

x y u v w –C

–5R2

⎝⎜⎛

⎪⎪⎪1 0 –1/5 0 1/5 0

0 0 1 –5 4 00 1 1/5 0 –6/5 00 0 2/5 0 18/5 1

⎠⎟⎞6

2024

–132

x y u v w –C

R1 + 15 R2

R3 – 15 R2

R4 – 25 R2

⎝⎜⎛

⎪⎪⎪1 0 0 –1 1 0

0 0 1 –5 4 00 1 0 1 –2 00 0 0 2 2 1

⎠⎟⎞10

2020

–140

.

The solution to the problem is: x = 10, y = 20, u = 20, v = 0, w = 0 and C = 140. While this procedure allows nonstandard problems to be solved using the simplex method it is subject to the same difficulties mentioned in Section 3.1. Again, the feasible region may be unbounded so the objective function may not have a maximum (minimum) on the region. Or the feasible region may be empty but in either case, the procedure will break down at some point. Also, a problem may be degenerate, i.e., a zero occurs in the top part of the last column at some point during the simplex procedure. As was mentioned in Section 3.1, the procedure can usually be carried out, although occasionally cycling may occur.

Page 43: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

118 Chapter 3: Simplex Method

Problems Use the simplex method to solve Exercises 1-12. 1. Minimize C = –2x – y 2. Minimize C = –2x – 3y subject to subject to x + 2y ≤ 30 2x + y ≤ 10 3x + y ≤ 30 2x + 3y ≤ 18 x ≥ 0, y ≥ 0 x ≥ 0, y ≥ 0 3. Maximize P = 2x + y 4. Maximize P = 2x + y subject to subject to 6x + 3y ≤ 1200 x + 2y ≤ 30 .75x + y ≤ 250 3x + y ≤ 30 y ≥ 100 x – y ≥ 1 x ≥ 0, y ≥ 0 x ≥ 0, y ≥ 0 5. Minimize C = –2x – 3y – 4z 6. Maximize P = 5x + 7y subject to subject to x + y + 2z ≤ 30 x + y ≥ 2 3x + 5y + 2z ≤ 40 2x + 3y ≤ 12 5y + 2z ≤ 10 3x + 2y ≤ 14 x ≥ 0, y ≥ 0, z ≥ 0 x ≥ 0, y ≥ 0 7. Maximize P = 5x + 7y 8. Maximize P = x + 2y subject to subject to x + y ≥ 1 2x + y ≤ 8 2x + 3y ≤ 6 4x + 5y ≥ 20 x ≥ 0, y ≥ 0 x ≥ 0, y ≥ 0 9. Maximize P = 5x + 4y 10. Maximize P = x + 3y + 5z subject to subject to x + y ≥ 2 4x + y ≤ 2 x + y ≤ 8 z ≤ x 2x + y ≤ 10 y ≤ 1 x ≥ 0, y ≥ 0 z ≤ 3 x ≥ 0, y ≥ 0, z ≥ 0 11. Minimize C = 2x + 3y + 5z 12. Maximize P = 3x + 4y + 2z subject to subject to x – y + z ≥ 0 2x – y + z ≥ 10 x + y + z ≥ 24 2x + y + z ≤ 26 2x – z ≤ 0 x + 2y + 2z ≤ 61 x + y + z ≥ 16 x ≥ 0, y ≥ 0, z ≥ 0 x ≥ 0, y ≥ 0, z ≥ 0

Page 44: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.2: Nonstandard Problems 119

In Exercises 13-15, apply the simplex method to the problem. In each problem, the method will break down at some point. In problems where it is possible, sketch the feasible region and explain what is happening. 13. Maximize P = 3x + 2y 14. Maximize P = 5x + 10y subject to subject to –x + 2y ≤ 2 x + y ≤ 3 x + y ≥ 4 2x + 3y ≥ 12 x ≥ 0, y ≥ 0 x ≥ 0, y ≥ 0 15. Maximize P = 2x – 3y + 4z + q subject to 2x + 3y – 7z + 8q ≤ 0 6x – 2y + 2z + 6q ≤ 20 –x – 5y – 9z + 6q ≤ 2 x ≥ 0, y ≥ 0, z ≥ 0, q ≥ 0 16. A dietitian wants to design a breakfast menu for certain hospital patients. The menu

is to include two items X and Y. Suppose that each ounce of X provides 2 units of vitamin C and 2 units of iron and each ounce of Y provides 1 unit of vitamin C and 2 units of iron. Suppose the cost of X is 4¢/ounce and the cost of Y is 3¢/ounce. If the breakfast menu must provide at least 8 units of vitamin C and 10 units of iron, how many ounces of each item should be provided in order to meet the iron and vitamin C requirements for the least cost? What will this breakfast cost?

17. Sharon Byrd wants to invest no more than $5000 in two stocks, A and B. Stock A is

considered speculative and stock B is considered conservative. She wants to invest no more than $4000 in stock B and at least $600 in stock A. The average return is 10% for stock A (if the market doesn't take a nose dive) and 8% in stock B. To protect herself in case the market goes down sharply, she decides her investment in stock B should be at least 1/3 her investment in stock A. How much should she invest in each stock to maximize her return on her investments?

18. Azalea State Creamery makes ice cream bars and ice cream sandwiches. It can make

no more than a combined total of 4000 boxes of bars and sandwiches each day but it has a market for up to 2400 boxes of bars and up to 2000 boxes of sandwiches. It can sell no more than three times as many bars as sandwiches. If the company makes 6¢ on each box of bars and 5¢ on each box of sandwiches, find the number of boxes of bars and sandwiches that should be made to maximize the profit. Find the profit per day using this strategy.

19. O’David’s is trying to maximize profit for Big O’s, Half Pounders and Turkey

O’Nuggets. They have determined they make a profit of 60¢ on each Big O, 50¢ on each Half Pounder and $1 on each Turkey O’Nugget. Each product takes cooking time and assembly time. Big O’s use 4 minutes of cooking time, Half Pounders use 3 minutes of cooking time and Turkey O’Nuggets use 5 minutes of cooking time.

Page 45: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

120 Chapter 3: Simplex Method

Big O’s use 2 minutes of assembly time while Half Pounders and O’Nuggets each use 1 minute of assembly time. There are 178 minutes of cooking time and 120 minutes of assembly time available at the lunch hour. They know from previous experience that they must produce a minimum of 20 Big O’s and 26 Half Pounders. How many of each type should they produce to maximize profit?

20. A kite manufacturer makes bow kites, box kites and stunt kites. Bow kites require 2

square meters of fabric and 2 meters of kite sticks, box kites require 2 square meters of fabric and 8 meters of kite sticks and stunt kites require 6 square meters of fabric and 12 meters of kite sticks. The manufacturer has 284 square meters of fabric and 440 meters of kite sticks available. She also knows from past experience that she should make at least 100 bow kites and no more than 30 box kites, and no more than 10 stunt kites. If the profit is $1 for each bow kite, $3 for each box kite and $5 for each stunt kite, how many of each type should she make to maximize her profit?

21. Karen wants to make a granola mixture consisting of rolled oats, nuts and dried

fruits. She wants the mixture to contain at least 3 cups of oats, at least 1 cup of nuts and at least 1/2 cup of dried fruits. The total mixture should consist of no more than 7 cups and the combined number of cups of fruit and nuts should be at least as many as the number of cups of oats. If the rolled oats cost 10¢ per cup, the nuts cost 50¢ per cup and the dried fruits cost 80¢ per cup, how many cups of each type of ingredient should she use in her granola mixture to minimize her cost?

22. A family building an earth-sheltered house needs at least 200 cubic yards of fill dirt

and at least 50 cubic yards of top soil. Supplier A can provide at most 100 cubic yards of fill dirt and at most a combined total of 125 cubic yards of the two types of dirt. Supplier B can provide at most 30 cubic yards of top soil and at most a combined total of 150 cubic yards of the two types of dirt. The cost per cubic yard of each type of dirt from each supplier is given below. Find the amount of each type of dirt that should be provided by each supplier in order to minimize the cost.

Fill dirt Topsoil

A

B

$4 per cu.yd. $25 per cu. yd.

$5 per cu.yd. $20 per cu.yd.

23. A grocery store stocks 4 different sizes of tomato sauce; A, B, C, and D. The profit

per case of each size is $1, $1.50, $1.50, and $2. The amounts of storage space per case of each size is 3, 6, 4, and 12 cubic feet respectively. The amounts of time required for unpacking and shelving a case of each size are 2, 3, 4, and 4 minutes respectively. From past experience the store buys at least 2 times as much of size A as the other three sizes combined. Assume the store gets in a shipment weekly and has 4800 cubic feet of storage and 3600 minutes of unpacking and shelving time

Page 46: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.2: Nonstandard Problems 121

available per week. How many cases of each size of tomato sauce should be purchased each week in order to maximize profit?

24. Pulverizer Gravel Company has a quarry on Duraleigh Road and one on HW 1. The

company needs to provide gravel to 3 locations in Raleigh; one on Avent Ferry Road, one on Six Forks Road and one on Downtown Boulevard. The Duraleigh quarry can provide at most 600 tons/day and the one on HW 1 can provide at most 800 tons/day. The Avent Ferry Road, the Six Forks Road and the Downtown Boulevard locations require 400 tons, 400 tons and 500 tons of gravel daily respectively. The costs for gravel delivered from the Duraleigh quarry to Avent Ferry Road, Six Forks Road and Downtown Boulevard are $8, $7 and $9 per ton respectively while the costs for gravel delivered from the HW 1 quarry to the three locations are $11, $10 and $8 per ton respectively. What trucking schedule will enable the company to meet the demand for gravel and at the same time keep the cost of delivering the gravel to a minimum? (Hint: Let x1 = the number of tons of gravel delivered from the Duraleigh quarry to Avent Ferry Road. Then there are 5 other variables in this problem.)

3.3 The Dual Problem In this section another way of solving linear programming problems is going to be considered. This method is based on the fact that every linear programming problem has another linear programming problem associated with it which is known as its dual problem. There is a theorem (which will be stated more completely later) that says that if either the original problem or the dual problem has an optimal solution then the other problem has an optimal solution and the two values are the same. That means either of the two problems can be solved to find the optimal solution. Let’s see how to set up the dual problem for a specific linear programming problem—the general procedure will be stated later.

Maximize P = 3x + 4y subject to

2x + 2y ≤ 7 4x + 3y ≤ 12

x ≥ 0 y ≥ 0

When the original problem (which is called the primal problem) is a maximization

Page 47: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

122 Chapter 3: Simplex Method

problem, the dual is a minimization problem. The objective function and the constraint equations for the dual are found in the following way:

1. Write the primal problem in matrix form as

x y

⎝⎜⎜⎛

⎪⎪⎪⎪2 2

4 33 4 ⎠

⎟⎟⎞7

120

where each nontrivial constraint equation is a row of the matrix and the

coefficients of the objective function occupy the last row. Notice that this is not the initial simplex tableau for the primal problem because the slack variables have not been introduced yet .

2. (a) Label the rows of the above matrix (except the last row) with the variables u

and v (the same ones which have been used for slack variables). (b) Form a new matrix by switching the rows and columns of the old matrix.

(This is called taking the transpose of the matrix). So for this problem: x y u v

(a) uv

⎝⎜⎜⎛

⎪⎪⎪⎪2 2

4 33 4 ⎠

⎟⎟⎞7

120

(b) xy

⎝⎜⎜⎛

⎪⎪⎪⎪2 4

2 37 12 ⎠

⎟⎟⎞3

40

3. Now use the rows of the (b) matrix to write new constraint inequalities, changing

the “≤” to “≥” in each case. Also, state a new objective function, changing “maximize” to “minimize”:

2u + 4v ≥ 3 (These are the new constraint inequalities.) 2u + 3v ≥ 4

Minimize C = 7u + 12v (This is the new objective function.) The formal statement of the dual problem is

Minimize C = 7u + 12v subject to

2u + 4v ≥ 3 2u + 3v ≥ 4 u ≥ 0, v ≥ 0

Note that the first rows of the (b) matrix in step 2 produced the constraint inequalities and the last row gave the objective function. To set up the dual problem for any linear programming problem, use the following procedure:

Page 48: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.3: The Dual Problem 123

Setting up the dual problem

1. If the primal problem is a maximization problem, write all the nontrivial constraint inequalities using ≤. If the primal problem is a minimization problem, write all the nontrivial constraint inequalities using ≥. (You may end up with negative constants on the right side.)

2. (a) Write the coefficients of the variables in the constraint inequalities and objective function in matrix form, with the coefficients of the objective function in the last row.

(b) Label the rows (except for the last row) of the matrix with new variables (generally u, v, w etc.).

3. Take the transpose of the matrix. 4. Using the matrix found in step 3, write the new constraint

inequalities from the first rows of the matrix. If the primal problem was a maximum problem the new inequalities will be ≥ inequalities; if the primal problem was a minimum problem the new inequalities will be ≤ inequalities. The final row of the matrix gives the objective function: If the primal problem was a maximization problem, then the new objective function is to be minimized; if the primal problem was a minimization problem then the new objective function is to be maximized.

Example 3.10. State the dual of

Minimize C = 11x + 10y subject to

x + 2y ≥ 6 3x + 2y ≥ 14

x ≥ 0 y ≥ 0

Solution: 1. The constraint inequalities are already in ≥ form.

2. Putting the data in matrix form and labeling the rows yields

x y

Page 49: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

124 Chapter 3: Simplex Method

uv ⎝⎜⎜⎛

⎪⎪⎪⎪1 2

3 211 10 ⎠

⎟⎟⎞6

140

3. Transposing the matrix,

u v

⎝⎜⎜⎛

⎪⎪⎪⎪1 3

2 26 14 ⎠

⎟⎟⎞11

100

4. The dual problem is

Maximize P = 6u + 14v subject to

u + 3v ≤ 11 2u + 2v ≤ 10

u ≥ 0 v ≥ 0

If each of these problems is solved using the geometric method, the results are: Primal Problem Dual Problem

y

x

2

4

2 4

6

v

u

2

4

2 4 6

6

8

(4,1)

(2,3)

(0,7)

(6,0)

(0,11/3)

(5,0)

(0,0)

C(0, 7) = 70 P(0, 0) = 0 C(4, 1) = 54 P(0, 11/3) = 154/3 C(6, 0) = 66 P(2, 3) = 54 P(5, 0) = 30

Even though the feasible regions look very different, notice that the optimal value of the objective function is the same (54) although the optimal value is obtained at a different vertex in each problem. If each of the problems is solved using the simplex method the final tableaux are (using x and y as slack variables in the dual problem):

Primal Problem Dual Problem

Page 50: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.3: The Dual Problem 125

x y u v –C u v x y P

⎝⎜⎛

⎪⎪⎪0 1 –3/4 1/4 0

1 0 1/2 –1/2 00 0 2 3 1 ⎠

⎟⎞1

4–54

⎝⎜⎛

⎪⎪⎪0 1 1/2 –1/4 0

1 0 –1/2 3/4 00 0 4 1 1 ⎠

⎟⎞3

254

In the first tableau, the optimal solution is x = 4, y = 1, u = 0, v = 0 and – C = –54 or C = 54 whereas the solution of the dual problem is u = 2, v = 3, x = 0, y = 0, and P = 54. However, what’s really significant about this approach is that the solution to the original problem can also be found in the final simplex tableau for the dual problem. If you look at the tableau for the dual problem and look at the entries at the bottom of the column for each variable you get u = 0, v = 0, x = 4, y = 1. P is obtained in the ordinary way so P = 54. But that’s the solution for the primal problem! (It’s also interesting to note that the solution of the dual problem could be found in the simplex tableau for the primal problem by looking at the bottom of the columns in its simplex tableau. That gives x = 0, y = 0, u = 2, and v = 3 which is what was obtained from the simplex tableau for the dual problem). The solution to both the primal problem and the dual problem can always be determined by looking at the final simplex tableau for either of the problems—you just have to keep track of which tableau you’re working with so you know whether you’re supposed to read the solution by looking at the ends of the rows or the bottoms of the columns. (That’s another good reason for labeling the columns with the proper variables). The formal statement of the theorem is:

Theorem: A primal problem has an optimal solution if and only

if its corresponding dual problem has an optimal solution. If an optimal solution exists then the objective functions for both the primal problem and the dual problem have the same optimal value. If either of the problems is solved by the simplex method then the solution for the other problem is found by looking at the bottom of the columns in the final simplex tableau.

Of course, you might well ask, “Why bother?” The methods of the first two sections can be used to solve these linear programming problems and there doesn’t seem to be much need to look at the dual problem. However, there are a couple of good reasons for considering the dual problem. First, if you’re dealing with a minimization problem with all the constraint inequalities written as “≥ k”, where k is a positive number, then you’ll need to use the methods of Section 3.2 to solve the problem directly, and those methods generally involve more steps and computations than the ones for a standard problem. But the dual problem for this sort of minimization problem is a standard problem, and thus is generally easier to deal with computationally.

Page 51: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

126 Chapter 3: Simplex Method

Even more important, there is an economic interpretation that can be made of the dual problem. Let’s consider a simple example, that of the potter, which was discussed in Chapter 2 and in the first section of this chapter. The problem was to maximize profit in producing cups and plates, where

x = number of cups produced y = number of plates produced

and it was necessary to maximize P = 2x + 1.5y subject to

.75x + y ≤ 250 6x + 3y ≤ 1200

x ≥ 0 y ≥ 0

The data for the problem can be arranged in a table as follows:

cups plates total available lbs. of clay

min. of labor

⎝⎜⎛

⎪⎪⎪3/4 1

6 32 1.5 ⎠

⎟⎞250

1200

If the dual problem is formed, it is

Minimize C = 250u + 1200v subject to

.75u + 6v ≥ 2 u + 3v ≥ 1.5

The final simplex tableau for the primal problem was

x y u v P

⎝⎜⎛

⎪⎪⎪0 1 8/5 –1/5 0

1 0 –4/5 4/15 00 0 4/5 7/30 1 ⎠

⎟⎞160

120480

Now letting u be the price/lb. of clay for which she could sell her clay and v be the amount of money she could earn per minute if she got a job doing something else, then from looking at the last row of the final simplex tableau for the primal problem, the solution of the dual problem is u = $4/5 and v = $7/30. That says that if she decides to get out of the potting business, then she needs to be getting at least $4/5 profit per lb. of clay for her material and $7/30 per minute for her labor in order to make as much profit as she does by doing her potting. In other words, if she could get $.80/lb. profit for her clay and $14/hr. for her labor, she could make as much profit as she can from making 120 cups and 160 plates. (That assumes she sells all 250 lbs. of clay and can work for at least 20 hours). Moreover, if she increased the number of lbs. of clay by 1, she increases her profits by $.80. Similarly, if she increases the number of hours she works by 1, she increases her profit by $14. If she increases the number of hours she works by k hours, she can increase her profit by $14k. (There is a limit to how big k can be for this problem

Page 52: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.3: The Dual Problem 127

but that’s something that won’t be discussed in this text). This section is concluded with one more example on finding the dual problem. Example 3.11. Minimize C = 2x –3y

subject to x + y ≤ 6

–x + 2y ≥ 6 x ≥ 0 y ≥ 0

Solution: x y u v uv

⎝⎜⎛

⎪⎪⎪–1 –1

–1 22 –3 ⎠

⎟⎞–6

60

⎝⎜⎛

⎪⎪⎪–1 –1

–1 2–6 6 ⎠

⎟⎞2

–30

The dual problem is:

Maximize P = –6u + 6v subject to:

–u – v ≤ 2 –u + 2v ≤ –3

u ≥ 0 v ≥ 0

The initial simplex tableau for the primal problem is:

x y u v –C

⎝⎜⎛

⎪⎪⎪1 1 1 0 0

1 –2 0 1 02 –3 0 0 1 ⎠

⎟⎞6

–60

The initial simplex tableau for the dual problem is:

u v x y P

⎝⎜⎛

⎪⎪⎪–1 –1 1 0 0

–1 2 0 1 06 –6 0 0 1 ⎠

⎟⎞2

–30

Since both of the problems are nonstandard, it doesn’t make much difference which problem is solved—the computations involved in solving each of them are roughly the same. In any case, the answer obtained is: x = 0, y = 6 and C = –18 (for the primal problem) and u = 3, v = 0 and P = –18 (for the dual problem). You should verify these answers.

Page 53: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

128 Chapter 3: Simplex Method

Problems In Exercises 1-6, determine the dual problem of the given linear programming problem. 1. Maximize P = 3x + 5y 2. Minimize C = 4x + 3y subject to subject to x + 4y ≤ 10 3x + y ≥ 12 3x + 2y ≤ 20 x + y ≥ 10 x ≥ 0, y ≥ 0 2x + 3y ≥ 24 x ≥ 0, y ≥ 0 3. Minimize C = x + 3y + 5z 4. Maximize P = 3x – 4y subject to subject to x + y + z ≥ 2 2x + y ≤ 7 2x + z ≥ 1 x – 2y ≤ 1 x ≥ 0, y ≥ 0, z ≥ 0 x + 4y ≥ 4 –x + 2y ≤ 4 x ≥ 0, y ≥ 0 5. Maximize P = x + 3y + 5z 6. Minimize C = 2x + 3y + 5z subject to subject to 4x + y ≤ 2 x – y + z ≥ 0 x – z ≥ 0 x + y + z ≤ 24 y ≤ 1 2x ≤ z z ≤ 3 x + y + z ≥ 16 x ≥ 0, y ≥ 0, z ≥ 0 x ≥ 0, y ≥ 0, z ≥ 0 7. The final simplex tableau for the linear programming problem of Exercise 1 appears

below. State the solution of the primal problem and the dual problem. x y u v P

⎝⎜⎛

⎪⎪⎪0 1 3/10 –1/10 0

1 0 –1/5 2/5 00 0 9/10 7/10 1 ⎠

⎟⎞1

623

8. The final simplex tableau for the linear programming problem of Exercise 4 appears

below. State the solution of the primal problem and the dual problem. x y u v w t P

⎝⎜⎜⎛

⎪⎪⎪⎪0 0 6/5 –7/5 1 0 0

1 0 2/5 1/5 0 0 00 1 1/5 –2/5 0 0 00 0 0 1 0 1 00 0 2/5 11/15 0 0 1

⎠⎟⎟⎞3

3155

9. The final simplex tableau for the dual of the linear programming problem of

Page 54: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.3: The Dual Problem 129

Exercise 3 appears below. State the solution of the primal problem and the dual problem.

u v x y z P

⎝⎜⎛

⎪⎪⎪1 2 1 0 0 0

0 –2 –1 1 0 00 –1 0 0 1 00 3 2 0 0 1

⎠⎟⎞1

242

10. The final simplex tableau for the dual of the linear programming problem of

Exercise 2 appears below. State the solution of the primal problem and the dual problem.

u v w x y P

⎝⎜⎛

⎪⎪⎪1 0 –1/2 1/2 –1/2 0

0 1 7/2 –1/2 3/2 00 0 5 1 9 1 ⎠

⎟⎞1/2

5/231

In Exercises 11-18, determine the dual problem. Then solve either the primal problem or the dual problem and state the solutions of both problems. 11. Minimize C = 2x + y 12. Minimize C = 8x + 24y subject to subject to 3x + 2y ≥ 6 x + y ≥ 3 x + 2y ≥ 4 x + 2y ≥ 4 x ≥ 0, y ≥ 0 x + 4y ≥ 5 x ≥ 0, y ≥ 0 13. Minimize C = 40x + 180y + 160z 14. Minimize C = 48x + 20y + 12z subject to subject to 2x + 3y + 2z ≥ 12 8x + 4y + 2z ≥ 20 x + 5y + 5z ≥ 10 2x + 3y + z ≥ 6 x + y + z ≥ 5 3x + z ≥ 8 x ≥ 0, y ≥ 0, z ≥ 0 x ≥ 0, y ≥ 0, z ≥ 0 15. Maximize P = 2x + 6y + z 16. Maximize P = 12x + 18y + 6z subject to subject to 4x + 2y + z ≤ 32 2x + y ≤ 4 2x + 4z ≤ 48 x + 2y + z ≤ 5 x + y ≤ 11 x ≥ 0, y ≥ 0, z ≥ 0 x ≥ 0, y ≥ 0, z ≥ 0 17. Maximize P = 5x + y + 2z 18. Maximize P = 2x – 8y + 8z subject to subject to 2x + 2y + 5z ≥ 5 x – 2y – 4z ≥ 7 x + y – 2z ≥ 4 x – 3y + z ≤ 6 2x + y + 3z ≤ 6 x ≥ 0, y ≥ 0, z ≥ 0 x ≥ 0, y ≥ 0, z ≥ 0

Page 55: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

130 Chapter 3: Simplex Method

In Exercises 19-24, find the dual of the linear programming problem and solve the dual problem. Then state the solution of the primal problem. 19. A dietitian wants to design a breakfast menu for certain hospital patients. The menu

is to include two items X and Y. Suppose that each ounce of X provides 2 units of vitamin C and 2 units of iron and each ounce of Y provides 1 unit of vitamin C and 2 units of iron. Suppose the cost of X is 4¢/ounce and the cost of Y is 3¢/ounce. If the breakfast menu must provide at least 8 units of vitamin C and 10 units of iron, how many ounces of each item should be provided in order to meet the iron and vitamin C requirements for the least cost? What will this breakfast cost?

20. A family building an earth-sheltered house needs at least 200 cubic yards of fill dirt

and at least 50 cubic yards of top soil. Supplier A can provide at most 100 cubic yards of fill dirt and at most a combined total of 125 cubic yards of the two types of dirt. Supplier B can provide at most 30 cubic yards of top soil and at most a combined total of 150 cubic yards of the two types of dirt. The cost per cubic yard of each type of dirt from each supplier is given below. Find the amount of each type of dirt that should be provided by each supplier in order to minimize the cost.

Fill dirt Topsoil

A

B

$4 per cu.yd. $25 per cu. yd.

$5 per cu.yd. $20 per cu.yd.

21. O’David’s is trying to maximize profit for Big O’s, Half Pounders and Turkey

O’Nuggets. They have determined they make a profit of 60¢ on each Big O, 50¢ on each Half Pounder and $1 on each Turkey O’Nugget. Each product takes cooking time and assembly time. Big O’s use 4 minutes of cooking time, Half Pounders use 3 minutes of cooking time and Turkey O’Nuggets use 5 minutes of cooking time. Big O’s use 2 minutes of assembly time while Half Pounders and O’Nuggets each use 1 minute of assembly time. There are 228 minutes of cooking time and 120 minutes of assembly time available at the lunch hour. They know from previous experience that they must produce a minimum of 20 Big O’s and 26 Half Pounders. How many of each type should they produce to maximize profit?

22. A bookbinding company has two binderies in two different cities. Each day

Bindery A can bind 10,000, 10,000, and 10,000 copies of hardback, quality paperback (same size and paper as the hard cover book) and standard paperback books respectively. Each day Bindery B can bind 10,000, 20,000 and 60,000 copies of hardback, quality paperback and standard paperback books respectively. To fill

Page 56: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

Section 3.3: The Dual Problem 131

an order the company wishes to bind at least 300,000, 400,000, and 600,000 copies of hard cover, quality paperback and standard paperback books respectively. If it costs $10,000 per day to operate Bindery A and $15,000 per day to operate Bindery B, determine how many days each bindery should be operated to meet the requirements of the order at minimum cost to the company.

23. A grocery store stocks 4 different sizes of tomato sauce; A, B, C, and D. The profit

per case of each size is $1, $1.50, $1.50, and $2. The amounts of storage space per case of each size is 3, 6, 4, and 12 cubic feet respectively. The amounts of time required for unpacking and shelving a case of each size are 2, 3, 4, and 4 minutes respectively. From past experience the store buys at least 2 times as much of size A as the other three sizes combined. Assume the store gets in a shipment weekly and has 4800 cubic feet of storage and 3600 minutes of unpacking and shelving time available per week. How many cases of each size of tomato sauce should be purchased each week in order to maximize profit?

Chapter 3 Review Problems 1. Maximize P = 5x + 3y 2. Maximize P = 3x + 5y + 2z subject to subject to 2x + y ≤ 6 x + 2y + 2z ≤ 8 3x + y ≤ 8 x + y + z ≤ 7 x + y ≤ 5 2x + 3y + 5z ≤ 25 x ≥ 0, y ≥ 0 x ≥ 0, y ≥ 0, z ≥ 0 3. Mama Murphy’s Pizza Parlor makes New York style pizza, Sicilian Pizza and

cannellonis using pizza dough. A New York style pizza requires 1 minute of the dough maker’s time, 3 minutes of the pizza maker’s time and 10 minutes in the oven and yields $.75 profit. Sicilian pizza requires 2 minutes of the dough maker’s time, 1 minute of the pizza maker’s time and 20 minutes in the oven and yields $1 profit. A cannelloni requires 1 minute of the dough maker’s time, 2 minutes of the pizza maker’s time and 20 minutes in the oven and yields $1 profit. If there are 180 minutes available to the dough maker, 300 minutes available to the pizza maker and 2400 minutes of oven time available, how many of each type of pizza should Mama Murphy make in order to maximize her profit?

4. Minimize C = –2x – y – 3z 5. Minimize C = 3x + 4y subject to subject to x + z ≤ 30 + y 3x + 7y ≥ 9 x + y ≤ 10 + z 3x + y ≥ 3

Page 57: Chapter 3: Simplex Method - Nc State University - ncsu.edulbpage/book/Chapter_3.pdf · Chapter 3: Simplex Method 3.1 Standard Problems In Chapter 2 you saw how to solve linear programming

132 Chapter 3: Simplex Method

y + z ≤ 20 + x x ≥ 0, y ≥ 0 x ≥ 0, y ≥ 0, z ≥ 0 6. Maximize P = 9x + 5y + 2z subject to x – y + 5z ≥ 12 x + 3y + 2z ≤ 9 x + 2y + 4z ≤ 15 x ≥ 0, y ≥ 0, z ≥ 0 7. Michigan Polar Products makes downhill and cross-country skis. A pair of downhill

skis requires 2 man-hours for cutting, 1 man-hour for shaping and 3 man-hours for finishing while a pair of cross-country skis requires 2 man-hours for cutting, 2 man-hours for shaping and 1 man-hour for finishing. Each day the company has available 140 man-hours for cutting, 120 man-hours for shaping and 150 man-hours for finishing. How many pairs of each type of ski should the company manufacture each day in order to maximize profit if a pair of downhill skis yields a profit of $10 and a pair of cross-country skis yields a profit of $8?

8. Tom decides to adopt a vegetarian diet consisting of fruits, grains and vegetables.

His minimum daily requirements are 14 units of protein, 16 units of carbohydrates, and 12 units of fiber. Suppose a serving of fruits can supply him with 1 unit of protein, 2 units of carbohydrates and 1 unit of fiber while a serving of grains provides 3 units of protein, 2 units of carbohydrates, and 3 units of fiber. A serving of vegetables provides 4 units of protein, 3 units of carbohydrates and 2 units of fiber. If fruit costs 30¢ per serving, grains cost 60¢ per serving and vegetables cost 70¢ per serving, how many servings of each type of food should he eat per day in order to satisfy his daily food requirements at minimum cost?