You are on page 1of 45

 In the standard simplex table

The coefficients of the basic variables in the z-row


should be zero.

The respective coefficients in the constraint matrix


must be identity coefficients.

In case it is not we have to use elementary row


operations to keep it in the standard simplex form
before we apply the simplex method

1
Contents

Artificial Variables Techniques


Big M Method

Two Phase Method

2
If in a starting simplex tableau, we dont have an
identity sub matrix (i.e. an obvious starting BFS), then
we introduce artificial variables to have a starting BFS.

This is known as artificial variable technique.


There are two methods to find the starting BFS and
solve the problem

(1) Big M Method


(2) Two-Phase Method.

3
Big M Method

4
 Suppose that ith constraint equation doesn't have a
slack variable. i.e.
ith constraint in the original LPP is either or = type .

 Then an artificial variable Ri is added, to form the ith


unit vector column.

 Since the artificial variables are not part of the


original LPP, they are assigned a very high penalty in
the objective function and thus forcing them to equal
zero in the optimum solution.

5
Artificial variable objective coefficient
= - M (Sum of artificial variables) in a maximization
problem,
= M (sum of the artificial variables ) in a minimization
problem
where M is a very large positive number.

Mathematically M

6
Example 1

Min z = 4x1 + 3x2


Subject to
2x1 + x2 10
x1 + x2 6
-3x1 + 2x2 6
Writing z as equation and adding
x10, x20 slack and surplus variables to the
constraints
z 4x1 3x2 =0
2x1 +x2 S1 = 10
x1 + x2 - S2 =6
-3x1 + 2x2 + S3 = 6
7
Addition of artificial variables to obtain a starting BFS

2x1 + x2 S1 +R1 = 10 Artificial variables


R1 and R2 added to
x1 + x2 S2 +R2 = 6 the constraints
- 3x1 + 2x2 + S3 = 6

These artificial variables are penalized in the objective


function by assigning some very large value (say M) to
them in the objective function

8
z = 4x1 + 3x2 + MR1 + MR2 Objective function

2x1 + x2 s1 +R1 = 10
x1 + x2 s2 +R2 =6 constraints

- 3x1 + 2x2 + s3 =6

Where M is a very large penalty assigned on


artificial variables R1 and R2

9
Tabular form

Basic z x1 x2 S1 S2 R1 R2 S3 solution

z 1 -4 -3 0 0 -M -M 0 0

R1 0 2 1 -1 0 1 0 0 10

R2 0 1 1 0 -1 0 1 0 6

S3 0 -3 2 0 0 0 0 1 6

10
Since the z column does not change in the iterations, it may be
deleted
Basic x1 x2 S1 S2 R1 R2 S3 solution

z -4 -3 0 0 -M -M 0 0

R1 2 1 -1 0 1 0 0 10

R2 1 1 0 -1 0 1 0 6

S3 -3 2 0 0 0 0 1 6

The initial BFS as obtained from the table is


R1 = 10; R2 = 6 and z = 0 Is this table
correct ?
11
But if R1 = 10; R2 = 6 then the value of
objective function should be z = 16 M, since
we have defined the objective function as:

z = 4x1 + 3x2 + MR1 + MR2

Why does this inconsistency appears?

This is because of the fact that the elements


of the basic matrix have a non zero
coefficient in the z-row.
The starting table now becomes

12
Basic x1 x2 S1 S2 R1 R2 S3 solution

z -4 + 3M -3+2M -M -M 0 0 0 16M

R1 2 1 -1 0 1 0 0 10

R2 1 1 0 -1 0 1 0 6

S3 -3 2 0 0 0 0 1 6

Apply the usual simplex method for solving


minimization problem

13
Selecting pivot row and pivot column for a minimization problem

Basic x1 x2 S1 S2 R1 R2 S3 solution Min.


ratio
z -4 + 3M -3+2M -M -M 0 0 0 16M

R1 2 1 -1 0 1 0 0 10
2 10/2
R2 1 1 0 -1 0 1 0 6
6/1
S3 -3 2 0 0 0 0 1 6 ---

Select the most positive element of the z row

14
Second iteration
Bas x1 x2 S1 S2 R1 R2 S3 solution Min.
ic ratio
z 0 -2+M -4-M -M 4 3M 0 0 20 +M
2 2 2

x1 1 1/2 -1/2 0 1 0 0 5 5/1/2

R2 0 1/2 1/2 -1 0 1 0 1
1/2 1/1/2

S3 0 7/2 -3/2 0 0 0 1 21 21/7/2

15
Final iteration
Basic x1 x2 S1 S2 R1 R2 S3 solution

z 0 0 -1 -2 1M (2-M)/2 0 22

x1 1 0 -1 0 1 0 0 4

x2 0 1 1 -1 0 1 0 2

S3 0 0 -13/2 0 0 0 1 14

Solution x1 = 4; x2 = 2; z = 22

16
Consider the following LPP:

Maximize z = 2 x1 + 3 x 2 5 x3

Subject to x1 + x 2 + x3 = 7
2 x1 5 x 2 + x3 10
x1 , x 2 , x3 0

17
Introducing surplus and artificial variables, s2, R1 and R2 , the
LPP is modified as follows:
Maximize z = 2 x1 + 3 x 2 5 x3 MR1 MR 2

Subject to x1 + x2 + x3 + R1 = 7
2 x1 5 x 2 + x 3 s 2 + R2 = 10
x1 , x 2 , x 3 , s 2 , R 1 , R 2 0

Now we solve the above LPP by the Simplex method.

18
Basic z x1 x2 x3 s2 R1 R2 Sol.

-2-3M -3+4M 5-2M M 0 0 -17M


z 1 -2 -3 5 0 M M 0
R1 0 1 1 1 0 1 0 7
R2 0 2 -5 1 -1 0 1 10
z 1 0 -8 - 6- -1 - 0 1+ 10 -
7M/2 M/2 M/2 3M/2 2M
R1 0 0 7/2 1/2 1/2 1 -1/2 2
x1 0 1 -5/2 1/2 -1/2 0 1/2 5
z 1 0 0 50/7 1/7 16/7 + -1/7 102/7
M +M
x2 0 0 1 1/7 1/7 2/7 -1/7 4/7
x1 0 1 0 6/7 -1/7 5/7 1/7 45/719
The optimum (Maximum) value of
z = 102/7
and it occurs at
x1 = 45/7, x2 = 4/7, x3 = 0

20
 If in any iteration, there is a tie for leaving variable
between an artificial variable and other variable
(decision, surplus or slack), we must prefer the
artificial variable to leave the basis.

 An artificial variable is never considered for re-entry


into the basis.

 If in the final optimal tableau, an artificial variable is


present in the basis at a non-zero level, this means our
original problem has no feasible solution.

21
TWO PHASE METHOD

22
Why use two phase method when Big M - method
is already there ?

One major disadvantage of Big M - method is that it


is computationally inefficient.

Mathematically it is said that M should be a very


large number, but sometimes very large values of M
may lead to a wrong result.

23
Phase - I

We construct an auxiliary LPP (always a minimization


problem).

The objective function is sum of artificial variables,


with the original constraints

The optimal solution of the auxiliary problem will give


a starting BFS for the original problem.

24
Phase - II

We use the basic feasible solution available from the


Phase-I to find the optimal solution of the original
problem.

25
Example

Min z = 4x1 + 6x2 + 5x3

Subject to
2x1 + 4x2 + 3x3 32
x1 + 2x2 + 4x3 28
x1, x2, x3 0

26
s1, s2 surplus variable
R1 , R2 artificial variables

Min z = 4x1 + 6x2 + 5x3

Subject to

2x1 + 4x2 + 3x3 s1 + R1 = 32


x1 + 2x2 + 4x3 s2 + R2 = 28
x1, x2, x3 0

Artificial variables are added to get an identity sub matrix

27
Phase I: (construct an auxiliary LPP)
construct a new objective function in which the
coefficients of artificial variables are 1 and the
coefficients of all other variables are zero

Min r = R1 + R2 New objective function

2x1 + 4x2 + 3x3 s1 + R1 = 32


x1 + 2x2 + 4x3 s2 + R2 = 28
x1, x2, x3 0

Constraints

28
Basic x1 x2 x3 s1 s2 R1 R2 solution

r 0 0 0 0 0 -1 -1 0

R1 2 4 3 -1 0 1 0 32

R2 1 2 4 0 -1 0 1 28

form a new r row (similar to the manner in which new z- row is


formed in Big M method)

Thus
New r-row = r-row + R1 row + R2 row
29
Standard simplex table

Basic x1 x2 x3 s1 s2 R1 R2 solution

r 3 6 7 -1 -1 0 0 60

R1 2 4 3 -1 0 1 0 32

R2 1 2 4 0 -1 0 1 28

30
Applying the usual simplex method for solving a
minimization problem

Basic x1 x2 x3 s1 s2 R1 R2 solution Min.


ratio
r 3 6 7 -1 -1 0 0 60

R1 2 4 3 -1 0 1 0 32 32/3

R2 1 2 4 0 -1 0 1 28 28/4
4

31
Basic x1 x2 x3 s1 s2 R1 R2 solution

r 3/4 5/2 0 -1 7/4 0 -7/4 11

R1 5/4 5/2 0 -1 3/4 1 -3/4 11


5/2

x3 1/4 1/2 1 0 -1/4 0 1/4 7

32
Basic x1 x2 x3 s1 s2 R1 R2 solution

r 0 0 0 0 0 -1 -1 0

x2 1/2 1 0 -2/5 3/10 2/5 -3/10 22/5

x3 0 0 1 1/5 -2/5 -1/5 2/5 24/5

At this point both the artificial variables have completed their


purpose and hence their columns can be removed from the
table.

33
Phase II

We will use the BFS obtained in Phase-I as a starting


BFS of the given problem, and use simplex method to
find the optimal solution.

34
Form a simplex table
Basic x1 x2 x3 s1 s2 solution

z -4 -6 -5 0 0 0

x2 1/2 1 0 -2/5 3/10 22/5

x3 0 0 1 1/5 -2/5 24/5

Is this standard simplex table?

35
z row = z row + 6*(x2 row) + 5*(x3 row)

Basic x1 x2 x3 s1 s2 solution

z -1 0 0 -12/5 -2 252/5

x2 1/2 1 0 -2/5 3/10 22/5

x3 0 0 1 1/5 -2/5 24/5

Since all the conditions for optimality (for a minimization problem) are
being satisfied. Phase two ends at this point.

36
Solve using Two-Phase Method

Maximize z = 2 x1 + 3 x 2 5 x3

Subject to x1 + x 2 + x3 = 7
2 x1 5 x 2 + x3 10
x1 , x 2 , x3 0

37
Solve using Two Phase-Method

Maximize z = 2 x1 + 2 x2 + 4 x3

Subject to
2 x1 + x2 + x3 2
3 x1 + 4 x2 + 2 x3 8
x1 , x2 , x3 0

38
Consider the LPP:
Minimize z = 2 x1 + 5 x2 + 3 x3
Subject to
x1 2 x 2 + x 3 2 0
2 x1 + 4 x 2 + x 3 = 5 0
x1 , x 2 , x 3 0

39
Phase I:
Minimize r = R1 + R2

Subject to
x1 2 x2 + x3 s1 + R1 = 20
2 x1 + 4 x2 + x3 + R2 = 50
x1 , x2 , x3 , s1 , R1 , R2 0

40
Basic r x1 x2 x3 s1 R1 R2 Sol
3 2 2 -1 0 0 70
r 1 0 0 0 0 -1 -1 0
R1 0 1 -2 1 -1 1 0 20
R2 0 2 4 1 0 0 1 50
r 1 0 8 -1 2 -3 0 10

x1 0 1 -2 1 -1 1 0 20

R2 0 0 8 -1 2 -2 1 10

41
Basic r x1 x2 x3 s1 R1 R2 Sol

r 1 0 8 -1 2 -3 0 10
x1 0 1 -2 1 -1 1 0 20
R2 0 0 8 -1 2 -2 1 10
r 1 0 0 0 0 -1 -1 0

x1 0 1 0 3/4 -1/2 1/2 1/4 45/2

x2 0 0 1 -1/8 1/4 -1/4 1/8 5/4

42
This is optimal tableau. Thus Phase I has ended and we
now start Phase II with the starting BFS as the optimal
solution of Phase I.
Phase II:

Minimize z = 2 x1 + 5 x2 + 3x3

subject to the same constraints as given in the original


problem.

43
Basic z x1 x2 x3 s1 R1 R2 Sol
0 0 -17/8 1/4 205/4
z 1 -2 -5 -3 0 0
x1 0 1 0 3/4 -1/2 45/2
x2 0 0 1 -1/8 1/4 5/4
z 1 0 -1 -2 0 50

x1 0 1 2 1/2 0 25

s1 0 0 4 -1/2 1 5

Thus the optimal solution is : x1 = 25, x2 = 0, x3 = 0 and the


optimal z = Min z = 50.
44
 In Phase I we always minimize the sum of the
artificial variables.

 If in the optimal table of phase I an artificial variables


remains at non-zero level in the basis, then the problem
has no feasible solution.

45

You might also like