You are on page 1of 32

60

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.

If we have a large number of either variables or constraints,


it is still true that the optimal solution will be found at the
vertex of the set of feasible solutions. In fact, we could find
these vertices by writing all the equations corresponding to the
inequalities of the problem and then proceeding to solve all
possible combinations of these equations. We would of course,
have to discard any solutions that are not feasible (because they
dont satisfy one or more of the constraints). Then we could
evaluate the objective function at the remaining feasible solutions.
After all this, we might discover that the problem has no optimal
solution at all. But this would be a highly cumbersome procedure.

If there were just four variables and 7 constraints, we would


have to solve all possible combinations of 4 equations chosen
from a set of 7 equations.

Obviously, there would be 7c 4=35 solutions in all. Each of


these solutions will then have to be tested for feasibility.

So even for this relatively small number of variables and


constraints, the work would be quite tedious.

In the real world of applications, it is fairly common to


encounter problems with hundreds, even thousands of variables
and constraints. Of course such problems must be solved by
40 :: Mathematics

computer. Even so, choosing a more efficient problem solving


strategy than the geometrical method might reduce computers
running time from hours to seconds or for very large problems
from days to hours.

A more systematic approach would involve choosing a solution


at one vertex of the feasible set, then moving from there to
another vertex at which the objective function has a better value.
This process is continued until the best possible value is found.

One very efficient technique of doing this is simplex method.

60.2 OBJECTIVES
After the study of this lesson you will be able to

l define slack variables;

l identify standard maximum problem;

l solve the standard maximum problem; and

l solve the linear programming problems for mixed constraints.

60.3 SOLUTION OF THE LINEAR PROGRAMMING


PROBLEM BY SIMPLEX METHOD
In this section we will solve the linear programming problem
by simplex method.

In linear programming problem we have two types of problems,


that is, either to maximize the objective function or to minimize
the objective function.

We will consider these problems one by one.

Let us consider first the problems in which the objective


function is to be maximized.
Example A :
Solve the following linear programming problem.
Max z = 3x1 + 4x 2
subject to the conditions
2x1 + 4x2 120
2x1 + 2x2 80
x1 0, x 2 0
Simplex Method :: 41

Solution :

The procedure for solving the given problem is illustrated in


the following steps:

Step I: Standard form of a maximum problem

A linear programming problem in which the objective function


is to be maximized is referred to as a maximum linear
programming problem. Such problems are said to be in standard
form if following conditions are satisfied:

(i) All the variables are nonnegative.


(ii) All the other constraints are written as a linear expression,
that is, less than or equal to a positive constant.

Check whether the given problem is in standard form ?


This is a maximum problem containing two variables x1 and
x 2 . Since both the variables are nonnegative and the other
constraints are each written as linear expression less than or
equal to a positive constant, therefore, we conclude that the
maximum problem is in standard form.
Steep II: Slack variables and starting simplex table
In order to solve the maximum problem by simplex method,
we need to do the following first

(i) Introduction of slack variables, and


(ii) Construction of the initial simplex table.
In this problem we have the constraints as linear expressions
less than or equal to some positive constants. That means there
is a slack between the left and right sides of the inequalities.

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

constraints and the objective function by a system of three


equations in five unknowns as:

2x 1+ 4x 2+ s1 = 120
2x 1+ 2x2 + s2 = 80
3x1 4x2 + z = 0

Here, we have to find the particular solution (x 1, x2 , s 1, s2 , z)


that gives the largest possible value for z. The augmented matrix
for this system is

x1 x2 s1 s2 z
2 4 1 0 0 120
2 2 0 1 0 80
3 4 0 0 1 0

This is called the initial (starting) simplex table and written as

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

Notice that the bottom row contains the negatives of the


coefficients in the objective function and that we have set this
row off from the rest of the matrix by a dotted line.

From this point on, the simplex method consists of pivoting


from one table to another until the optimal solution is found.

What is pivoting ?

Pivoting : To pivot a matrix about a given element, called


the pivot element, is to apply row operations so that the pivot
element is replaced by 1 and all other entries in the same column
(called pivot column) become 0.

More specifically, in the pivot row, divide each entry by the


pivot element (we assume it is not 0). Obtain 0 elsewhere in the
pivot column by performing row operations.

How is the pivot element selected?


Simplex Method :: 43

Pivot element :
The pivot element for the simplex method is found using the
following rules:

(i) The pivot column is selected by locating the most negative


entry in the objective row. If all the entries in this column
are negative, the problem is unbounded and there is no
solution.

(ii) Divide each entry in the last column by the corresponding


entry (from the same row) in the pivot column. (Ignore the
rows in which the pivot column entry is less than or equal
to 0). The row in which the smallest positive ratio is obtained
is the pivot row.

The pivot element is the entry at the intersection of the


pivot row and the pivot column.

Note : The pivot element is never in the objective row.

In this example, 4 is the most negative entry in the objective


row, so column 2 is the pivot column.

On dividing all the entries in the last column by the


1 corresponding entry in column 2, we get 30 as the smallest
4 ratio, so row 1 is the pivot row. Hence a21=4 is the pivot element.
This is marked in the initial table (reproduced below) by a circle
and the pivot column and the row are marked by arrows.
x1 x2 s1 s2 z
2 4 1 0 0 120 s1 1204=30
2 2 0 1 0 80 s2 802=40
3 4 0 0 1 0 z

Divide R 1 (row1)by 4 and then apply the operations
R 2 2R 1 , R 3+ 4R 1 .
The new matrix becomes
x1 x2 s1 s2 z
1
1 0 0 30 x2
2
1
1 0 1 0 20 s2 (2)
2

1 0 1 0 1 120 z
44 :: Mathematics

Notice that the identity matrix I3 which now appears in column


2,4, and 5 helps us to solve for x 2, s2 and z in terms of x 1 and
s1 . This is why we wrote x2 , s 2 and z to the right of the matrix
(2). (2) is called the second simplex table.

Now, the question is when does this process end?

This process ends when there are no negative entries in


the objective row.

In the second simplex table 1 is the most negative entry in


the objective row, so column 1 is the pivot column.

On dividing all the entries in the last column by the


corresponding entry in column 1, we get 20 as the smallest
ratio, so row 2 is the pivot row. Hence, a21=1 is the pivot element.
This is marked by a circle in the 2nd simplex table (reproduced
below) and the pivot column and row are marked by arrows.

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

Divide R 2 by 1 and then apply the operations R 1 R 2, R 3+ R 2.


The new matrix becomes
x1 x2 s1 s2 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.

The given set of constraints contains x 1+ x2 x 3 3, which is


not a linear expression, that is, less than or equal to a positive
constant. Thus, the maximum problem is not in standard form.

Notice, however that by multiplying this constraint by 1, we


get
x1 x2 + x3 3
46 :: Mathematics

which is in the desired form. Thus, although the maximum


problem as stated is not in the standard form, it can easily be
modified to the requirements of the standard form.
Now,
Max z = 6x1 8x2 + x 3
subject to the constraints
3x 1 + x 2 10
4x 1 x2 5
x1 x2 + x3 3
x1 0, x2 0, x 3 0

After adding the slack variables the systems of constraints


takes the following form :
3x1 + x2 + 0.x 3 + s 1 = 10
4x1 x 2 + 0.x3 + s 2 = 5 (i)
x1 x 2 + x 3 + s 3 = 3
x1 0, x2 0, x 3 0, s 1 0, s2 0, s3 0
and objective function can be rewritten as
6x1 + 8x2 x3 + z = 0

The starting simplex table for this system is


x1 x2 x3 s1 s2 s3 z

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

Dividing R 2 by 4 and applying the operations


R 1 3R 2, R3 + R 2 , R 4 + 6R 2 ,
we get the second simplex table as:
x1 x2 x3 s1 s2 s3 z

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

Applying the operation R4 + R3 , we get the third simplex table

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

In the above matrix we see that there are no negative entries in


the objective row. Hence the optimal solution is found. Therefore,

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

60.3.1 Problem of minimization Involving sign


In general, a minimum problem can be changed to a maximum
problem by realizing that in order to minimize z we must
maximize z. That is in such cases we multiply the objective
function by 1 and convert it into a maximum problem and
solve it as discussed above.

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)

The objective function can be written as


x 1 3x 2 + 2x 3 + z 1 = 0

The starting simplex table for this system is

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 ,

we get the second simplex table as

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

Dividing R 1 by and applying the operations

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

In the above matrix we see that there are no negative entries in


the objective row. Hence, the optimal solution is found. Therefore,

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

We also see that s1 = 0, s 2 = 0, s3 = 11 can be used to check


that these are, in fact solutions of the system of equation (i)

INTEXT QUESTIONS 60.1


1. Identify the standard maximum linear programming
problems from the following (give reason for your answers)

(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

(b) Maximize z = 3x 1+x2 +x 3


subject to the constraints
x1 +x 2+x3 6
2x1 + 3x2 + 4x3 6
x1 0

(c) Maximize z = 2x 1+x 2


subject to the constraints
x1 + x2 6
2x1 + x2 4
x1 0, x2 0

2. The following maximum problems are not in standard form.


Determine if the problem can be modified so as to be in
standard form.

(a) Maximize z =x 1+ x 2
subject to the constraints
3x1 4x 2 6
x1+ x2 4
x1 0, x2 0

(b) Maximize z =2x1 + x 2+ 3x 3


subject to the constraints
x1 + x 2 x 3 6
2x1 3x 2 12
x1 0, x2 0, x 3 0

3. Write the second simplex table of the following starting


simplex table. The pivot element is circled.

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

4. Find the pivot element in the following simplex table.

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

60.4 THE SIMPLEX METHOD WITH MI XED


CONSTRAINTS
So far we have solved the linear programming problems in
the standard form. Recall that for a maximum problem in
standard form each constraint must be of the form
a1x 1+a2 x2 + ... +anx n b 1 , b1 > 0
That is, each is a linear expression less than or equal to a
positive constant.

What happens when the constraints are of any other form


i.e., greater than or equal to, or equal to?

Such problems are dealt by a method known as two phase


method. The method is illustrated in the following example.
Example D :
Solve the following linear programming problem :
Maximize z =20x 1 + 15x2
subject to the constraints
x1 + x2 7
9x 1 + 5x 2 45
2x 1+ x2 8
x1 0, x 2 0

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

Step I: Write each constraint except the non-negative constraints


as an inequality with the variable on the left side of a
sign.
To do this we merely multiply the first and third
inequality by 1. The result is that the constraints
become
x1 x2 7
9x 1 + 5x 2 45
2x1 x2 8

Step II: Introduce non-negative variables (slack variables) on the


left side of each inequality to form an equality.
To do this, we will use the variables s1 , s 2, s3 to obtain
x 1 x 2 + s 1 = 7
9x 1 + 5x 2 + s 2 = 45
2x 1 x 2 + s 3 = 8
x1 0, x2 0, x3 0, s1 0, s 2 0, s3 0.
The objective function can be written as
20x 1 15x 2 +z = 0
Step III : Write the initial simplex table.

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

The initial table represents the solution


x1 = 0, x2 = 0, x3 = 0, s1 = 7, s2 = 45, s3 = 8
This is not a feasible solution. The reason for this is
the existence of the two negative constraints in the right
hand column. That is, this table represents a solution
that causes two of the variables to be negative, in
violation of the non negativity requirement. Whenever
this occurs, the simplex algorithm consist of two phases.
54 :: Mathematics

Step IV :Determine whether phase I or phase II applies. Phase


I is used whenever negative entries appear in the
right hand column. Phase II is used whenever all
the entries in the right hand column are non-
negative. In determining whether phase I or phase II
applies, the objective row is ignored.

Step V : Select the pivot element


Phase I: The pivot row is the row with the most negative value
in the right hand side column. If all the entries in
the pivot row are non-negative, there would be no
feasible solution and hence the problem has no
solution.
For each column with a negative entry in the pivot row,
find the ratio using the right hand side column entry
as denominator. The largest of these is the pivot column
and the point of intersection of the pivot row and pivot
column would be the pivot element.

Phase II:For this we follow the pivoting strategy discussed in


the preceeding sections.
In the initial simplex table we notice that in the right
hand side column two entries are negative. So we apply
phase I.
The pivot row is row 3 (8 is the most negative value
in the right hand side column). To find the pivot column
2 1 1 1
we find the ratios; i.e., = and = . The
8 4 8 8
1
largest is . Therefore, the pivot column is column 1.
4
The pivot element is 2 which is circled in the initial
table (reproduced below).
x1 x2 s1 s2 s3 z
1 1 1 0 0 0 7
9 5 0 1 0 0 45

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

we get the following table

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.

The pivot row is row 1, the pivot column is column 2 (or


column 5). Here we take column 2 as pivot column for our
convenience.
1
Dividing R 1 by and applying
2
R2 R 1, R 3 R 1, R 4 + 5R 1
1
we get the following table.
2
x1 x2 s1 s2 s3 z
0 1 2 0 1 0 6
0 0 1 1 4 0 6
1 0 1 0 1 0 1

0 0 10 0 5 1 110

Observing that right hand side column has all the entries
non-negative, so we will use phase II to obtain the optimal
solution.
Here pivot column is column 3 (being 10 as largest negative
entry in the objective row) and R 3 is the pivot row (being the
smallest non-negative ratio). The pivot element is circled and the
pivot row and column are marked by arrows.
Applying R 1 + 2R3 , R 2 R 3 , R 4 + 10R 3 ,
we get the following table.
56 :: Mathematics

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.

Dividing R 2 by 5 and applying the operations

R 1+ R 2 , R3 + R 2, R 4+ 15R 2 ,

we get the following table


x1 x2 s1 s2 s3 z
9 1 0 1 0 0 9 x2
5 5
1 0 0 1 1 0 1 s3
5 5
4 0 1 1 0 0 2 s1
5 5
7 0 0 3 0 1 135 z

In the above matrix we see that there are no negative entries


in the objective row. Hence, the optimal solution is found.

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

Step II: Introduce non-negative variables to form equalities


x 1 + x 2 + s 1 =10
x 1 2x 2 + s 2=12
2x 1 x 2 +s 3 =12
x 1 + s 4 = 3
x1 0, x 2 0, s 1 0, s 2 0, s3 0, s 4 0
The objective function can be written as
5x 1 + 6x2 + z1 = 0
58 :: Mathematics

Step III: Form the initial simplex table.


x1 x2 s1 s2 s3 s4 z1
1 1 1 0 0 0 0 10 s1
1 2 0 1 0 0 0 12 s2
2 1 0 0 1 0 0 12 s3
1 0 0 0 0 1 0 3 s4

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.

Dividing R 3 by and applying the operations

1
R1 R 3, R2 R 3 , R 4 + R 3, R 5 2R 3 ,
2
Simplex Method :: 59

we get the following table

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

So far all our constraints were of the form or . What


happens when one of the constraints is an equality?

One way is to replace the equality constraint with the two


constraints and .

The process is illustrated in the next example.


Example F :

Minimize z = 7x 1 + 5x2 + 6x3


subject to the constraints
x 1 + x 2 + x 3 =10
x 1 + 2x 2 + 3x 3 19
2x1 + 3x 2 21
x1 0, x2 0, x 3 0
60 :: Mathematics

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

Step I: Write each constraint with , for this multiply first


and fourth constraint by 1.
x1 x 2 x 3 10
x1 +x 2+x 3 10
x1 +2x 2+3x3 19
2x1 3x2 21
x1 0, x2 0, x 3 0

Step II: Introduce non-negative variables to form equations.


x 1 x 2 x3 +s 1 = 10
x 1 +x 2 +x 3 +s 2 = 10
x 1 +2x 2 +3x 3 +s 3 = 19
2x 13x 2 +s 4 = 21
x1 0, x2 0, x 3 0 si 0, i = 1, 2, 3, 4.
The objective function can be written as
7x 1+5x 2 +6x 3 +z 1 = 0

Step III:Form the initial simplex table.


x1 x2 x3 s1 s2 s3 s4 z1
1 1 1 1 0 0 0 0 10 s1
1 1 1 0 1 0 0 0 10 s2
1 2 3 0 0 1 0 0 19 s3
2 3 0 0 0 0 1 0 21 s4

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

Pivot row is row 3, the pivot column is column 1. Pivot


element is circled in the above table.

Dividing R 3 by and applying the operations

R1 R3 , R4 R 3, R5 R3

we get the following table


x1 x2 x3 s1 s2 s3 s4 z1


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.

Dividing R 1 , by and applying the operations

R3 R 1, R4 + R 1, R5 + R 1,

we get the following table


x1 x2 x3 s1 s2 s3 s4 z1
0 0 4 1 0 1 1 0 8 s4
0 0 0 1 1 0 0 0 0 s2
1 0 1 2 0 1 0 0 1 x1
0 1 2 1 0 1 0 0 9 x2

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.

Since the maximum z 1= 52, so minimum z = 52. This occurs


when x 1=1, x 2=9, x 3=0, s 1=0, s2 =0, s4 =8
Example G :
Solve the following linear programming problem
Minimum z = x 1+x 2
subject to the constraints
2x 1+x 2 4
x1 +7x 2 7
x1 0, x2 0
Solution:
We change our problem from minimizing z = x 1 +x2 to maximizing
z1 = z = x 1x 2

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

Step II: Introduce non-negative variables to form equations.


2x1 x 2+s1 = 4
x1 7x 2+s2 = 7
x1 0, x2 0, s 1 0, s 2 0
The objective function can be written as
x1 +x 2+z 1 = 0

Step III:Form the initial simplex table


x1 x2 s1 s2 z1
2 1 1 0 0 4 s1

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.

Step V: Pivot row is R 2 and pivot column is column 2. The


pivot element is circled in the above table. Dividing
row 2 by 7 and applying the operations
R 1 + R2 , R 3 R 2,
we get the following table
x1 x2 s1 s2 z1
13 0 1 1 0 3 s1

7 7
1 1 0 1 0 1 x2
7 7
6 0 0 1 1 1 z1
7 7

Step IV: Notice that one entry in the right hand side column is
negative. Phase I applies here.

Step V: Pivot row is row 1 and pivot column is column 1 and


the pivot element is circled.

Dividing R 1 by and applying the operations

R2 R1 , R3 R 1,

we get the following table


x1 x2 s1 s2 z1
7
1 0 0 x1
13

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

This occurs at x 1 = , and x 2= , s 1=0, s2 =0

INTEXT QUESTIONS 60.2

1. Solve the following linear programming problems

(a) Maximize z=3x1 +4x 2


subject to the constraints
x1 x 2 12
5x1 +2x 2 36
7x1 +4x 2 14
x1 0, x2 0

(b) Minimize z=4x1 +2x 2


subject to the constraints
3x1 +x 2 27
31
10
21
31
x1 x 2 21
13
13
x1 +2x 2 30
x1 0, x2 0

(c) Maximize z=3x1 +2x 2


subject to the constraints
2x 1+x 2 4
x1 +x 2 3
x1 0, x2 0

WHAT YOU HAVE LEARNT


We use simplex method to find the optimal solution of a
linear programming problem when the given problem has a large
number of either variables or constraints. We follow the following
steps to find the optimal solution:

1. Write the problem in the standard form.


2. Introduce slack variables on the left side of each inequality
66 :: Mathematics

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.

(a) Maximize z=5x1 +3x 2


subject to the constraints
3x1 +5x 2 15
5x1 +2x 2 10
x1 0, x2 0
Simplex Method :: 67

(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

(c) Minimize z =6x 1 + 8x 2 + x3


subject to the constraints
3x 1 + 5x 2 + 3x 3 20
x 1 + 3x 2 + 2x 3 9
6x 1 + 2x 2 + 5x 3 30
x 1 + x 2 + x 3 10

x1 0, x 2 0, x 3 0

(d) Minimize z = 2x1 + x 2


subject to the constraints
3x1 + x2 = 3
4x1 + 3x2 6
x1 + 2x2 4
x1 0, x2 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

(f) Maximize z =2x 1 x 2+ x 3


subject to the constraints
x1 + x2 3x3 8
4x1 x 2 + x3 2
2x1 + 3x2 x 3 4
x1 0, x2 0, x 3 0
68 :: Mathematics

(g) Maximize z = 2x 1+ x2
subject to the constraints
3x1 + 5x2 15
6x1 + 2x2 24
x1 0, x2 0

(h) Maximize z = 3x1+ 2x 2


subject to the constraints
x1 + x2 4
x1 x 2 2
x1 0, x2 0

(i) Maximize z =2x1 + 4x2 + x3


subject to the constraints
x1 + 2x2 4
2x 1 + 2x 2 3
x2 + 4x3 3
x1 0, x2 0, x 3 0

(j) Manimize z = 4x1 + 8x2 + 3x3


subject to the constraints
x1+ x 2 2
2x 1+ x2 5
x1 0, x2 0, x 3 0

ANSWERS TO CHECK POINTS


Check point 1 :

1. Not in the standard form

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

ANSWERS TO INTEXT QUESTIONS


60.1
1. (a) Standard form.
(b) Not in standard form.
(c) Not in standard form.
2. (a) Cannot be modified so as to be in the standard form.
(b) Can be modified to
Maximize z = 2x1 + x2 + 3x3
subject to the constraints
x1 x 2 + x3 6
2x1 + 3x2 12
3
4
8
1
55
5
2
75
x1 0, x 2 0 x3 0
12
45
52
3. x1 x2 s1 s2 z

0 1 0 60 s1

1 0 0 10 x2

0 0 1 10 z

4. Pivot column is column 3, pivot row is row 3 and pivot element


is 4(a33).

60.2
1. (a) Max. z = 44, x1 = 4, x2 = 8

(b) Min z = 48, x1 = 3, x2 = 18

(c) Max z = 7, x1 = 1, x2 = 2
70 :: Mathematics

ANSWERS TO TERMINAL QUESTIONS

1. (a) Max z = , x1 = , x2 =

(b) Max z = 27, x 1 = 9, x2 = 0, x3 = 0

(c) Min z = , x 1 = 0, x 2 = 0, x3 =

(d) Min z = , x1 = , x2 =

(e) Min z = , x1 = 0, x 2 = 0, x3 =

(f) The problem is unbounded and there is no solution.

(g) Max. z = , x1 = , x2 =

(h) Max. z = 11, x 1 = 3, x2 = 1

(i) Max z = , x 1 = 0, x2 = , x3 =

(j) Min z = 10, x1 = , x2 = 0, x 3 = 0.

You might also like