Sunteți pe pagina 1din 52

Contents

Special Cases in Simplex Method

Matrix Formulation of Simplex Method


Maximize z = x1 + 5 x2 + 3 x3

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

One artificial variable is sufficient here !!!!


Maximize z = 2 x1 + 4 x2 + 4 x3 3x4

Subject to
x1 + x2 + x3 =4
x1 + 4 x2 + x4 = 8
x1 , x2 , x3 , x4 0

Artificial variable not required !!!!


Some exceptional cases that may occur while
solving an LPP

 Degeneracy

 Alternative optimal Solutions

 Unbounded Solutions

 Infeasible Solutions
DEGENERACY
Degeneracy
During the application of Simplex method, a tie for the
minimum ratio may be broken arbitrarily.

When a tie happens at least one basic variable will be


zero in the next iteration and the new solution is said to
be degenerate.

One of the reasons for degeneracy may be due to the


presence of some redundant constraint.

Implication: Cycling or circling, the simplex table starts


repeating itself after some iterations, that is to say that
the value of the objective function do not improve after
a few iterations.
Solving the problem graphically

x2
Example 1 Constraint x1 + 4x2 8 is
redundant as it is not essential
Max z = 3x1 + 9x2 for finding the optimal solution

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

Optimal solution occurs at (0,2) with z = 18.


Solving by simplex method
Basic x1 x2 s1 s2 Sol.
Min. ratio
z -3 -9 0 0 0
8/4 = 2 Tie: Make
s1 1 4 1 0 8
arbitrary
s2 1 2 0 1 4 4/2 = 2 selection

Basic x1 x2 s1 s2 Sol. Min. ratio


z -3/4 0 9/4 0 18
x2 1/4 1 1/4 0 2 8
s2 1/2 0 -1/4 1 0 0

Basic x1 x2 s1 s2 Sol.
z 0 0 3/2 3/2 18
Optimality conditions are
x2 0 1 - 2 satisfied
x1 1 0 -1/2 2 0
How to remove degeneracy

 In two variables problems the redundant constraint can be


identified easily by graphical method.

 There are no reliable techniques for identifying redundant


constraints directly from the simplex table.
ALTERNATIVE OPTIMUM SOLUTION
ALTERNATIVE OPTIMUM SOLUTION

When the objective function is parallel to the binding


constraint (that is a constraint that is satisfied as an
equation at the optimal solution) then the objective
function will assume the same optimal value called
alternate optimal value at more then one solution point.
Optimal occurs at (3,1) and (0,2.5)
Example with optimum value as 10

Max z = 2x1 + 4x2


Subject to
x1 + 2x2 5 (0,2.5)
x1 + x2 4 (3,1)
x1, x2 0

(4,0)

Graphical Solution
Solving by simplex method

Basic x1 x2 s1 s2 Sol. Min. ratio


z -2 -4 0 0 0
s1 1 2 1 0 5 5/2
s2 1 1 0 1 4 4/1
Basic x1 x2 s1 s2 Sol. Optimality conditions are
z 0 0 2 0 10 satisfied, however it may be
noted that the coefficient
x2 1 0 5/2
(x1) corresponding to the
s2 0 -1/2 1 3/2 non basic variable is zero.

Basic x1 x2 s1 s2 Sol. This indicates that x1 can


enter the basic solution
z 0 0 2 0 10
without changing the
x2 0 1 1 -1 1 value of z, but causing a
x1 1 0 -1 2 3 change in the values of
variables
UNBOUNDED SOLUTION
Unbounded solution

 In some linear programming problems, the values of


variables may be increased indefinitely without violating the
constraints.

 This means that the solution space is unbounded in at least


one direction.

 As a result the objective function value may increase or


decrease indefinitely

 Unboundedness sometimes occur due to the poorly


constructed model. Some irregularities that may occur are
ignoring the non redundant constraints or the incorrect
estimation of parameters
The solution space is unbounded
in the direction of x2
x2
Example 1

Max z = 2x1 + x2
Subject to Unbounded
x1 - x2 10 optimal
2x1 40 space

x1, x2 0

x1

Graphical Solution
Solving by simplex method

Basic x1 x2 s1 s2 Sol.
z -2 -1 0 0 0
s1 1 -1 1 0 10
s2 2 0 0 1 40

Since x1 has the most negative coefficient, it is normally


selected as the entering variable.

But all the constraints under x2 are either negative or zero.


This means that x2 can be increased indefinitely without
violating any of the constraints. The feasible region is
unbounded in x2 direction.
Basic x1 x2 s1 s2 Sol.
z 0 -3 2 0 20
x1 1 -1 1 0 10
s2 0 2 -2 1 20

Basic x1 x2 s1 s2 Sol.
z 0 0 -1 3/2 50
x1 1 0 0 1/2 20
x2 0 1 -1 1/2 10

We have an entering variable but there is no leaving variable ???

Unbounded Solution.
INFEASIBLE SOLUTION
Infeasible solution

LP models with inconsistent constraints have no feasible


solution.

This situation can never occur when all the constraints are
).
of the type (

If one of the artificial variable remains positive in the


optimum iteration, then the solution space will be infeasible
No feasible solution space
Example
Max z = 3x1 + 2x2
Subject to
2x1 + x2 2 3x1 + 4x2 12

3x1 + 4x2 12
x1, x2 0

2x1 + x2 2
Solving by simplex method

B.V x1 x2 x4 x3 R Sol. Min. ratio


z -3 - 3M -2-4M M 0 0 -12M
x3 2 1 0 1 0 2 2/1
R 3 4 -1 0 1 12 12/4

B.V x1 x2 x4 x3 R Sol.n
z 1+5M 0 M 2+4M 0 4 4M
x2 2 1 0 1 0 2
R -5 0 -1 -4 1 4

The conditions for optimality are satisfied, however the artificial


variable R is positive in the final iteration. This indicates that the
problem is infeasible.
Consider the LPP
Max z = 2 x 1 x 2

Subject to
x1 x 2 10
2 x1 x 2 40
x1 , x 2 0
Basic z x1 x2 s1 s2 Sol. Ratio
z 1 -2 1 0 0 0
s1 0 1 -1 1 0 10 10
s2 0 2 -1 0 1 40 20
z 1 0 -1 2 0 20
x1 0 1 -1 1 0 10 -
s2 0 0 1 -2 1 20 20
z 1 0 0 0 1 40
x1 0 1 0 -1 1 30
x2 0 0 1 -2 1 20
Note that we have got the optimal tableau.
(30,20)

All points on this line from


(30,20) onwards are
Optimal nonbasic solutions.
Points to Remember
During the application of simplex method, a tie for a leaving
variable will give rise to degeneracy (break the tie arbitrarily).
Reason: Redundant constraints
If in the optimal simplex table a non basic variable is at zero
level in the z row then the problem has an alternate optimal
solution.
If in a simplex table we have an entering variable but there is
no leaving variable then the problem has an unbounded
solution.
Reason: Poor Formulation
If in an optimal simplex table an artificial variable remains at
non zero level then the problem has no feasible solution.
Reason: Poor Formulation
MATRIX FORMULATION
of
LINEAR PROGRAMMING PROBLEM
Consider the following LPP (standard form)

Max (or Min) z = c1 x1 + c2 x2 + ... + cn xn


Subject to
a11 x1 + a12 x 2 + ... + a1 n x n = b1
a 21 x1 + a 22 x 2 + ... + a 2 n x n = b 2
.
.
a m 1 x1 + a m 2 x 2 + ... + a m n x n = b m
x1 , x 2 , ..., x n 0, b1 , b 2 , ..., b m 0
Using the notations
x1 b1
x b
2 2
C = [ c1 c2 . . cn ] X = . , b= .
,
. .
xn bm

a1 1 a1 2 . . a1 n
a a 22 . . a 2 n
21
A = .

.
a m 1 am 2 . . a m n
To formalize the definition of a basic solution, the system AX =b
can be expressed in vector form as follows

n
A j x j = b
j=1
Where Aj is the jth column of A. A subset of m vectors is
said to form a basis, B, if and only if, the selected m vectors
are linearly independent. In this case, the matrix B is nonsingular.
If XB is the set of m variables associated with the vectors of
nonsingular B, then XB must be a basic solution. In this case,
we have
1
BXB = b X B = B b
The problem can be written as

1 c z 0
=

0 A X
b
Let B is a m x m non-singular sub-matrix of the
coefficient matrix A.
Let XB be the corresponding set of basic variables
with cB as its associated objective vector. The
corresponding solution (and the objective function
value ) may be computed as follows:

1 -c B z 0
X =
0 B B b
1
z 1 CB 0
X = 0 b
B B
1
z 1 CB B 0
=
X 1
B 0 B b
1
z C B B b C B X B
X = 1 = B 1 b
B B b
The general simplex tableau:

1 cB B 1 c z 1 cB B 0
1 1

1 = 1
0 B 0 A X 0 B b

Multiplying out the matrices, we get

1 1
1 cB B A - C z cB B b
1 = 1
0 B A X B b
Thus in the new simplex tableau the z column
will be 1
0

.

.
0

The column of xj (in the constraint equations)


will be B 1 A j ,
w h e re A j is the jth column of A.
i.e., the column corresponding to xj.
1
The solution column will be B b.
And in the z-row, the coefficient of xj will be
1
cBB Aj c j = z j c j
Finally the solution entry in the z-row will
be 1
c B b
B

In matrix form the new tableau will look like


Basic z X Solution
1 1
z 1 cB B A C cB B b
1
XB 0 1
B A B b
In terms of the components xj , the new
tableau will look like

Basic z xj Solution
1 1
z 1 cB B A j c j cB B b
1 1
XB 0 B Aj B b
Consider the following LPP
Maximize z = x1 x2 + 2x3
subject to 2 x1 2 x2 + 3x3 5
x1 + x2 x3 3
x1 x2 + x3 2
x1 , x2 , x3 0
After introducing the slack variables s1, s2 , s3 to the
respective constraints, the problem becomes

Maximize z = x1 x2 + 2x3
Subject to 2x1 2x2 + 3x3 + s1 =5
x1 + x2 x3 + s2 =3
x1 x2 + x3 + s3 = 2
x1, x2 , x3, s1, s2 , s3 0
So the starting simplex tableau is

Basic z x1 x2 x3 S1 S2 S3 Sol

z 1 -1 1 -2 0 0 0 0
S1 0 2 -2 3 1 0 0 5
S2 0 1 1 -1 0 1 0 3
S3 0 1 -1 1 0 0 1 2
After we apply the Simplex method a portion of
the tableau is as follows:

Basic z x1 x2 x3 s1 s2 s3 Sol

z 1 1 1 0
x2 0 1 3 0
s3 0 0 1 1
x3 0 1 2 0

Find the missing numbers.


Simplex Table

Basic z xj Solution
1 1
z 1 cB B A j c j cB B b
1 1
XB 0 B Aj B b
Since x 2 , s 3 , x 3 are the basic variables in the
final tableau in that order, the basic matrix B is
formed by the columns corresponding to these
variables in the starting tableau in that order.

2 0 3

B = 1 0 1
1 1 1
1 3 0
B 1
= 0 1 1
1 2 0

The new column corresponding to x1 in the


final tableau is
1 3 0 2 5
1
B A1 = 0 1 1 1 = 2

1 2 0 1 4
The new column corresponding to x2 in the final
tableau is
1
0

0
as it is the first basic variable in the final tableau.
The new column corresponding to x3 in the final
tableau is 0
0

1
as it is the third basic variable in the final tableau.
The solution column (in the constraint equations) in
the final tableau is
1 3 0 5 14
1
B b = 0 1 1 3 = 5 Now CB = [ 1 0 2]
1 2 0 2 11
Thus entry below x1 in z-row is CB B1 A1 c1 = 3-1=2

Entries below x2, x3 in z-row are zero as they are


basic variables.
14
solution z = CB B b = [ 1 0 2] 5 = 8
1

11
All these are shown below.
Answer:

Basic z x1 x2 x3 s1 s2 s3 Sol

z 1 2 0 0 1 1 0 8
x2 0 5 1 0 1 3 0 14
s3 0 2 0 0 0 1 1 5
x3 0 4 0 1 1 2 0 11
Consider the following LPP
Maximize z = 4x1 + 3x2 + x3 + 2x4
subject to

4 x1 + 2 x2 + x3 + x4 5
3x1 + x2 + 2 x3 + x4 4
x1 , x2 , x3 , x4 0
After introducing the slack variables s1, s2
to the respective constraints, the problem becomes

Maximize z = 4 x1 + 3 x2 + x3 + 2 x4
subject to
4 x1 + 2 x2 + x3 + x4 + s1 =5
3 x1 + x2 + 2 x3 + x4 + s2 = 4
x1 , x2 , x3 , x4 , s1 , s2 0
After we apply the Simplex method a portion of
the final tableau is as follows:

Basic z x1 x2 x3 x4 s1 s2 Sol

z
x2 1 -1
x4 -1 2

Find the missing entries.


Answer:

Basic z x1 x2 x3 x4 s1 s2 Sol

z 1 3 0 2 0 1 1 9
x2 0 1 1 -1 0 1 -1 1
x4 0 2 0 3 1 -1 2 3

S-ar putea să vă placă și