









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Linear programming simplex method solved questions with mothed
Typology: Exercises
1 / 16
This page cannot be seen from the preview
Don't miss anything!










For linear programming problems involving two variables, the graphical solution method introduced in Section 9.2 is convenient. However, for problems involving more than two variables or problems involving a large number of constraints, it is better to use solution methods that are adaptable to computers. One such method is called the simplex method, developed by George Dantzig in 1946. It provides us with a systematic way of examining the vertices of the feasible region to determine the optimal value of the objective function. We introduce this method with an example. Suppose we want to find the maximum value of where and subject to the following constraints.
Since the left-hand side of each inequality is less than or equal to the right-hand side, there must exist nonnegative numbers and that can be added to the left side of each equa- tion to produce the following system of linear equations.
The numbers and are called slack variables because they take up the “slack” in each inequality.
s 1 , s 2 s 3
2 x 1 1 5 x 2 1 s 1 1 s 2 1 s 3 5 90
2 x 1 1 5 x 2 1 s 1 1 s 2 1 s 3 5 27
2 x 1 1 5 x 2 1 s 1 1 s 2 1 s 3 5 11
s 1 , s 2 s 3
2 x 1 1 5 x 2 # 90
2 x 1 1 5 x 2 # 27
2 x 1 1 5 x 2 # 11
z 5 4 x 1 1 6 x 2 , x 1 $ 0 x 2 $ 0,
494 CHAPTER 9 LINEAR PROGRAMMING
A linear programming problem is in standard form if it seeks to maximize the objec- tive function subject to the constraints
where and After adding slack variables, the corresponding system of constraint equations is
where s (^) i $ 0.
am 1 x 1 1 am 2 x 2 1...^1 a (^) mn xn 1 s (^) m 5 bm
a 21 x 1 1 a 22 x 2 1...^1 a 2 nxn 1 s 2 5 b 2
a 11 x 1 1 a 12 x 2 1...^1 a 1 nxn 1 s 1 5 b 1
xi $ 0 bi $ 0.
am 1 x 1 1 am 2 x 2 1...^1 a (^) mn xn # bm
a 21 x 1 1 a 22 x 2 1...^1 a 2 nxn # b 2
a 11 x 1 1 a 12 x 2 1...^1 a 1 nxn # b 1
z 5 c 1 x 1 1 c 2 x 2 1...^1 cn xn
R E M A R K : Note that for a linear programming problem in standard form, the objective function is to be maximized, not minimized. (Minimization problems will be discussed in Sections 9.4 and 9.5.)
A basic solution of a linear programming problem in standard form is a solution of the constraint equations in which at most m variables are nonzero––the variables that are nonzero are called basic variables. A basic solution for which all variables are nonnegative is called a basic feasible solution.
The simplex method is carried out by performing elementary row operations on a matrix that we call the simplex tableau. This tableau consists of the augmented matrix corre- sponding to the constraint equations together with the coefficients of the objective function written in the form
In the tableau, it is customary to omit the coefficient of z. For instance, the simplex tableau for the linear programming problem
Objective function
is as follows. Basic x 1 x 2 s 1 s 2 s 3 b Variables 1 1 0 0 11 s 1 1 1 0 1 0 27 s 2 2 5 0 0 1 90 s 3 0 0 0 0 ↑ Current z–value
For this initial simplex tableau, the basic variables are and and the nonbasic variables (which have a value of zero) are and. Hence, from the two columns that are farthest to the right, we see that the current solution is
and
This solution is a basic feasible solution and is often written as
s x 1 , x 2 , s 1 , s 2 , s 3 d 5 s0, 0, 11, 27, 90d.
x 1 5 0, x 2 5 0, s 1 5 11, s 2 5 27, s 3 5 90.
x 1 x 2
s 1 , s 2 , s 3 ,
2 x 1 1 5 x 2 1 s 1 1 s 2 1 s 3 5 90
2 x 1 1 5 x 2 1 s 1 1 s 2 1 s 3 5 27
2 x 1 1 5 x 2 1 s 1 1 s 2 1 s 3 5 11
z 5 4 x 1 1 6 x 2
2 c 1 x 1 2 c 2 x 2 2...^2 cnxn 1 s 0 d s 1 1 s 0 d s 2 1...^1 s 0 d s (^) m 1 z 5 0.
s x 1 , x 2 ,... , xn , s 1 , s 2 ,... , s (^) m d
SECTION 9.3 THE SIMPLEX METHOD: MAXIMIZATION 495
} Constraints
Solution Note that the current solution corresponds to a z –value of 0. To improve this solution, we determine that is the entering variable, because is the smallest entry in the bottom row. Basic x 1 x 2 s 1 s 2 s 3 b Variables 1 1 0 0 11 s 1 1 1 0 1 0 27 s 2 2 5 0 0 1 90 s 3 0 0 0 0 ↑ Entering
To see why we choose as the entering variable, remember that Hence, it appears that a unit change in produces a change of 6 in z , whereas a unit change in produces a change of only 4 in z. To find the departing variable, we locate the ’s that have corresponding positive elements in the entering variables column and form the following ratios.
Here the smallest positive ratio is 11, so we choose as the departing variable. Basic x 1 x 2 s 1 s 2 s 3 b Variables 1 1 0 0 11 s 1 ← Departing 1 1 0 1 0 27 s 2 2 5 0 0 1 90 s 3 0 0 0 0 ↑ Entering Note that the pivot is the entry in the first row and second column. Now, we use Gauss- Jordan elimination to obtain the following improved solution. Before Pivoting After Pivoting
The new tableau now appears as follows.
3
3 4
4
s 1
b (^) i
x 2 x 1
x 2 z 5 4 x 1 1 6 x 2.
x 2
s x 1 5 0, x 2 5 0, s 1 5 11, s 2 5 27, s 3 5 90 d
SECTION 9.3 THE SIMPLEX METHOD: MAXIMIZATION 497
Basic x 1 x 2 s 1 s 2 s 3 b Variables 1 1 0 0 11 x 2 2 0 1 0 16 s 2 7 0 0 1 35 s 3 0 6 0 0 66
Note that has replaced in the basis column and the improved solution
has a z- value of
In Example 1 the improved solution is not yet optimal since the bottom row still has a negative entry. Thus, we can apply another iteration of the simplex method to further im- prove our solution as follows. We choose as the entering variable. Moreover, the small- est nonnegative ratio of and is 5, so is the departing variable. Gauss-Jordan elimination produces the following.
Thus, the new simplex tableau is as follows. Basic x 1 x 2 s 1 s 2 s 3 b Variables 0 1 0 16 x 2 0 0 1 6 s 2 1 0 0 5 x 1 0 0 0 116
In this tableau, there is still a negative entry in the bottom row. Thus, we choose as the entering variable and s 2 as the departing variable, as shown in the following tableau.
s 1
10 (^27) 8 7
1 (^27) 5 7
1 7
2 7
3
2 7 3 7 (^257) (^287)
1 7 (^227) 1 7 10 7
4
3
1 7 0
3 4
4
11 ys 21 d, 16y 2 5 8, 35 y 7 5 5 s 3
x 1
z 5 4 x 1 1 6 x 2 5 4 s 0 d 1 6 s 11 d 5 66.
s x 1 , x 2 , s 1 , s 2 , s 3 d 5 s0, 11, 0, 16, 35d
x 2 s 1
498 CHAPTER 9 LINEAR PROGRAMMING
Note that the basic feasible solution of an initial simplex tableau is
This solution is basic because at most m variables are nonzero (namely the slack variables). It is feasible because each variable is nonnegative. In the next two examples, we illustrate the use of the simplex method to solve a problem involving three decision variables.
E X A M P L E 2 The Simplex Method with Three Decision Variables
Use the simplex method to find the maximum value of Objective function subject to the constraints
where and
Solution Using the basic feasible solution
the initial simplex tableau for this problem is as follows. (Try checking these computations, and note the “tie” that occurs when choosing the first entering variable.)
s x 1 , x 2 , x 3 , s 1 , s 2 , s 3 d 5 s0, 0, 0, 10, 20, 5d
x 1 $ 0, x 2 $ 0, x 3 $ 0.
2 x 1 1 2 x 2 1 2 x 3 # 25
2 x 1 1 2 x 2 2 2 x 3 # 20
2 x 1 1 2 x 2 2 2 x 3 # 10
z 5 2 x 1 2 x 2 1 2 x 3
s x 1 , x 2 ,... , xn , s 1 , s 2 ,... , s (^) m d 5 s0, 0,... , 0, b 1 , b 2 ,... , bm d.
500 CHAPTER 9 LINEAR PROGRAMMING
To solve a linear programming problem in standard form, use the following steps.
b (^) i y aij.
Basic x 1 x 2 x 3 s 1 s 2 s 3 b Variables 2 1 0 1 0 0 10 s 1 1 2 0 1 0 20 s 2 0 1 2 0 0 1 5 s 3 ← Departing 1 0 0 0 0 ↑ Entering
Basic x 1 x 2 x 3 s 1 s 2 s 3 b Variables 2 1 0 1 0 0 10 s 1 ← Departing 1 3 0 0 1 1 25 s 2 0 1 0 0 x 3 2 0 0 0 1 5 ↑ Entering
Basic x 1 x 2 x 3 s 1 s 2 s 3 b Variables 1 0 0 0 5 x 1 0 0 1 1 20 s 2 0 1 0 0 x 3 0 3 0 1 0 1 15
This implies that the optimal solution is
and the maximum value of z is 15.
Occasionally, the constraints in a linear programming problem will include an equation. In such cases, we still add a “slack variable” called an artificial variable to form the ini- tial simplex tableau. Technically, this new variable is not a slack variable (because there is no slack to be taken). Once you have determined an optimal solution in such a problem, you should check to see that any equations given in the original constraints are satisfied. Example 3 illustrates such a case.
E X A M P L E 3 The Simplex Method with Three Decision Variables
Use the simplex method to find the maximum value of
z 5 3 x 1 1 2 x 2 1 x 3 Objective function
s x 1 , x 2 , x 3 , s 1 , s 2 , s 3 d 5 s5, 0, 52 , 0, 20, 0d
5 2
1 2
1 2
1 2
1 2
5 2
1 2
1 2
SECTION 9.3 THE SIMPLEX METHOD: MAXIMIZATION 501
E X A M P L E 4 A Business Application: Maximum Profit
A manufacturer produces three types of plastic fixtures. The time required for molding, trimming, and packaging is given in Table 9.1. (Times are given in hours per dozen fixtures.) TABLE 9.
Process Type A Type B Type C Total time available
Molding 1 2 12,
Trimming 1 4,
Packaging 2,
Profit $11 $16 $15 —
How many dozen of each type of fixture should be produced to obtain a maximum profit?
Solution Letting and represent the number of dozen units of Types A, B, and C, respec- tively, the objective function is given by Profit Moreover, using the information in the table, we construct the following constraints.
(We also assume that and ) Now, applying the simplex method with the basic feasible solution
we obtain the following tableaus. Basic x 1 x 2 x 3 s 1 s 2 s 3 b Variables 1 2 1 0 0 12,000 s 1 ← Departing 1 0 1 0 4,600 s 2 0 0 1 2,400 s 3 0 0 0 0 ↑ Entering
1 2
1 3
1 2
2 3
2 3
3 2
s x 1 , x 2 , x 3 , s 1 , s 2 , s 3 d 5 s0, 0, 0, 12,000, 4,600, 2,400d
x 1 $ 0, x 2 $ 0, x 3 $ 0.
1 2 x 1 1
1 3 x 2 1
1 2 x 3 #^ 12,
2 3 x 1 1
2 3 x 2 1
3 2 x 3 #^ 14,
2 3 x 1 1 2 x 2 1
3 2 x 3 #^ 12,
5 P 5 11 x 1 1 16 x 2 1 15 x 3.
x 1 , x 2 , x 3
1 2
1 3
1 2
2 3
2 3
3 2
SECTION 9.3 THE SIMPLEX METHOD: MAXIMIZATION 503
Basic x 1 x 2 x 3 s 1 s 2 s 3 b Variables 1 0 0 6,000 x 2 0 1 0 600 s 2 0 0 1 400 s 3 ← Departing 0 − 3 8 0 0 96, ↑ Entering Basic x 1 x 2 x 3 s 1 s 2 s 3 b Variables 0 1 0 5,400 x 2 0 0 1 200 s 2 ← Departing 1 0 0 3 1,200 x 1 0 0 0 9 99, ↑ Entering Basic x 1 x 2 x 3 s 1 s 2 s 3 b Variables 0 1 0 1 0 5,100 x 2 0 0 1 4 800 x 3 1 0 0 0 6 600 x 1 0 0 0 6 3 6 100, From this final simplex tableau, we see that the maximum profit is $100,200, and this is obtained by the following production levels. Type A: 600 dozen units Type B: 5,100 dozen units Type C: 800 dozen units
R E M A R K : In Example 4, note that the second simplex tableau contains a “tie” for the minimum entry in the bottom row. (Both the first and third entries in the bottom row are ) Although we chose the first column to represent the departing variable, we could have chosen the third column. Try reworking the problem with this choice to see that you obtain the same solution.
E X A M P L E 5 A Business Application: Media Selection
The advertising alternatives for a company include television, radio, and newspaper advertisements. The costs and estimates for audience coverage are given in Table 9.
13 (^22) 3 4
1 2
3 4
1 2
504 CHAPTER 9 LINEAR PROGRAMMING
Now, to this initial tableau, we apply the simplex method as follows. Basic x 1 x 2 x 3 s 1 s 2 s 3 s 4 b Variables 1 0 0 0 x 1 0 1 0 0 1 0 0 10 s 2 ← Departing 0 0 1 0 s 3 0 0 0 1 s 4 0 5,000 0 0 0 910, ↑ Entering Basic x 1 x 2 x 3 s 1 s 2 s 3 s 4 b Variables 1 0 0 0 x 1 0 1 0 0 1 0 0 10 x 2 0 0 1 0 s 3 ← Departing 0 0 0 1 s 4 0 0 5,000 10,000 0 0 1,010, ↑ Entering Basic x 1 x 2 x 3 s 1 s 2 s 3 s 4 b Variables 1 0 0 0 4 x 1 0 1 0 0 1 0 0 10 x 2 0 0 1 0 14 x 3 0 0 0 1 12 s 4 0 0 0 0 1,052, From this tableau, we see that the maximum weekly audience for an advertising budget of $18,200 is Maximum weekly audience and this occurs when and We sum up the results here.
Number of Media Advertisements Cost Audience Television 4 $ 8,000 400, Newspaper 10 $ 6,000 400, Radio 14 $ 4,200 252, Total 28 $18,200 1,052,
x 1 5 4, x 2 5 10, x 3 5 14.
z 5 1,052,
60, 23
272, 23
118, 23
20 23
14 23
1 23
449 (^210) 37 10
9 20
47 20
161 10
7 10
1 20
23 20
61 (^2 ) 3 10
1 20
3 20
819 10
9 20
47 20
37 10
91 10
1 20
23 (^2 ) 7 10
91 10
1 20
3 20
3 10
506 CHAPTER 9 LINEAR PROGRAMMING
SECTION 9.3 EXERCISES 507
In Exercises 1– 4, write the simplex tableau for the given linear pro- gramming problem. You do not need to solve the problem. (In each case the objective function is to be maximized.)
1. Objective function: 2. Objective function:
Constraints: Constraints:
3. Objective function: 4. Objective function:
Constraints: Constraints:
In Exercises 5–8, explain why the linear programming problem is not in standard form as given.
5. (Minimize) 6. (Maximize) Objective function: Objective function:
Constraints: Constraints:
7. (Maximize) 8. (Maximize) Objective function: Objective function:
Constraints: Constraints:
In Exercises 9–20, use the simplex method to solve the given linear programming problem. (In each case the objective function is to be maximized.)
9. Objective function: 10. Objective function:
Constraints: Constraints:
x 1 , x 2 $ 10 x 1 , x 2 $ 10
x 1 1 4 x 2 # 12 3 x 1 1 2 x 2 # 12
x 1 1 4 x 2 # 18 3 x 1 1 2 x 2 # 16
z 5 x 1 1 2 x 2 z 5 x 1 1 x 2
x 1 , x 2 , x 3 $ 0
2 x 1 1 x 2 1 3 x 3 # 0 x 1 , x 2 $ 0
2 x 1 1 x 2 2 2 x 3 $ 1 2 x 1 1 x 2 $ 6
2 x 1 1 x 2 1 3 x 3 # 5 x 1 1 x 2 $ 4
z 5 x 1 1 x 2 z 5 x 1 1 x 2
x 1 , x 2 $ 20
x 1 , x 2 $ 0 2 x 1 2 2 x 2 # 21
x 1 1 2 x 2 # 4 2 x 1 1 2 x 2 # 26
z 5 x 1 1 x 2 z 5 x 1 1 x 2
x 1 , x 2 , x 3 $ 10 x 1 , x 2 $ 20
x 1 1 2 x 2 1 x 3 # 18 2 x 1 1 3 x 2 # 20
x 1 1 2 x 2 1 x 3 # 12 2 x 1 2 3 x 2 # 26
z 5 2 x 1 1 3 x 2 1 4 x 3 z 5 6 x 1 2 9 x 2
2x 1 , x 2 $ 0 x 1 , x 2 $ 0
2 x 1 1 x 2 # 5 x 1 2 x 2 # 1
2 x 1 1 x 2 # 8 x 1 1 x 2 # 4
z 5 x 1 1 2 x 2 z 5 x 1 1 3 x 2
SECTION 9.3 q EXERCISES
11. Objective function: 12. Objective function:
Constraints: Constraints:
13. Objective function: 14. Objective function:
Constraints: Constraints:
15. Objective function: 16. Objective function:
Constraints: Constraints:
17. Objective function: 18. Objective function:
Constraints: Constraints:
19. Objective function:
Constraints:
20. Objective function:
Constraints:
x 1 , x 2 , x 3 , x 4 $ 70
2 x 1 1 3 x 2 1 2 x 3 1 6 x 4 # 72
2 x 1 1 3 x 2 1 2 x 3 1 5 x 4 # 50
2 x 1 1 3 x 2 1 3 x 3 1 4 x 4 # 60
z 5 x 1 1 2 x 2 1 x 3 2 x 4
x 1 , x 2 , x 3 , x 4 $ 40
x 1 1 3 x 2 1 7 x 3 1 x 4 # 42
x 1 1 2 x 2 1 3 x 3 1 x 4 # 24
z 5 x 1 1 2 x 2 2 x 4
x 1 , x 2 , x 3 $ 30 x 1 , x 2 , x 3 $ 50
2 x 1 1 2 x 2 1 3 x 3 # 32 2 x 1 1 x 2 1 6 x 3 # 54
2 x 1 1 2 x 2 1 3 x 3 # 25 2 x 1 1 x 2 1 3 x 3 # 75
2 x 1 1 2 x 2 2 3 x 3 # 40 2 x 1 1 x 2 1 3 x 3 # 59
z 5 x 1 2 x 2 1 x 3 z 5 2 x 1 1 x 2 1 3 x 3
x 1 , x 2 , x 3 , x 4 $ 0 x 1 , x 2 $ 40
2 x 1 1 4 x 2 1 5 x 3 1 2 x 4 # 8 3 x 1 1 4 x 2 # 48
2 x 1 1 6 x 2 1 4 x 3 1 5 x 4 # 3 3 x 1 1 2 x 2 # 28
8 x 1 1 3 x 2 1 4 x 3 1 5 x 4 # 7 3 x 1 1 2 x 2 # 60
z 5 3 x 1 1 4 x 2 1 x 3 1 7 x 4 z 5 x 1
x 1 , x 2 $ 40 x 1 , x 2 $ 10
3 x 1 1 7 x 2 # 42 2 x 1 2 3 x 2 # 12
3 x 1 1 7 x 2 # 10 2 x 1 1 3 x 2 # 15
z 5 4 x 1 1 5 x 2 z 5 x 1 1 2 x 2
x 1 , x 2 , x 3 $ 40
6 x 1 2 3 x 2 1 3 x 3 # 42 x 1 , x 2 , x 3 $ 0
2 x 1 1 3 x 2 2 3 x 3 # 42 2 x 1 1 2 x 3 # 5
2 x 1 2 4 x 2 1 3 x 3 # 42 2 x 1 1 2 x 2 # 8
z 5 5 x 1 1 2 x 2 1 8 x 3 z 5 x 1 2 x 2 1 2 x 3
SECTION 9.4 THE SIMPLEX METHOD: MINIMIZATION 509
32. The accounting firm in Exercise 31 raises its charge for an audit to $2500. What number of audits and tax returns will bring in a maximum revenue?
In the simplex method, it may happen that in selecting the departing variable all the calculated ratios are negative. This indicates an un- bounded solution. Demonstrate this in Exercises 33 and 34.
33. (Maximize) 34. (Maximize) Objective function: Objective function:
Constraints: Constraints:
If the simplex method terminates and one or more variables not in the final basis have bottom-row entries of zero, bringing these variables into the basis will determine other optimal solutions. Demonstrate this in Exercises 35 and 36.
x 1 , x 2 $ 0 x 1 , x 2 $ 50
2 x 1 1 2 x 2 # 4 22 x 1 1 x 2 # 50
2 x 1 2 3 x 2 # 1 2 x 1 1 x 2 # 20
z 5 x 1 1 2 x 2 z 5 x 1 1 3 x 2
35. (Maximize) 36. (Maximize) Objective function: Objective function:
Constraints: Constraints:
37. Use a computer to maximize the objective function
subject to the constraints
where
38. Use a computer to maximize the objective function
subject to the same set of constraints given in Exercise 37.
z 5 1.2 x 1 1 x 2 1 x 3 1 x 4
x 1 , x 2 , x 3 , x 4 $ 0.
0.5 x 1 1 0.7 x 2 1 01.2 x 3 1 0.4 x 4 # 80
1.2 x 1 1 0.7 x 2 1 0.83 x 3 1 1.2 x 4 # 96
1.2 x 1 1 0.7 x 2 1 0.83 x 3 1 0.5 x 4 # 65
z 5 2 x 1 1 7 x 2 1 6 x 3 1 4 x 4
x 1 , x 2 $ 10 x 1 , x 2 $ 30
5 x 1 1 2 x 2 # 10 2 x 1 1 3 x 2 # 35
3 x 1 1 5 x 2 # 15 2 x 1 1 3 x 2 # 20
z 5 2.5 x 1 1 x 2 z 5 x 1 1 12 x 2
In Section 9.3, we applied the simplex method only to linear programming problems in standard form where the objective function was to be maximized. In this section, we extend this procedure to linear programming problems in which the objective function is to be min- imized. A minimization problem is in standard form if the objective function is to be minimized, subject to the constraints
where The basic procedure used to solve such a problem is to convert it to a maximization problem in standard form, and then apply the simplex method as dis- cussed in Section 9.3. In Example 5 in Section 9.2, we used geometric methods to solve the following minimization problem.
xi $ 0 and bi $ 0.
a (^) m 1 x 1 1 am 2 x 2 1...^1 a (^) mnxn $ bm
a 21 x 1 1 a 22 x 2 1...^1 a 2 nxn $ b 2
a 11 x 1 1 a 12 x 2 1...^1 a 1 nxn $ b 1
1...^1 cn xn
w 5 c 1 x 1 1 c 2 x 2