Download Simplex algorithm for problems with bounded variables

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Singular-value decomposition wikipedia , lookup

Matrix multiplication wikipedia , lookup

Matrix calculus wikipedia , lookup

System of linear equations wikipedia , lookup

Principal component analysis wikipedia , lookup

Coefficient of determination wikipedia , lookup

Transcript
Simplex algorithm
for
problems with bounded variables
Simplex method for
problems with bounded variables
• Consider the linear programming problem with bounded variables
min c T g
s.t. Ag = h
lj ≤ g j ≤ qj
j = 1, 2,..., n
where g , c, l , q ∈ R n , h ∈ R m , and A is a m × n matrix
• Complete the following change of variables to reduce the lower bound to 0
xj = gj – lj (i.e., gj = xj + lj )
Simplex method for
problems with bounded variables
min c T g
s.t. Ag = h
lj ≤ g j ≤ qj
the problem becomes
min c T ( x + l )
s.t. A( x + l ) = h
lj ≤ xj + lj ≤ qj
j = 1, 2,..., n
j = 1, 2,..., n
where c, x, l , q ∈ R n , h ∈ R m , and A is a m × n matrix
•
Complete the following change of variables to reduce the lower bound to 0
xj = gj – lj
(i.e., gj = xj + lj )
Simplex method for
problems with bounded variables
the problem becomes
min c T ( x + l )
s.t. A( x + l ) = h
lj ≤ xj + lj ≤ qj
j = 1, 2,..., n
where c, x, l , q ∈ R n , h ∈ R m , and A is a m × n matrix
min c T x + c T l
s.t. Ax = h − Al
lj − lj ≤ xj + lj − lj ≤ qj − lj
replacing : uj = qj – lj and
j = 1, 2,..., n
b = h – Al
min c T x + c T l
s.t. Ax = b
0 ≤ xj ≤ uj
j = 1, 2,..., n
Simplex method for
problems with bounded variables
• In this problem
c T l + min c T x + c T l
s.t. Ax = b
0 ≤ xj ≤ uj
j = 1, 2,..., n
since cTl is a constant, we can eliminate it from the minimisation without
modifying the optimal solution.
Then in the rest of the presentation we consider the problem without this
constant.
min c T x + c T l
s.t. Ax = b
0 ≤ xj ≤ uj
• Consider the explicit formulation of the problem
n n
min z z= =∑∑
min
c jcxjjx j
j =1j =1
n
s.t.
s.t.
n
a xa =x b
∑∑
ij j ij
j =1 j =1
j i
i =m1, 2,..., m
=
i =bi1, 2,...,
0 ≤ x xj ≤
u j j = ujj = 1, 2,...,
n 2,..., n
j = 1,
j + y
xj , yj ≥ 0
j = 1, 2,..., n
• One way of solving the problem is to introduce slack variables yj,
and then use the simplex algorithm.
j = 1, 2,..., n
n
min z = ∑ c j x j
Tableau with m + n rows
j =1
n
s.t.
∑a x
ij
= bi
i = 1, 2,..., m
xj + yj = uj
j = 1, 2,..., n
xj , yj ≥ 0
j = 1, 2,..., n
j
j =1
n
min z = ∑ c j x j
Tableau with m rows
j =1
n
s.t.
∑a x
= bi
i = 1, 2,..., m
0 ≤ xj ≤ uj
j = 1, 2,..., n
ij
j
j =1
account implicitly
n
min z = ∑ c j x j
j =1
n
s.t.
∑a x
ij
j
= bi
j =1
xj + yj = uj
xj , yj ≥ 0
i = 1, 2,..., m
Non degeneracy:
j = 1, 2,..., n all the basic variables
are positive at
j = 1, 2,..., n each iteration
• Consider a basic feasible solution of this problem
• Because of the constraints xj + yj = uj, at least one of the variables xj or yj is
basic, j = 1,2,…,n.
• Then for all j = 1,2,…,n, one of the three situations holds:
a) xj = uj is basic and yj = 0 is non basic
b) xj = 0 is non basic and yj = uj is basic
c) 0 < xj < uj is basic and 0 < yj < uj is basic
a) x j basic; y j non basic
b) x j non basic; y j basic
c) x j basic; y j basic
n
min z =
∑c x
j
j
j =1
n
Sujet à
∑a
= bi
i = 1,2,..., m
xj + yj =uj
j = 1,2,..., n
xj , yj ≥0
j = 1,2,..., n
ij x j
j =1
m + n basic variables required
There are n variables yj
⇓
There are at least m variables xj
that are basic
Exactly m variables xj satisfying
0 < xj < uj.
For contradiction, if m0 ≠ m variables xj
satisfy the relation, then the
m0 corresponding variables yj would be
basic.
Furthermore, for the n – m0 other indices j,
either xj = uj (case a) or yj = uj (case b)
would be verified.
Then the number of basic variables
would be equal to
2m0 + (n – m0) = m0 + n ≠ m + n
a) x j basic; y j non basic
b) x j non basic; y j basic
c) x j basic; y j basic
n
min z =
∑c x
j
j
j =1
n
Sujet à
∑a
= bi
i = 1,2,..., m
xj + yj =uj
j = 1,2,..., n
xj , yj ≥0
j = 1,2,..., n
ij x j
j =1
m + n basic variables required
There are n variables yj
⇓
There are at least m variables xj
that are basic
Exactly m variables xj satisfying
0 < xj < uj.
For contradiction, if m0 ≠ m variables xj
satisfy the relation, then the
m0 corresponding variables yj would be
basic.
Furthermore, for the n – m0 other indices j,
either xj = uj (case a) or yj = uj (case b)
would be verified.
Then the number of basic variables
would be equal to
2m0 + (n – m0) = m0 + n ≠ m + n
n
min z =
La base a donc la forme suivante
∑c x
j
j
j =1
n
∑a x
s.t.
ij
= bi
j
i = 1, 2,..., m
j =1
xj + yj = uj
xj , yj ≥ 0
j = 1, 2,..., n
j = 1, 2,..., n
m
min z = c T x
s.t.
Ax + 0 y = b
Ix + Iy = u
x, y ≥ 0
m
 A 0
 I I 
n
To simplify notation, assume
the following basic variables:
0 < xj < uj
0 < yj < uj
xj=uj
yj=uj
0 < xi < ui
i = 1,… , m
0 < yi < ui
i = 1,…, m
xi = ui
i = m + 1,… , m + l
yi = ui
i = m + l + 1,…, m + n
n
min z =
The basis has the following form
∑c x
j
j
j =1
n
∑a x
s.t.
ij
j
= bi
i = 1, 2,..., m
j =1
xj + yj = uj
xj , yj ≥ 0
j = 1, 2,..., n
j = 1, 2,..., n
m
min z = c T x
Ax + 0 y = b
s.t.
Ix + Iy = u
min z = c x
Sujet à Ax + 0 y = b
x, y ≥ 0
T
Ix + Iy = u
x, y ≥ 0
m
1
 A 0
 I I 
1
n
2
To simplify notation, assume
the following basic variables:
3
0 < xj < uj
m
0 < yj < uj
m
xj=uj
yj=uj
n−m
0 < xi < ui
i = 1,…, m
0 < yi < ui
i = 1,…, m
xi = ui
i = m + 1,…, m + l
yi = ui
i = m + l + 1,… , m + n
B 0 D 0 
 I1 I 1 0 0 
Ξ= 
0 0 I2 0 


0
0
0
I
3

 B 0 D 0
I

= 1
0 I 


0


where the matrix I is n × n


 I1   


det ( Ξ ) = det ( I ) det ( B ) − det  [0 D 0] I −1  0   

 0   

  


= det ( I ) det ( B ) − det 0
{
( )}
where the matrix 0 is m × m since
[0 D 0] is a m × n matrix and
 I1 
0  is a n × m matrix
0 
 
Then
det ( Ξ ) = det ( I ) det ( B ) .
Since Ξ is a basis, then det ( Ξ ) ≠ 0.
Consequently det ( B ) = det ( Ξ ) ≠ 0 and then B is non singular.
Then B is a basis of A.
B 0 D 0 
 I1 I 1 0 0 
Ξ= 
0 0 I2 0 


0
0
0
I
3

 B 0 D 0
I

= 1
0 I 


0


where the matrix I is n × n


 I1   


det ( Ξ ) = det ( I ) det ( B ) − det  [0 D 0] I −1  0   

 0   

  


= det ( I ) det ( B ) − det 0
{
( )}
where the matrix 0 is m × m since
[0 D 0] is a m × n matrix and
 I1 
0  is a n × m matrix
0 
 
Then
det ( Ξ ) = det ( I ) det ( B ) .
Since Ξ is a basis, then det ( Ξ ) ≠ 0.
Consequently det ( B ) = det ( Ξ ) ≠ 0 and then B is non singular.
Then B is a basis of A.
B 0 D 0 
 I1 I 1 0 0 
Ξ= 
0 0 I2 0 


0
0
0
I
3

 B 0 D 0
I

= 1
0 I 


0


a b 
det 
 = ad − bc
c
d


= d ( a − bd −1c )
where the matrix I is n × n


 I1   


det ( Ξ ) = det ( I ) det ( B ) − det  [0 D 0] I −1  0   

 0   

  


= det ( I ) det ( B ) − det 0
{
( )}
where the matrix 0 is m × m since
[0 D 0] is a m × n matrix and
 I1 
0  is a n × m matrix
0 
 
Then
det ( Ξ ) = det ( I ) det ( B ) .
Since Ξ is a basis, then det ( Ξ ) ≠ 0.
Consequently det ( B ) = det ( Ξ ) ≠ 0 and then B is non singular.
Then B is a basis of A.
B 0 D 0 
 I1 I 1 0 0 
Ξ= 
0 0 I2 0 


0
0
0
I
3

 B 0 D 0
I

= 1
0 I 


0


a b 
det 
 = ad − bc
c
d


= d ( a − bd −1c )
where the matrix I is n × n


 I1   


det ( Ξ ) = det ( I ) det ( B ) − det  [0 D 0] I −1  0   

 0   

  


= det ( I ) det ( B ) − det 0
{
( )}
where the matrix 0 is m × m since
[0 D 0] is a m × n matrix and
 I1 
0  is a n × m matrix
0 
 
Then
det ( Ξ ) = det ( I ) det ( B ) .
Since Ξ is a basis, then det ( Ξ ) ≠ 0.
Consequently det ( B ) = det ( Ξ ) ≠ 0 and then B is non singular.
Then B is a basis of A.
B 0 D 0 
 I1 I 1 0 0 
Ξ= 
0 0 I2 0 


0
0
0
I
3

 B 0 D 0
I

= 1
0 I 


0


a b 
det 
 = ad − bc
c
d


= d ( a − bd −1c )
where the matrix I is n × n


 I1   


det ( Ξ ) = det ( I ) det ( B ) − det  [0 D 0] I −1  0   

 0   

  


= det ( I ) det ( B ) − det 0
{
( )}
where the matrix 0 is m × m since
[0 D 0] is a m × n matrix and
 I1 
0  is a n × m matrix
0 
 
Then
det ( Ξ ) = det ( I ) det ( B ) .
Since Ξ is a basis, then det ( Ξ ) ≠ 0.
Consequently det ( B ) = det ( Ξ ) ≠ 0 and then B is non singular.
Then B is a basis of A.
B 0 D 0 
 I1 I 1 0 0 
Ξ= 
0 0 I2 0 


0
0
0
I
3

 B 0 D 0
I

= 1
0 I 


0


a b 
det 
 = ad − bc
c
d


= d ( a − bd −1c )
where the matrix I is n × n


 I1   


det ( Ξ ) = det ( I ) det ( B ) − det  [0 D 0] I −1  0   

 0   

  


= det ( I ) det ( B ) − det 0
{
( )}
where the matrix 0 is m × m since
[0 D 0] is a m × n matrix and
 I1 
0  is a n × m matrix
0 
 
Then
det ( Ξ ) = det ( I ) det ( B ) .
Since Ξ is a basis, then det ( Ξ ) ≠ 0.
Consequently det ( B ) = det ( Ξ ) ≠ 0 and then B is non singular.
Then B is a basis of A.
B 0 D 0 
 I1 I 1 0 0 
Ξ= 
0 0 I2 0 


0
0
0
I
3

 B 0 D 0
I

= 1
0 I 


0


a b 
det 
 = ad − bc
c
d


= d ( a − bd −1c )
where the matrix I is n × n


 I1   


det ( Ξ ) = det ( I ) det ( B ) − det  [0 D 0] I −1  0   

 0   

  


= det ( I ) det ( B ) − det 0
{
( )}
where the matrix 0 is m × m since
[0 D 0] is a m × n matrix and
 I1 
0  is a n × m matrix
0 
 
Then
det ( Ξ ) = det ( I ) det ( B ) .
Since Ξ is a basis, then det ( Ξ ) ≠ 0.
Consequently det ( B ) = det ( Ξ ) ≠ 0 and then B is non singular.
Then B is a basis of A.
The basis has the following form
m
Basis of A
1
The columns of
the basis B of A
are those of
the variables
0<xj<uj
1
n
2
3
0 < xj < uj
0 < yj < uj
xj=uj
yj=uj
• Then, we can specify a variant of the simplex method to solve this problem
specifically:
n
min z = ∑ c j x j
j =1
n
s.t.
∑a x
= bi
i = 1, 2,..., m
0 ≤ xj ≤ uj
j = 1, 2,..., n
ij
j
j =1
by dealing implictly with the upper bound uj. At each iteration, we consider
a solution (basic) associated with a basis B de A having
m basic variables
0 < xj < uj
j ∈ IB
n – m non basic variables x j = 0 ou u j
j ∈ JB
n
min z =
∑c x
j
j
j =1
n
s.t.
∑a x
ij
j
= bi
i = 1, 2,..., m
j =1
xj + yj = uj
xj , yj ≥ 0
j = 1, 2,..., n
j = 1, 2,..., n
• At each iteration, we consider a solution (basic) associated with a basis B
de A having
0 < xj < uj
j ∈ IB
m basic variables
n – m non basic variables x j = 0 or u j
j ∈ JB
• Denote the indices of the basic variables IB = {j1, j2, …, jm} where ji is the
index of the basic variable in the ith row, then
x j = 0 ou u j
j ∈ JB
∑∑
1,2m
,..., m
x ji =xbjii =− b i − a ij x aj ij x j i = 1,i2=,...,
j∈JB j∈JB
Dependent
variables
r.h.s.
We find similar
values as in problems
where there are no
upper bounds, except for
non basic variables
x j = 0 or u j
j ∈ JB
We find similar
values as in problems
where there are no
upper bounds, except for
non basic variables
x j = 0 or u j
j ∈ JB
We have to modify the entering criterion
and the leaving criterion accordingly to
generate a variant of the simplex algorithm
for this problem
Step 1: Selecting the entering variable
The criterion to select the entering variable must be modified to account
for the non basic variables xj being equal to their upper bounds uj since
these variables can be reduced.
Hence, for an index j ∈ JB
if x j = 0 and c j < 0 , it is interesting to increase xj
if x j = u j and c j > 0 , it is interesting to decrease xj
{c
= min { c , −c }
Determine c s1 = min
j∈JB
Let c s
s1
s2
j
}
{
: x j = 0 and c s2 = max c j : x j = u j
(max { c
j∈JB
s1
, c s2
}
})
If c s ≥ 0, then the solution is optimal, and the algoithm stops.
If c s < 0 and c s = c s1 , then the non basic variable xs increases, and go to Step 2.1.
If c s < 0 et c s < c s1 , then the non basic variable xs decreases, and go to Step 2.2.
Step 2.1: Selecting the leaving variable
• The increase θ of the entering
variable xs is stop by the first of
the following three situations
happening:
i) xs reach its upper bound us
ii) a basic variable x jr decreases
to 0 (in this case a rs > 0)
iii) a basic variable x jr
increases to reach its upper
bound u jr (in ths case
a rs < 0 )
0 ≤ x j1 = g − a1s ( 0 + θ ) ≤ u j1
1
0 ≤ x jr = g − ars ( 0 + θ ) ≤ u jr
r
0 ≤ x jm = g
m
− ams ( 0 + θ ) ≤ u jm
xs = 0 + θ ≤ u s
Let
gi = b i −
∑ a ij x j
j∈JB
θ

 gi
= min u s , min 
 1≤ i ≤ m  a is
: a is
Value of the
basic variables
x ji

 u ji − g i
> 0  , min 
 1≤ i ≤ m  − a is

: a is < 0 

For all i such that ais > 0, then x ji decreases
when xs increases of the value θ . It follows
x ji =gi − aisθ ≥ 0 ⇔ aisθ ≤ gi
g
⇔ θ≤ i.
ais
g

Then θ ≤ min  i : ais > 0 
1≤ i ≤ m a
 is

Step 2.1: Selecting the leaving variable
• The increase θ of the entering
variable xs is stop by the first of
the following three situations
happening:
i) xs reach its upper bound us
ii) a basic variable x jr decreases
to 0 (in this case a rs > 0)
iii) a basic variable x jr
increases to reach its upper
bound u jr (in ths case
a rs < 0 )
0 ≤ x j1 = g − a1s ( 0 + θ ) ≤ u j1
1
0 ≤ x jr = g − ars ( 0 + θ ) ≤ u jr
r
0 ≤ x jm = g
m
− ams ( 0 + θ ) ≤ u jm
xs = 0 + θ ≤ u s
Let
gi = b i −
∑ a ij x j
j∈JB
θ

 gi
= min u s , min 
 1≤ i ≤ m  a is
: a is
Value of the
basic variables
x ji

 u ji − g i
> 0  , min 
 1≤ i ≤ m  − a is

: a is < 0 
For all i such that ais < 0, then x ji increses
Si θxs =increases
∞, alors of
le the
problème
pas
when
value θn’est
. It follows
θ ≤ u ji ⇔ − aet
x ji =borné
gi − aisinférieurement
≤ u ji − gi
isθl’algorithme
s’arrête.
u j − gi
⇔ θ≤ i
.
−ais
 u j − gi

Then θ ≤ min  i
: ais < 0 
1≤ i ≤ m
 −ais


Step 2.1: Selecting the leaving variable
• The increase θ of the entering
variable xs is stop by the first of
the following three situations
happening:
i) xs reach its upper bound us
ii) a basic variable x jr decreases
to 0 (in this case a rs > 0)
iii) a basic variable x jr
increases to reach its upper
bound u jr (in ths case
a rs < 0 )
0 ≤ x j1 = g − a1s ( 0 + θ ) ≤ u j1
1
0 ≤ x jr = g − ars ( 0 + θ ) ≤ u jr
r
0 ≤ x jm = g
m
− ams ( 0 + θ ) ≤ u jm
xs = 0 + θ ≤ u s
Let
gi = b i −
∑ a ij x j
j∈JB
θ

 gi
= min u s , min 
 1≤ i ≤ m  a is
: a is
Value of the
basic variables
x ji

 u ji − g i
> 0  , min 
 1≤ i ≤ m  − a is
If θ = ∞, then the problem is not
bounded from below, and the
algorithm stops.

: a is < 0 

Step 2.1: Selecting the leaving variable
• The increase θ of the entering
variable xs is stop by the first of
the following three situations
happening:
i) xs reach its upper bound us
ii) a basic variable x jr decreases
to 0 (in this case a rs > 0)
iii) a basic variable x jr
increases to reach its upper
bound u jr (in ths case
a rs < 0 )
0 ≤ x j1 = g − a1s ( 0 + θ ) ≤ u j1
1
0 ≤ x jr = g − ars ( 0 + θ ) ≤ u jr
r
0 ≤ x jm = g
m
− ams ( 0 + θ ) ≤ u jm
xs = 0 + θ ≤ u s
Let
gi = b i −
∑ a ij x j
j∈JB
θ

 gi
= min u s , min 
 1≤ i ≤ m  a is
: a is
Value of the
basic variables
x ji

 u ji − g i
> 0  , min 
 1≤ i ≤ m  − a is
If x s = u s , then the set of basic variables
is not modified, and the same basis is
used at the next iteration.
the variable x s remains non basic
but its value is modified from 0 to u s .
Go to step 1.

: a is < 0 

Step 2.1: Selecting the leaving variable
• The increase θ of the entering
variable xs is stop by the first of
the following three situations
happening:
i) xs reach its upper bound us
ii) a basic variable x jr decreases
to 0 (in this case a rs > 0)
iii) a basic variable x jr
increases to reach its upper
bound u jr (in ths case
a rs < 0 )
0 ≤ x j1 = g − a1s ( 0 + θ ) ≤ u j1
1
0 ≤ x jr = g − ars ( 0 + θ ) ≤ u jr
r
0 ≤ x jm = g
m
− ams ( 0 + θ ) ≤ u jm
xs = 0 + θ ≤ u s
Let
gi = b i −
∑ a ij x j
j∈JB
θ

 gi
= min u s , min 
 1≤ i ≤ m  a is
: a is
Value of the
basic variables
x ji

 u ji − g i
> 0  , min 
 1≤ i ≤ m  − a is
g

= min  i : a is > 0  ,
a rs 1≤i ≤ m  a is

then the value on the entretring variable x s
If θ =
gr
increases to θ .
The entering variable x s becomes a basic
variable replacing the leaving variable x jr
becoming a non basic variable equal to 0
Pivot on a jr s , and go to step 1.

: a is < 0 

Step 2.1: Selecting the leaving variable
• The increase θ of the entering
variable xs is stop by the first of
the following three situations
happening:
i) xs reach its upper bound us
ii) a basic variable x jr decreases
to 0 (in this case a rs > 0)
iii) a basic variable x jr
increases to reach its upper
bound u jr (in ths case
a rs < 0 )
0 ≤ x j1 = g − a1s ( 0 + θ ) ≤ u j1
1
0 ≤ x jr = g − ars ( 0 + θ ) ≤ u jr
r
0 ≤ x jm = g
m
− ams ( 0 + θ ) ≤ u jm
xs = 0 + θ ≤ u s
Let
gi = b i −
∑ a ij x j
j∈JB
θ

 gi
= min u s , min 
 1≤ i ≤ m  a is
: a is
Value of the
basic variables
x ji

 u ji − g i
> 0  , min 
 1≤ i ≤ m  − a is
uj − gi

= min  i
: a is < 0  ,
1≤ i ≤ m
− a rs
 − a is

then the value on the entretring variable x s
If θ =
u jr − g r
increases to θ .
The entering variable x s becomes a basic
variable replacing the leaving variable x jr
becoming a non basic variable equal to u jr
Pivot on a jr s , and go to step 1.

: a is < 0 

Step 1: Selecting the entering variable
The criterion to select the entering variable must be modified to account
for the non basic variables xj being equal to their upper bounds uj since
these variables can be reduced.
Hence, for an index j ∈ JB
if x j = 0 and c j < 0 , it is interesting to increase xj
if x j = u j and c j > 0 , it is interesting to decrease xj
{c
= min { c , −c }
Determine c s1 = min
j∈JB
Let c s
s1
s2
j
}
{
: x j = 0 and c s2 = max c j : x j = u j
(max { c
j∈JB
s1
, c s2
}
})
If c s ≥ 0, then the solution is optimal, and the algoithm stops.
If c s < 0 and c s = c s1 , then the non basic variable xs increases, and go to Step 2.1.
If c s < 0 et c s < c s1 , then the non basic variable xs decreases, and go to Step 2.2.
Step 2.2: Selecting the leaving variable
• The decrease θ of the entering
variable xs is stop by the first of
the following three situations
happening:
i) xs reduces to 0
ii) a basic variable x jr decreases
to 0 (in this case a rs < 0 )
iii) a basic variable x jr
increases to reach its upper
bound u jr (in this case
a rs > 0 )
0 ≤ x j1 = g − a1s ( −θ ) ≤ u j1
1
0 ≤ x jr = g − a rs ( −θ ) ≤ u jr
r
0 ≤ x jm = g
m
− ams ( −θ ) ≤ u jm
xs = us − θ ≥ 0
Let
gi = b i −
∑ a ij x j
j∈JB
θ

 g
= min  u s , min  i
 1≤i ≤ m  − a is
: a is
Value of the
basic variables
x ji
 u ji − g i

< 0  , min 
 1≤i ≤ m  a is

: a is > 0 

For all i such that ais < 0, then x ji decreases
when xs decreases of the value θ . It follows
x ji =gi − ais ( −θ ) ≥ 0 ⇔ − aisθ ≤ gi
g
⇔ θ≤ i .
− ais
 g

Then θ ≤ min  i : ais < 0 
1≤ i ≤ m − a
 is

Step 2.2: Selecting the leaving variable
• The decrease θ of the entering
variable xs is stop by the first of
the following three situations
happening:
i) xs reduces to 0
ii) a basic variable x jr decreases
to 0 (in this case a rs < 0 )
iii) a basic variable x jr
increases to reach its upper
bound u jr (in ths case
a rs > 0 )
0 ≤ x j1 = g − a1s ( −θ ) ≤ u j1
1
0 ≤ x jr = g − a rs ( −θ ) ≤ u jr
r
0 ≤ x jm = g
m
− ams ( −θ ) ≤ u jm
xs = us − θ ≥ 0
Let
gi = b i −
∑ a ij x j
j∈JB
θ

 g
= min  u s , min  i
 1≤i ≤ m  − a is
: a is
Value of the
basic variables
x ji
 u ji − g i

< 0  , min 
 1≤i ≤ m  a is

: a is > 0 
For all i such that ais > 0, then x ji increases
when xs decreasess of the value θ . It follows
x ji =gi − ais ( −θ ) ≤ u ji ⇔ aisθ ≤ u ji − gi
u ji − gi
⇔ θ≤
.
ais
 u ji − gi

Then θ ≤ min 
: ais > 0 
1≤ i ≤ m
 ais


Step 2.2: Selecting the leaving variable
• The decrease θ of the entering
variable xs is stop by the first of
the following three situations
happening:
θ
i) xs reduces to 0
ii) a basic variable x jr decreases
to 0 (in this case a rs < 0 )
iii) a basic variable x jr
increases to reach its upper
bound u jr (in ths case
a rs > 0 )
0 ≤ x j1 = g − a1s ( −θ ) ≤ u j1
1
0 ≤ x jr = g − a rs ( −θ ) ≤ u jr
r
0 ≤ x jm = g
m
− ams ( −θ ) ≤ u jm
xs = us − θ ≥ 0
Let
gi = b i −
∑ a ij x j
j∈JB

 g
= min  u s , min  i
 1≤i ≤ m  − a is
: a is
Value of the
basic variables
x ji
 u ji − g i

< 0  , min 
 1≤i ≤ m  a is
If θ = u s , then the set of basic variables
is not modified, and the same basis is
used at the next iteration.
the variable x s remains non basic
but its value is modified from u s to 0.
Go to step 1.

: a is > 0 

Step 2.2: Selecting the leaving variable
• The decrease θ of the entering
variable xs is stop by the first of
the following three situations
happening:
θ
i) xs reduces to 0
ii) a basic variable x jr decreases
to 0 (in this case a rs < 0 )
iii) a basic variable x jr
increases to reach its upper
bound u jr (in ths case
a rs > 0 )
Let
gi = b i −
∑ a ij x j
j∈JB

 g
= min  u s , min  i
 1≤i ≤ m  − a is
: a is
Value of the
basic variables
x ji
 u ji − g i

< 0  , min 
 1≤i ≤ m  a is
 g

= min  i : a is < 0  ,
− a rs 1≤i ≤ m  − a is

then the value on the entretring variable x s
If θ =
gr
0 ≤ x j1 = g − a1s ( −θ ) ≤ u j1
is reduced by θ (i.e., x s ← u s − θ ).
The entering variable x s becomes a basic
1
0 ≤ x jr = g − a rs ( −θ ) ≤ u jr
r
0 ≤ x jm = g
m
− ams ( −θ ) ≤ u jm
xs = us − θ ≥ 0
variable replacing the leaving variable x jr
becoming a non basic variable equal to 0
Pivot on a jr s , and go to step 1.

: a is > 0 

Step 2.2: Selecting the leaving variable
• The decrease θ of the entering
variable xs is stop by the first of
the following three situations
happening:
θ
i) xs reduces to 0
ii) a basic variable x jr decreases
to 0 (in this case a rs < 0 )
iii) a basic variable x jr
increases to reach its upper
bound u jr (in ths case
a rs > 0 )
Let
gi = b i −
∑ a ij x j
j∈JB

 g
= min  u s , min  i
 1≤i ≤ m  − a is
: a is
Value of the
basic variables
x ji
 u ji − g i

< 0  , min 
 1≤i ≤ m  a is
uj − gi

= min  i
: a is > 0  ,
1≤ i ≤ m
a rs
 a is

then the value on the entretring variable x s
If θ =
u jr − g r
0 ≤ x j1 = g − a1s ( −θ ) ≤ u j1
is reduced by θ (i.e., x s ← u s − θ ).
The entering variable x s becomes a basic
1
0 ≤ x jr = g − a rs ( −θ ) ≤ u jr
r
0 ≤ x jm = g
m
− ams ( −θ ) ≤ u jm
xs = us − θ ≥ 0
variable replacing the leaving variable x jr
becoming a non basic variable equal to u jr
Pivot on a jr s , and go to step 1.

: a is > 0 

References
M.S. Bazaraa, J.J. Jarvis, H.D. Sherali, “ Linear Programming and Network
Flows”, 3rd edition, Wiley-Interscience (2005), p. 217
F.S. Hillier, G.J. Lieberman, “Introduction to Operations Research”, Mc Graw
Hill (2005), Section 7.3
D. G. Luenberger, “ Linear and Nonlinear Programming ”, 2nd edition,
Addison-Wesley (1984), Section 3.6