Home > Operation Research calculators > Simplex method example

1. Simplex (BigM) method example ( Enter your problem )

5. Degeneracy example-1 (Tie for leaving basic variable)

This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then Submit Here

Degeneracy example-1 (Tie for leaving basic variable)
During solving LP problem, a situation may arise in which there is a tie between, 2 or more basic variables for leaving the basis. (means minimum ratios are same).
It is called degeneracy and to resolve this we can select any of them arbitrarily.
But if artificial variable is present then it must be removed first.
Example
Find solution using Simplex(BigM) method
MAX Z = 3x1 + 9x2
subject to
x1 + 4x2 <= 8
x1 + 2x2 <= 4
and x1,x2 >= 0

Solution:
Problem is
 Max Z =  3 x_1  +  9 x_2
subject to
   x_1  +  4 x_2 ≤ 8   x_1  +  2 x_2 ≤ 4
and x_1,x_2 >= 0;

The problem is converted to canonical form by adding slack, surplus and artificial variables as appropiate

1. As the constraint-1 is of type '<=' we should add slack variable S_1

2. As the constraint-2 is of type '<=' we should add slack variable S_2

After introducing slack variables
 Max Z =  3 x_1  +  9 x_2  +  0 S_1  +  0 S_2
subject to
   x_1  +  4 x_2  +   S_1 = 8   x_1  +  2 x_2  +   S_2 = 4
and x_1,x_2,S_1,S_2 >= 0

 Iteration-1 C_j 3 9 0 0 B C_B X_B x_1 x_2 Entering variable S_1 S_2 MinRatio (X_B)/(x_2) S_1 0 8 1 4 1 0 (8)/(4)=2 S_2 Leaving variable 0 4 1 (2)  (pivot element) 0 1 (4)/(2)=2-> Z=0 0=Z_j=sum C_B X_B Z_j Z_j=sum C_B x_j 0 0=0xx1+0xx1Z_j=sum C_B x_1 0 0=0xx4+0xx2Z_j=sum C_B x_2 0 0=0xx1+0xx0Z_j=sum C_B S_1 0 0=0xx0+0xx1Z_j=sum C_B S_2 C_j-Z_j 3 3=3-0 9 9=9-0uarr 0 0=0-0 0 0=0-0

Positive maximum C_j-Z_j is 9 and its column index is 2. So, the entering variable is x_2.

Minimum ratio is 2 and its row index is 2. So, the leaving basis variable is S_2.

:. The pivot element is 2.

Entering =x_2, Departing =S_2, Key Element =2

R_2(new)= R_2(old)-: 2

R_1(new)= R_1(old)- 4 R_2(new)

 Iteration-2 C_j 3 9 0 0 B C_B X_B x_1 x_2 S_1 S_2 MinRatio S_1 0 0 0=8-4xx2R_1(new)= R_1(old)- 4 R_2(new) -1 -1=1-4xx1/2R_1(new)= R_1(old)- 4 R_2(new) 0 0=4-4xx1R_1(new)= R_1(old)- 4 R_2(new) 1 1=1-4xx0R_1(new)= R_1(old)- 4 R_2(new) -2 -2=0-4xx1/2R_1(new)= R_1(old)- 4 R_2(new) x_2 9 2 2=4-:2R_2(new)= R_2(old)-: 2 1/2 1/2=1-:2R_2(new)= R_2(old)-: 2 1 1=2-:2R_2(new)= R_2(old)-: 2 0 0=0-:2R_2(new)= R_2(old)-: 2 1/2 1/2=1-:2R_2(new)= R_2(old)-: 2 Z=18 18=9xx2Z_j=sum C_B X_B Z_j Z_j=sum C_B x_j 9/2 9/2=0xx(-1)+9xx1/2Z_j=sum C_B x_1 9 9=0xx0+9xx1Z_j=sum C_B x_2 0 0=0xx1+9xx0Z_j=sum C_B S_1 9/2 9/2=0xx(-2)+9xx1/2Z_j=sum C_B S_2 C_j-Z_j -3/2 -3/2=3-(9/2) 0 0=9-9 0 0=0-0 -9/2 -9/2=0-(9/2)

Since all C_j-Z_j <= 0

Hence, optimal solution is arrived with value of variables as :
x_1=0,x_2=2

Max Z = 18