Professional Documents
Culture Documents
Opt lp3 PDF
Opt lp3 PDF
SIMPLEX METHOD
60.1 INTRODUCTION
In the previous lesson, we have solved linear programming
problems by graphical method. This method is useful when there
are not more than two variables and the number of constraints
is less.
60.2 OBJECTIVES
After the study of this lesson you will be able to
Solution :
In order to take up the slack between the left and right sides
of the problem, let us introduce the slack variables s1, and s2
which are greater than or equal to zero, such that
2x 1+ 4x 2+ s1 = 120
2x1 + 2x2 + s2 = 80
Furthermore, the objective function z = 3x 1 + 4x 2 can be
rewritten as
3x1 4x2 + z = 0
In effect, we have now replaced our original system of
42 :: Mathematics
2x 1+ 4x 2+ s1 = 120
2x 1+ 2x2 + s2 = 80
3x1 4x2 + z = 0
x1 x2 s1 s2 z
2 4 1 0 0 120
2 2 0 1 0 80
3 4 0 0 1 0
x1 x2 s1 s2 z
2 4 1 0 0 120 s1
2 2 0 1 0 80 s2 (1)
3 4 0 0 1 0 z
What is pivoting ?
Pivot element :
The pivot element for the simplex method is found using the
following rules:
1 0 1 0 1 120 z
44 :: Mathematics
x1 x2 s1 s2 z
1
1 0 0 30 x2 30 =60
2
1
1 0 1 0 20 s2 201=20
2
1 0 1 0 1 120 z
0 1 0 20 x2
1 0 1 0 20 x1 (3)
0 0 1 1 140 z
In the above matrix we notice that there are no negative
entries in the objective row. Hence, the optimal solution has
been found. Therefore,
Maximum z = 140
which occurs at
x1 =20, x2 =20 .
Simplex Method :: 45
Check point 1:
1. Is the following maximum problem in the standard form?
Max z = 8x1 + x 2
subject to the constraints
3x1 + 4x 2 2
x1+ x 2 6
x1 0, x2 0
2. Write the second simplex table for the following initial simplex
table. The pivot element is circled.
x1 x2 s1 s2 z
1 2 1 0 0 300 s1
3 2 0 1 0 480 s2
1 2 0 0 1 0 z
Example B :
Solve the following linear programming problem by simplex
method :
Maximize z = 6x1 8x2 + x 3
subject to the constraints
3x 1+ x2 10
4x 1 x 2 5
x 1 + x 2 x3 3
x1 0, x2 0, x 3 0
Solution :
This is a maximum problem containing three variables x 1, x2
and x 3. Each variable is nonnegative.
3 1 0 1 0 0 0 10 s1 103=
4 1 0 0 1 0 0 5 s2 54=
1 1 1 0 0 1 0 3 s3
6 8 1 0 0 0 1 0 z (1)
The pivot column is found by locating the column containing
smallest entry in the objective row (i.e., 6 in column 1). The
pivot row is obtained by dividing each entry in the last column
by the corresponding entry in the pivot column and selecting the
smallest non-negative ratio (Remember, in finding the pivot
element, we ignore rows in which the pivot column contains a
negative number, in this case 1). In this case pivot row is
second row and the pivot element is the circled element 4.
Simplex Method :: 47
3 25
0 0 1 0 0 s1
4 4
1 5
1 0 0 0 0 x1
4 4
5 1 17 (2)
0 1 0 1 0 s3
4 4 4
13
0 1 0 0 1 z
2
By the same procedure as before, we determine the next pivot
element to be 1 in the third column and third row (since we
have to ignore the rows in which the pivot column entry is
zero).
1
47
3
21
15
1
7 x1 x2 x3 s1 s2 s3 z
42
24 7 3 25
0 0 1 0 0 s1
4 4 4
5
1 0 0 0 0 x1
4
5 1 17 (3)
0 1 0 1 0 x3
4 4 4
47
0 0 0 1 1 z
4
Maximum z =
5 17
x1 = , x 2 = 0, x3 =
4 4
25
We also see that s1 = , s2 = 0, s3 = 0. These values can
4
be used to check that these are, in fact solutions of the system
of equations (i)
48 :: Mathematics
Check point 2 :
Solve the following maximum problem by simplex method
Maximize z = 6x1 + 8x2 + x3
subject to the constraints
3x 1 + 5x 2 + 3x 3 20
x1 + 3x2 + 2x 3 9
6x 1 + 2x 2 + 5x 3 30
x1 0, x 2 0, x3 0
Example C :
Solve the following linear programming problem :
Minimum z = x1 3x 2 + 2x 3
subject to the constraints
3x 1 x 2 + 2x 3 7
2x1 + 4x2 12
4x 1 + 3x 2 + 8x 3 10
x1 0, x2 0, x 3 0
Solution :
This is a problem of minimization in which all the constraints
are written as a linear expression, that is, less than or equal to
a positive constant. Therefore converting the objective function
for maximization, we have
Max z1 = x 1 + 3x 2 2x3 , where z1 = z
After introducing the slack variable the problem can be
expressed as
3x 1 x 2 + 2x 3 + s 1 = 7
2x 1 + 4x 2 + 0.x 3 + s 2 = 12
4x 1 + 3x 2 + 8x 3 + s 3 = 10
Simplex Method :: 49
x1 0, x2 0, x3 0, s 1 0, s 2 0, s3 0, (i)
x1 x2 x3 s1 s2 s3 z1
3 1 2 1 0 0 0 7 s1
2 4 0 0 1 0 0 12 s2 124=3
10
4 3 8 0 0 1 0 10 s3 103=
3
1 3 2 0 0 0 1 0 z1 (1)
The pivot column is found by locating the column containing
the smallest entry in the objective row (3 in column 2). The
pivot row is obtained by dividing each entry in the last column
by the corresponding entry in the pivot column (ignoring row in
which the pivot column contains a negative number) and selecting
the smallest non-negative ratio. Thus, the second row is the pivot
row and the pivot element in that row is the circled element 4.
1
4 Diving R 2 by 4 and applying the operations
R 1+ R 2, R 3 3R 2, R 4+ 3R 2 ,
x1 x2 x3 s1 s2 s3 z1
5
0 2 1 0 0 10 s1
2
1 1
1 0 0 0 0 3 x2
2 4
(2)
5 3
0 8 0 1 0 1 s3
2 4
1 3
0 2 0 0 1 9 z
2 4
Applying the same procedure, we determine the next pivot
5
element to be in the first column and first row.
2
50 :: Mathematics
5
R2 + R1 , R 3+ R , R4 + R1
2 1
we get the third simplex table as
x1 x2 x3 s1 s2 s3 z1
4 2 1
1 0 0 0 4 x1
5 5 10
1 6
0 1 0 0 5 x2
5 20
(3)
0 0 10 1 1 0 11 s3
16
0 0 0 1 11 z1
20
Maximum z1 =11
x1 = 4, x 2 = 5, x3 = 0, s1 = 0, s2 = 0, s 3= 11
Hence the solution of the original problem is
Min z = 11
x1 = 4, x2 = 5, x 3 = 0
(a) Maximize z = 2x 1 + x 2
subject to the constraints
x1 +x 2 5
2x1 +3x2 2
x1 0, x2 0
Simplex Method :: 51
(a) Maximize z =x 1+ x 2
subject to the constraints
3x1 4x 2 6
x1+ x2 4
x1 0, x2 0
x1 x2 s1 s2 z
1 4 1 0 0 100 s1
2 5 0 1 0 50 s2
2 1 0 0 1 0 z
52 :: Mathematics
x1 x2 x3 s1 s2 s3 z
1 2 4 1 0 0 0 24 s1
2 1 1 0 1 0 0 32 s2
3 2 4 0 0 1 0 18 s3
1 2 3 0 0 0 1 0 z
Solution :
We first observe that this is a maximum problem which is
not in standard form. Second, it cannot be modified so as to be
in the standard form. In order to solve this problem the following
steps be employed:
Simplex Method :: 53
x1 x2 s1 s2 s3 z
1 1 1 0 0 0 7 s1
9 5 0 1 0 0 45 s2
2 1 0 0 1 0 8 s3
20 15 0 0 0 1 0 z
2 1 0 0 1 0 8
20 15 0 0 0 1 0
Dividing R 3 by 2 and applying
R 1 + R 3 , R2 9R 3 , R4 + 20R 3
Simplex Method :: 55
x1 x2 s1 s2 s3 z
0 1 1 0 1 0 3
2 2
0 1 0 1 9 0 9
2 2
1 1 0 0 1 0 4
2 2
0 5 0 0 10 1 80
Notice that in the right hand side column still one entry is
negative; so apply the phase I again, as above.
x1 x2 s1 s2 s3 z
2 1 0 0 1 0 8
1 0 0 1 5 0 5
1 0 1 0 1 0 1
10 0 0 0 15 1 120
Again apply the phase II and repeat the procedure as above.
R 1+ R 2 , R3 + R 2, R 4+ 15R 2 ,
Maximum z = 135
x1 = 0, x 2= 9, s 1= 2, s2 = 0, s3 = 1
Check point 3 :
Solve the following linear programming problem:
Maximize z = 3x1+ 4x 2
subject to the constraints
x1 + x2 12
5x1 + 2x2 36
7x1 + 4x2 14
x1 0, x2 0, x 3 0
Simplex Method :: 57
Example E :
Solve the following linear programming problem
Minimize z = 5x 1+ 6x2
subject to the constraints
x1 +x 2 10
x1 +2x 2 12
2x1 +x 2 12
x1 3
x1 0, x2 0
Solution :
We change our problem from minimizing z =5x 1 + 6x 2 to
maximizing z1 = z = 5x1 6x 2
Step I: Write each constraint with , for this multiply second,
third and fourth constraint by 1.
i.e., x 1+ x 2 10
x1 2x 2 12
2x 1 x 2 12
x1 3
x 1 0, x2 0
5 6 0 0 0 0 1 0 z1
Step IV: In the right hand side column three entries are negative.
Apply phase I.
Step V: The pivot row is row 2 (or 3) and for this row the pivot
column is column 2. Pivoting as before, we get the
following table (Dividing R 2 by 2 and applying the
operation R 1R 2, R 3+R 2 , R 5 6R 2 )
x1 x2 s1 s2 s3 s4 z1
0 1 0 0 0 4 s1
1 0 0 0 0 6 x2
0 0 1 0 0 6 s3
1 0 0 0 0 1 0 3 s4
2 0 0 3 0 0 1 36 z1
Notice that still the right hand column has negative entries,
so apply the phase I again. Pivot row is row 3 and for this row,
the pivot column is column 1.
1
R1 R 3, R2 R 3 , R 4 + R 3, R 5 2R 3 ,
2
Simplex Method :: 59
x1 x2 s1 s2 s3 s4 z1
1
0 0 1 0 0 2 s1
3
0 1 0 0 0 4 x2
1 0 0 0 0 4 x1
0 0 0 1 0 1 s4
0 0 0 0 1 44 z1
Notice that all the entries in the last column are non-negative.
So now we will use phase II in order to get the optimal solution.
But here all the entries in the objective row are non-negative.
Hence, this is the final table and the optimal solution is found.
Since the maximum value of z 1 =44, the minimum value of
z=z 1 =44.
2
1
4
7
33 This occurs when
x1 =4, x 2=4, s 1 =2, s4 =1, s 2=0, s3 =0
Solution :
Here we wish to
Maximize z1 =7x1 5x2 6x 3 , where (z 1=z)
subject to the constraints
x1 +x 2+x 3 10
x1 +x 2+x 3 10
x1 +2x 2+3x3 19
2x1 +3x 2 21
x1 0, x 2 0 x3 0
7 5 6 0 0 0 0 1 0 z1
Simplex Method :: 61
Step IV: Notice that in the right hand side column two entries
are negative. Apply phase I.
Step V: The pivot row is row 4 and pivot column is column 2.
Dividing R4 by 3 and applying the operations
R 1+R 4 , R2 R 4 , R3 2R4 , R 55R 4 , we get the following table.
x1 x2 x3 s1 s2 s3 s4 z1
0 1 1 0 0 0 3 s1
0 1 0 1 0 0 3 s2
0 3 0 0 1 0 5 s3
2 1
1 0 0 0 0 0 7 x2
3 3
0 6 0 0 0 1 35 z1
Notice that one entry is still negative in the right hand column.
So again apply phase I.
4
1
11
1
5
2
33 Pivot row is row 1 and the pivot column is column 3. Dividing
R 1 by 1 and applying the operations
R 2R 1, R 33R 1, R 5 6R1 ,
we get the following table
x1 x2 x3 s1 s2 s3 s4 z1
0 1 1 0 0 0 3 x3
0 0 0 1 1 0 0 0 0 s2
0 0 3 0 1 0 4 s3
1 0 0 0 0 0 7 x2
0 0 6 0 0 1 53 z1
Notice that one entry is still negative in the right hand column.
So again apply phase I.
62 :: Mathematics
R1 R3 , R4 R 3, R5 R3
0 0 1 0 0 2 x3
0 0 0 1 1 0 0 0 0 s2
1 0 0 0 0 3 x1
0 1 0 0 0 5 x2
0 0 0 0 1 58 z1
Notice that all the entries in the right hand column are non-
negative. Therefore, we will apply phase II for finding the optimal
solution.
Pivot column is column 7 and pivot row is row 1. Pivot element
is circled in the above table.
R3 R 1, R4 + R 1, R5 + R 1,
0 0 3 9 0 2 0 1 52 z1
Simplex Method :: 63
Notice that all the entries in the objective row are non-negative.
Hence, the optimal solution is found.
Step I: Now, we write all the constraints with sign and for
this multiply each constraint (except the non-negative
constraint) by 1. The constraints become
2x1 x2 4
x1 7x2 7
x1 0, x2 0
1 7 0 1 0 7 s2
1 1 0 0 1 0 z1
64 :: Mathematics
Step IV: Notice that in the right hand side column, the entries
have negative sign. Phase I applies here.
R2 R1 , R3 R 1,
0 1 0 x2
0 0 1 z1
Notice that all the entries in the right hand column are non-
negative. So we will apply phase II to obtain the optimal solution.
Here we see that all the entries in the objective row are non
-negative. Hence, the optimal solution is found.
Simplex Method :: 65
Max. z 1= , so min. z = .
to form an equality.
3. Write the initial simplex table.
4. Determine whether phase I or phase II applies.
Phase I:
Whenever negative entries appear in the right hand column.
Phase II:
Whenever all the entries in the right hand column are non
negative.
5. Phase I
(i) Select the pivot element. If all the elements in the pivot
row are nonnegative, there would be no feasible solution.
(ii) Do all the row operations to form a new simplex table
and repeat (i).
This process ends when there are no negative entries in
the right hand column.
(iii) Now use phase II to get the optimal solution.
Phase II
(i) Select the pivot element.
If all the entries in this column are negative, the problem
is unbounded and there is no solution.
(ii) Do all the row operations to form a new simplex table
and repeat step (i) .
This process ends when all the entries in the objective
row are nonnegative.
TERMINAL QUESTIONS
1. Solve the following linear programming problem by simplex
method.
(b) Maximize z = 3x 1+ 2x 2 x 3
subject to the constraints
x1 + 3x2 + x3 9
2x1 + 3x2 x 3 2
3x 1 2x 2 + x 3 5
x1 0, x2 0, x 3 0
x1 0, x 2 0, x 3 0
(e) Minimize z = 2x 1+ 9x 2 + x3
subject to the constraints
x1 + 4x 2 + 2x3 5
3x1 + x2 + 2x3 4
x1 0, x2 0, x 3 0
(g) Maximize z = 2x 1+ x2
subject to the constraints
3x1 + 5x2 15
6x1 + 2x2 24
x1 0, x2 0
x1 x2 s1 s2 z
2. 1 1 1 0 0 150 x2
2 2
2 0 1 1 0 180 s2
0 0 1 0 1 300 z
Simplex Method :: 69
Check point 2:
Max z = , x1 = , x2 = , x3 = 0
Check point 3:
Max z = 44, x 1 = 4, x 2 = 8
0 1 0 60 s1
1 0 0 10 x2
0 0 1 10 z
60.2
1. (a) Max. z = 44, x1 = 4, x2 = 8
(c) Max z = 7, x1 = 1, x2 = 2
70 :: Mathematics
1. (a) Max z = , x1 = , x2 =
(c) Min z = , x 1 = 0, x 2 = 0, x3 =
(d) Min z = , x1 = , x2 =
(e) Min z = , x1 = 0, x 2 = 0, x3 =
(g) Max. z = , x1 = , x2 =
(i) Max z = , x 1 = 0, x2 = , x3 =