Lecture 13
Lecture 13
Oskar Kędzierski
16 January 2023
Simplex Method
Simplex method is an algorithm solving linear programming
problems presented in a standard form. It was invented by George
Dantzig in 1947.
Simplex Method
Simplex method is an algorithm solving linear programming
problems presented in a standard form. It was invented by George
Dantzig in 1947.
f ppx1 , . . . , xn qq “ c1 x1 ` . . . ` cn xn ÝÑ min
under the constraints
$
’
’
’
a11 x1 ` a12 x2 ` ` a1n xn “ b1
` ` ` “ b2
...
& a21 x1 a22 x2 a2n xn
ě0
...
. .. .. .. .. , x1 , . . . , xn
’
’ .. . . . .
’
%
am1 x1 ` am2 x2 ` ... ` amn xn “ bm
Simplex Method
Set
» fi » fi » fi
a11 ¨¨¨ a1n x1 b1
— .. .. ffi , x — .. ffi — .. ffi
A“– . ..
. . fl “ – . fl, b “– . fl
am1 ¨¨¨ amn xn bm
x2
3
maximize x1 ` 2x2
$ x1 ě
2
p3, 2q &x ě
0
0
` ď
2
1 %´2xx1 `
x2
3x2 ď
8
3
x1 1
0
´1 0 1 2 3 4
´1
Example
x2
3
maximize x1 ` 2x2
$ x1 ě
2
p3, 2q &x ě
0
0
` ď
2
1 %´2xx1 `
x2
3x2 ď
8
3
x1 1
0
´1 0 1 2 3 4
´1
Example
x1 ` 2x2 “7
x2
3
maximize x1 ` 2x2
$ x1 ě
2
p3, 2q &x ě
0
0
` ď 8
2
1 %´2xx1 `
x2
3x2 ď 3
x1 1
´1
Example
We start from the basic feasible set B1 “ t3, 4u. The basic
variables are x3 , x4 and the non-basic ones are x1 , x2 .
Example
We start from the basic feasible set B1 “ t3, 4u. The basic
variables are x3 , x4 and the non-basic ones are x1 , x2 . The feasible
basic solution is x B1 “ p0, 0, 8, 3q which be computed directly from
"
2x1 ` x2 ` x3 “ 8
´x 1 ` 3x2 ` x4 “ 3
by setting x1 “ x2 “ 0.
Example
We start from the basic feasible set B1 “ t3, 4u. The basic
variables are x3 , x4 and the non-basic ones are x1 , x2 . The feasible
basic solution is x B1 “ p0, 0, 8, 3q which be computed directly from
"
2x1 ` x2 ` x3 “ 8
´x1 ` 3x2 ` x4 “ 3
by setting x1 “ x2 “ 0.
Since f px q “ ´x1 ´ 2x2 therefore f px B q “ 0. We could decrease
1
it by making either x1 or x2 non-zero. By a heuristic rule we
choose x2 since the coefficient ´2 is smaller than ´1. Assume
s “ 2 will enter the new basic (feasible) set B2 .
Example
x2
3
maximize x1 ` 2x2
$ x1 ě
2
p3, 2q &x ě
0
0
` ď
2
1 %´2xx1 `
x2
3x2 ď
8
3
x1 1
0
´1 0 1 2 3 4
´1
Example
x2
3
maximize x1 ` 2x2
$ x1 ě
2
p3, 2q &x ě
0
0
` ď
2
1 %´2xx1 `
x2
3x2 ď
8
3
x1 1
0
´1 0 1 2 3 4
´1 B1 “ t3, 4u
Example
Since s “ 2 enters the basic set we need to decide whether 3 or 4
leaves.
Example
Since s “ 2 enters the basic set we need to decide whether 3 or 4
leaves. "
2x1 ` x2 ` x3 “ 8
´x1 ` 3x2 ` x4 “ 3
Divide the second equation by 3 to get coefficient at x2 equal to 1
"
2x1 ` x2 ` x3 “ 8
´ 13 x1 ` x2 ` 1
3 x4 “ 1
Example
Since s “ 2 enters the basic set we need to decide whether 3 or 4
leaves. "
2x1 ` x2 ` x3 “ 8
´x1 ` 3x2 ` x4 “ 3
Divide the second equation by 3 to get coefficient at x2 equal to 1
"
2x1 ` x2 ` x3 “ 8
´ 13 x1 ` x2 ` 1
3 x4 “ 1
"
2x1 ` x2 ` x3 “ 8
´ 13 x1 ` x2 ` 1
3 x4 “ 1
Subtract the second equation from the first one to make x2 , x3
basic variables. This means 4 leaves the basic set B1 .
Example
"
2x1 ` x2 ` x3 “ 8
´ 13 x1 ` x2 ` 1
3 x4 “ 1
Subtract the second equation from the first one to make x2 , x3
basic variables. This means 4 leaves the basic set B1 .
#
7
3 x1 ` x3 ´ 1
3 x4 “ 7
´ 1
3 x1 ` x2 ` 1
3 x4 “ 1
"
2x1 ` x2 ` x3 “ 8
´ 13 x1 ` x2 ` 1
3 x4 “ 1
Subtract the second equation from the first one to make x2 , x3
basic variables. This means 4 leaves the basic set B1 .
#
7
3 x1 ` x3 ´ 1
3 x4 “ 7
´ 1
3 x1 ` x2 ` 1
3 x4 “ 1
Substitute x2 “ 1 ` 13 x1 ´ 13 x4 to f px q
f px q “ ´x1 ´ 2x2 “ ´2 ´ 53 x1 ` 23 x4.
Recall "
2x1 ` 1x2 ` x3 “ 8
´x 1 ` 3x2 ` x4 “ 3
Observe 81 ě 33 . The crucial point is to subtract smaller ratio from
the bigger one to get a positive number.
Substitute x2 “ 1 ` 13 x1 ´ 13 x4 to f px q
f px q “ ´x1 ´ 2x2 “ ´2 ´ 53 x1 ` 23 x4.
Making x1 non-zero will decrease f , i.e. s “ 1 will enter the new
basic set B3 .
Example
x2
3
maximize x1 ` 2x2
$ x1 ě
2
p3, 2q &x ě
0
0
` ď
2
1 %´2xx1 `
x2
3x2 ď
8
3
x1 1
0
´1 0 1 2 3 4
´1
Example
x2
3
maximize x1 ` 2x2
$ x1 ě
B2 “ t2, 3u
2
p3, 2q &x ě
0
0
` ď
2
1 %´2xx1 `
x2
3x2 ď
8
3
x1 1
0
´1 0 1 2 3 4
´1 B1 “ t3, 4u
Example
#
´ 13 x1 ` x2 ` 1
3 x4 “ 1
7
3 x1 ` x3 ´ 1
3 x4 “ 7
Example
#
´ 13 x1 ` x2 ` 1
3 x4 “ 1
7
3 x1 ` x3 ´ 1
3 x4 “ 7
"
x1 ´ 3x2 ´ x4 “ ´3
x1 ` 3
7 x3 ´ 1
7 x4 “ 3
Example
"
x1 ´ 3x2 ´ x4 “ ´3
x1 ` 3
7 x3 ´ 1
7 x4 “ 3
The new basic set is B3 “ t1, 2u. Subtract the second equation
from the first one
#
x1 ` 3
7 x3 ´ 1
7 x4 “ 3
x2 ` 1
7 x3 ` 2
7 x4 “ 2
Example
"
x1 ´ 3x2 ´ x4 “ ´3
x1 ` 3
7 x3 ´ 1
7 x4 “ 3
The new basic set is B3 “ t1, 2u. Subtract the second equation
from the first one
#
x1 ` 3
´ 17 x4 “
7 x3 3
x2 ` 1
` 27 x4 “
7 x3 2
f px q “ ´ 7 ` x 3 ` x 4 .
5 3
7 7
Example
"
x1 ´ 3x2 ´ x4 “ ´3
x1 ` 3
7 x3 ´ 1
7 x4 “ 3
The new basic set is B3 “ t1, 2u. Subtract the second equation
from the first one
#
x1 ` 3
´ 17 x4 “
7 x3 3
x2 ` 1
` 27 x4 “
7 x3 2
f px q “ ´ 7 ` x 3 ` x 4 .
5 3
7 7
Making x3 or x4 a basic variable would increase the value of f .
Example
x2
3
maximize x1 ` 2x2
$ x1 ě
2
p3, 2q &x ě
0
0
` ď
2
1 %´2xx1 `
x2
3x2 ď
8
3
x1 1
0
´1 0 1 2 3 4
´1
Example
x2
0
´1 0 1 2 3 4
´1 B1 “ t3, 4u
Simplex Method
» fi
c1 c2 ¨¨¨ cn 0
—
— a11 a12 ¨¨¨ a1n b1 ffi
ffi
1) build a simplex tableau — .. .. .. .. ffi we
– . . . . fl
am1 am2 ¨ ¨ ¨ amn bm
will refer to the part above the horizontal line as the upper
part and to the other as the lower part,
Simplex Method
» fi
c1 c2 ¨¨¨ cn 0
—
— a11 a12 ¨¨¨ a1n b1 ffi
ffi
1) build a simplex tableau — .. .. .. .. ffi we
– . . . . fl
am1 am2 ¨ ¨ ¨ amn bm
will refer to the part above the horizontal line as the upper
part and to the other as the lower part,
2) find some basic feasible set
B “ ti1 , . . . , im u, i1 ă i2 ă . . . ă im ,
Simplex Method
» fi
c1 c2 ¨¨¨ cn 0
—
— a11 a12 ¨¨¨ a1n b1 ffi
ffi
1) build a simplex tableau — .. .. .. .. ffi we
– . . . . fl
am1 am2 ¨ ¨ ¨ amn bm
will refer to the part above the horizontal line as the upper
part and to the other as the lower part,
2) find some basic feasible set
B “ ti1 , . . . , im u, i1 ă i2 ă . . . ă im ,
3) using elementary row operations (adding or subtracting the
upper row from rows in the lower part is not allowed) bring
the simplex tableau to the form
Simplex Method
1 i1 i2 im´1 im n
» fi
c11 0 0 0 0 cn1 c1
— 1
a11 1 0 0 0 1
a1n b11 ffi
— 1 1 ffi
b21
... ... ...... ... ...
— a21 0 1 0 0 a2n ffi
— 1 1 ffi
b31
... ... ...... ... ...
— a31 0 0 0 0 a3n ffi
— ... ... ...... ... ... ffi
— .. .. .. .. .. .. .. .. ffi
— . . . . . . . . ffi
— 1 ffi
—apm´2q1
— 1 0 0 0 0 ap1 m´2qn 1
bm´2 ffi
ffi
ap1 m´1qn 1
... ... ...... ... ...
–a bm´1 fl
pm´1q1 0 0 1 0
a1 1 1
... ... ...... ... ...
m1 ... 0 ... 0 ...... 0 ... 1 ... amn bm
1
Some authors say the tableau is in canonical form (with respect to B).
Simplex Method
1 i1 i2 im´1 im n
» fi
c11 0 0 0 0 cn1 c1
— 1
a11 1 0 0 0 1
a1n b11 ffi
— 1 1 ffi
b21
... ... ...... ... ...
— a21 0 1 0 0 a2n ffi
— 1 1 ffi
b31
... ... ...... ... ...
— a31 0 0 0 0 a3n ffi
— ... ... ...... ... ... ffi
— .. .. .. .. .. .. .. .. ffi
— . . . . . . . . ffi
— 1 ffi
—apm´2q1
— 1 0 0 0 0 ap1 m´2qn 1
bm´2 ffi
ffi
ap1 m´1qn 1
... ... ...... ... ...
–a bm´1 fl
pm´1q1 0 0 1 0
a1 1 1
... ... ...... ... ...
m1 ... 0 ... 0 ...... 0 ... 1 ... amn bm
1
Some authors say the tableau is in canonical form (with respect to B).
Simplex Method
1 i1 s im´1 im n
» fi
c11 0 cs1 0 0 cn1 c1
— 1
a11 1 1
a1s 0 0 1
a1n b11 ffi
— 1 1 1 ffi
b21
... ... ...... ... ...
— a21 0 a2s 0 0 a2n ffi
— 1 1 1 ffi
b31
... ... ...... ... ...
— a31 0 a3s 0 0 a3n ffi
— ... ... ...... ... ... ffi
— .. .. .. .. .. .. .. .. ffi
— . . . . . . . . ffi
— 1 1 ffi
—apm´2q1
— 1 0 ap1 m´2qs 0 0 ap1 m´2qn bm ´2 ffi
ap1 m´1qs ap1 m´1qn 1 ffi
... ... ...... ... ...
–a ´1 fl
pm´1q1 0 1 0 bm
a1 1 1 1
... ... ...... ... ...
m1 ... 0 ... ams ...... 0 ... 1 ... amn bm
" 1 *
br1
1
ars
“ min b
ais1
i
| ais1 ą 0, i “ 1, . . . , m
Simplex Method
It is already in the form from step 3) (i.e. in the upper row there
are zeroes in the 3-th and 4-th column and the submatrix of the
lower part consisting of columns 3, 4 is the identity matrix).
Example
1 2 3 4
«´1 ´2 0 0 0ff
2 1 1 0 8
´1 3 0 1 3
1 2 3 4 1 2 3 4
«´1 ´2 0 0 0ff r {3 « ´1 ´2 0 0 0ff r0 `2r2
r1 ´r2
8 ÝÑ 8 ÝÑ
2
2 1 1 0 2 1 1 0
´1 3 0 1 3 ´ 13 1 0 1
3 1
1 2 3 4 1 2 3 4
» fi » fi
´ 5
0 0 2
2
r1 Ør2
´ 5
0 0 2
2
ÝÑ
3 3 3 3
– 7
3 0 1 ´ 1
3 7 fl – ´ 1
3 1 0 1
3 1fl
´ 1
3 1 0 1
3 1 7
3 0 1 ´ 1
3 7
Example
1 2 3 4
» fi
´ 5
3 0 0 2
3 2
–´ 1
1 0 1
1fl
3 3
7
3 0 1 ´ 1
3 7
1 2 3 4 1 2 3 4
» fi r0 ` 53 r1 » fi
´ 5
0 0 2
2 r `1r 0 0 5 3
7
3fl ÝÑ –1
3 3 7 7
´ ´
2 3 1
– 1 0 3 1
0 3 1
3fl
7 7 7 7
´ 1
3 1 0 1
3 1 0 1 1
7
2
7 2
1 i1 s im´1 im n
» fi
c11 0 cs1 0 0 cn1 c1
— 1
a11 1 1
a1s 0 0 1
a1n b11 ffi
— 1 1 1 ffi
b21
... ... ...... ... ...
— a21 0 a2s 0 0 a2n ffi
— 1 1 1 ffi
b31
... ... ...... ... ...
— a31 0 a3s 0 0 a3n ffi
— ... ... ...... ... ... ffi
— .. .. .. .. .. .. .. .. ffi
— . . . . . . . . ffi
— 1 ffi
—apm´2q1
— 1 0 ap1 m´2qs 0 0 ap1 m´2qn 1
bm´2 ffi
ffi
ap1 m´1qs ap1 m´1qn 1
... ... ...... ... ...
–a bm´1 fl
pm´1q1 0 1 0
a1 1 1 1
... ... ...... ... ...
m1 ... 0 ... ams ...... 0 ... 1 ... amn bm
1 i1 s im´1 im n
» fi
c11 0 cs1 0 0 cn1 c1
— 1
a11 1 1
a1s 0 0 1
a1n b11 ffi
— 1 1 1 ffi
b21
... ... ...... ... ...
— a21 0 a2s 0 0 a2n ffi
— 1 1 1 ffi
b31
... ... ...... ... ...
— a31 0 a3s 0 0 a3n ffi
— ... ... ...... ... ... ffi
— .. .. .. .. .. .. .. .. ffi
— . . . . . . . . ffi
— 1 ffi
—apm´2q1
— 1 0 ap1 m´2qs 0 0 ap1 m´2qn 1
bm´2 ffi
ffi
ap1 m´1qs ap1 m´1qn 1
... ... ...... ... ...
–a bm´1 fl
pm´1q1 0 1 0
a1 1 1 1
... ... ...... ... ...
m1 ... 0 ... ams ...... 0 ... 1 ... amn bm
while
f px B q “ c 1⊺ x B ´ c 1
“ ´c 1 .
Therefore, if for some i R B we have xi ą 0 then
f px B q “ ´c 1 ď c 1⊺ x ´ c 1 “ f px q.
´x1 ` x2 ` x3 “ 1 , x1 , x2 , x3 ě0
Example
Maximize the value x1 ` 2x2 under the constraints
$
& x1 ě 0
%
x2 ě 0
´x 1 ` x2 ď 1
´x1 ` x2 ` x3 “ 1 , x1 , x2 , x3 ě0
Build the simplex tableau
„ 1 2 3
´1 ´2 0 0
´1 1 1 1
Example
x2
3
maximize x1 ` 2x2
2 #x ě 0
ě
1
0
´x1 ` ď
x2
1 x2 1
x1
0
´1 0 1 2 3 4
´1
Example
x2
3
maximize x1 ` 2x2
2 #x ě 0
ě
1
0
´x1 ` ď
x2
1 x2 1
x1
0
´1 0 1 2 3 4
´1
Example
x2
3
maximize x1 ` 2x2
2 #x ě 0
ě
1
0
´x1 ` ď
x2
x1 ` 2x2 “ ´2 1 x2 1
x1
0
´1 0 1 2 3 4
´1
Example
x2
3
maximize x1 ` 2x2
x1 ` 2x2 “1
2 #x ě 0
ě
1
0
´x1 ` ď
x2
x1 ` 2x2 “ ´2 1 x2 1
x1
0
´1 0 1 2 3 4
´1
Example
x2
x1 ` 2x2 “4 4
3
maximize x1 ` 2x2
x1 ` 2x2 “1
2 #x ě 0
ě
1
0
´x1 ` ď
x2
x1 ` 2x2 “ ´2 1 x2 1
x1
0
´1 0 1 2 3 4
´1
Example
x1 ` 2x2 “7
x2
x1 ` 2x2 “4 4
3
maximize x1 ` 2x2
x1 ` 2x2 “1
2 #x ě 0
ě
1
0
´x1 ` ď
x2
x1 ` 2x2 “ ´2 1 x2 1
x1
0
´1 0 1 2 3 4
´1
Example
x1 ` 2x2 “7
x2
x1 ` 2x2 “4 4
3
maximize x1 ` 2x2
x1 ` 2x2 “1
2 #x ě 0
ě
1
0
´x1 ` ď
x2
x1 ` 2x2 “ ´2 1 x2 1
x1
0
´1 0 1 2 3 4
´1
Example
x1 ` 2x2 “7
x2
x1 ` 2x2 “4 4
3
maximize x1 ` 2x2
x1 ` 2x2 “1
2 #x ě 0
ě
1
0
´x1 ` ď
x2
x1 ` 2x2 “ ´2 1 x2 1
x1
0
´1 0 1 2 3 4 no optimal solution
´1
Example
Let B “ t3u be a basic feasible set.
„ 1 2 3
´1 ´2 0 0
´1 1 1 1
Example
Let B “ t3u be a basic feasible set.
„ 1 2 3
´1 ´2 0 0
´1 1 1 1
„ 1 2 3 „ 1 2 3
´1 ´2 0 `
0 ÝÑr0 2r1 ´3 0 2 2
´1 1 1 1 ´1 1 1 1
Example
Let B “ t3u be a basic feasible set.
„ 1 2 3
´1 ´2 0 0
´1 1 1 1
„ 1 2 3 „ 1 2 3
´1 ´2 0 `
0 ÝÑr0 2r1 ´3 0 2 2
´1 1 1 1 ´1 1 1 1
Then s “ 1 and in the first column, in the lower part, all entries
are non-positive. Therefore the objective function does not admit
its minimum over the feasible region. In other words, there is no
optimal solution.
Example
If a1
lj “ 0 for all j P t1, . . . , nu then r pAq ă m which contradicts
the assumption.
How to Find A Basic Feasible Set? (continued)
There are two separate cases:
i) B Ă t1, . . . , nu, i.e. the basic feasible set B is also a basic
feasible set of the original problem,
ii) B Ć t1, . . . , nu that is im “ n ` l ě n ` 1, i.e. yl is a basic
variable, then there exists alj1 ‰ 0 for some
j P t1, . . . , nu, j R B (where aij1 refer to the terms of the
simplex tableau of the form from point 3) of the algorithm).
This implies that j R B, i.e. xj “ yl “ 0 in the basic solution,
and the set B 1 “ pB Y tj uq ´ tn ` l u is also a basic feasible set
of the auxiliary problem with x B “ x B . 1
If a1
lj “ 0 for all j P t1, . . . , nu then r pAq ă m which contradicts
the assumption.
How to Find A Basic Feasible Set? (continued)
There are two separate cases:
i) B Ă t1, . . . , nu, i.e. the basic feasible set B is also a basic
feasible set of the original problem,
ii) B Ć t1, . . . , nu that is im “ n ` l ě n ` 1, i.e. yl is a basic
variable, then there exists alj1 ‰ 0 for some
j P t1, . . . , nu, j R B (where aij1 refer to the terms of the
simplex tableau of the form from point 3) of the algorithm).
This implies that j R B, i.e. xj “ yl “ 0 in the basic solution,
and the set B 1 “ pB Y tj uq ´ tn ` l u is also a basic feasible set
of the auxiliary problem with x B “ x B . 1
If a1
lj “ 0 for all j P t1, . . . , nu then r pAq ă m which contradicts
the assumption.
B “ t2, 7, 8u
»
3 0 ´1 1 ´1 2 0 0 ´4 fi
— 1
— 1 ´1 0 0 1 0 0 4 ffi
ffi ÝÑ
– ´5 0 2 ´1 0 ´2 1 0 0 fl
2 0 ´1 0 1 1 0 1 4
s “ 3, r “ 2, B “ t2, 3, 8u
» fi
—
1
2 0 0 1
2 ´1 1 1
2 0 ´4 ffi
—
— ´ 3
2 1 0´ 1
2 0 0 1
2 0 4 ffi r0 `r3
ffi ÝÑ
— ´ 5
´ 1
´1 1 ffi
– 2 0 1 2 0 2 0 0 fl
´ 1
2 0 0´ 1
2 1 0 1
2 1 4
s “ 5, r “ 3, B “ t2, 3, 5u
Example (continued)
B “ t2, 3, 5u
» fi
0 0 0 0 0 1 1 1 0
— ffi
—
— ´ 32 1 0 ´ 12 0 0 1
2 0 4 ffi
ffi
— ´ 52 ´ 12 ´1 1
0 0 ffi
– 0 1 0 2 fl
´ 12 0 0 ´ 12 1 0 1
2 1 4
xi ą 0 for i P B,
where
xB “ px 1 , . . . , x n q .
Degenerate Linear Programming Problem
Definition
A linear programming problem in the standard form is called
non–degenerate if for each basic feasible set B
xi ą 0 for i P B,
where
xB “ px 1 , . . . , x n q .
Otherwise, it is called degenerate.
Degenerate Linear Programming Problem
Definition
A linear programming problem in the standard form is called
non–degenerate if for each basic feasible set B
xi ą 0 for i P B,
where
xB “ px 1 , . . . , x n q .
Otherwise, it is called degenerate.
Proposition
For a non–degenerate linear programming problem simplex metod
stops after a finite number of steps.
Degenerate Linear Programming Problem
Definition
A linear programming problem in the standard form is called
non–degenerate if for each basic feasible set B
xi ą 0 for i P B,
where
xB “ px 1 , . . . , x n q .
Otherwise, it is called degenerate.
Proposition
For a non–degenerate linear programming problem simplex metod
stops after a finite number of steps.
Proof.
There is a finite number of basic feasible solutions and with each
step of the algorithm the objective function strictly decreases.
Cycling
The following example comes from the MIT OpenCourseWare
Optimization Methods in Management Science/Operations
Research.
B1 “ t5, 6, 7u, s “ 1, r “ 1
» fi
— 41
´ 3 20 ´ 12 6 0 0 0 0
ffi
— 4 ´8 ´1 9 1 0 0 0 ffi
— ffi ÝÑ
— 1 ´12 ´ 1 3 0 1 0 0 ffi
– 2 2 fl
0 0 0 1 0 0 1 1
B2 “ t1, 6, 7u, s “ 2, r “ 2
» fi
0 ´4 ´ 72 33 3 0 0 0
— ffi
— 1 ´32 ´4 ffi
— 36 4 0 0 0 ffi ÝÑ
— 0 ffi
2 ´15 ´2 1 0 0
3
– 4 fl
0 0 0 1 0 0 1 1
Cycling (continued)
B3 “ t1, 2, 7u, s “ 3, r “ 1
» fi
—
0 0 ´2 18 1 1 0 0
ffi
— 1 0
— 8 ´84 ´12 8 0 0 ffi
ffi ÝÑ
— 0 1 3
´ 154 ´ 12 1 ffi
– 8 4 0 0 fl
0 0 0 1 0 0 1 1
B4 “ t2, 3, 7u, s “ 4, r “ 1
» fi
—
1
4 0 0 ´3 ´2 3 0 0
ffi
—
— ´ 3
641 0 3
16
1
16 ´ 180 0 ffi
ffi ÝÑ
— 1
´ 21
´ 3
1 0 0 ffi
– 80 1 2 2 fl
0 0 0 1 0 0 1 1
Cycling (continued)
B5 “ t3, 4, 7u, s “ 5, r “ 1
» fi
´1
— 25
16 0 0 ´1 1 0 0
ffi
— ´2 ´6 0 0 ffi
— 56 1 0 2 ffi ÝÑ
— ´1 16 1
´ 23 0 0 ffi
– 4 3 0 1 3 fl
1
4 ´3 0 0
16
´ 1
3
2
3 1 1
B6 “ t4, 5, 7u, s “ 6, r “ 1
» fi
´7
— 4
44 1
2 0 0 ´2 0 0
ffi
—
—
1
6 ´4 ´ 1
6 1 0 1
3 0 0 ffi
ffi ÝÑ
— ´ 5 1
´3 0 0 ffifl
– 4 28 2 0 1
´ 1
6 4 1
6 0 0 ´ 13 1 1
Cycling (continued)
B7 “ B1 “ t5, 6, 7u, s “ 1, r “ 1
» fi
´3
— 4
20´ 12 6 0 0 0 0
ffi
—
—
1
4 ´8 ´1 9 1 0 0 0 ffi
ffi ÝÑ ¨ ¨ ¨
— 1
´12 ´ 12 3 0 1 0 0 ffi
– 2 fl
0 0 0 1 0 0 1 1
which is the same basic set we started with, i.e. cycling occurs.
Bland’s Rule
Proposition (Bland’s rule)
With the following rules the simplex algorithm always stops.
i) s “ minti | ci1 ă 0u (choose the leftmost column with negative entry
in the zeroth row),
Bland’s Rule
Proposition (Bland’s rule)
With the following rules the simplex algorithm always stops.
i) s “ minti | ci1 ă 0u (choose the leftmost column with negative entry
in the zeroth row),
! ) ! )
ii) if a t “ min a i | ais1 ą 0, i “ 1, . . . , m then r “ min i | ab “ ab
b1 b1 t
1 1
i
1 1 1 1
ts is ts is
(choose the topmost row with the smallest ratio).
Bland’s Rule
Proposition (Bland’s rule)
With the following rules the simplex algorithm always stops.
i) s “ minti | ci1 ă 0u (choose the leftmost column with negative entry
in the zeroth row),
! ) ! )
ii) if a t “ min a i | ais1 ą 0, i “ 1, . . . , m then r “ min i | ab “ ab
b1 b1 t
1 1
i
1 1 1 1
ts is ts is
(choose the topmost row with the smallest ratio).
Bland’s Rule
Proposition (Bland’s rule)
With the following rules the simplex algorithm always stops.
i) s “ minti | ci1 ă 0u (choose the leftmost column with negative entry
in the zeroth row),
! ) ! )
ii) if a t “ min a i | ais1 ą 0, i “ 1, . . . , m then r “ min i | ab “ ab
b1 b1 t
1 1
i
1 1 1 1
ts is ts is
(choose the topmost row with the smallest ratio).
Proof.
Assume on the contrary, with the Bland’s rule cycling occurs and there is
a sequence of basic feasible solutions
B1 Ñ B2 Ñ . . . Ñ Bl Ñ B1 .
It follows that the objective function does not decrease and each entering
variable is equal to 0 (i.e. the basic feasible solution x Bi remain
constant).
Bland’s Rule (continued)
Proof.
We call a variable xi fickle if xi P Bj and xi R Bj for some 1 ď j, j 1 ď l.
1
Let xt will be the fickle variable with the largest possible t. Let 1 ď f ď l
be such number that
t “ ip P Bf “ ti1 , . . . , im u, t R Bf `1 ,
that is xt leaves the basic set Bf (where by convention l ` 1 means 1).
Let cj1 , c 1 , bi1 , aij1 refer to the data of the simplex tableau from step 3) of
the simplex algorithm for the basic feasible set Bf . Let s P Bf `1 zBf be
the entering variable in the step Bf Ñ Bf `1 . Therefore
cs1 ă 0, and s ă t.
Since t leaves Bf (and xt is fickle)
1
aps ą 0,
“ 0. bp1
Since the p-th basic variable leaves, i.e. xi “ xt the p-th ratio is the
smallest one. As xt was fickle so bp1 “ 0.
p
Bland’s Rule (continued)
Proof.
At some step the variable xt reenters some basic feasible set. Let Bg be a
basic feasible set such that t P Bg `1 zBg , i.e. xt is the entering variable in
the step Bg Ñ Bg `1 . Let cj˚ , c ˚ , bi˚ , aij˚ refer to the data of the simplex
tableau from step 3) of the simplex algorithm for the basic feasible set
Bg . Therefore
ct˚ ă 0.
Consider a family of (possibly infeasible) solutions of the system Ax “b
$ x “ y,
’
& s
x “ 0 for i R B Y ts u,
’
%x “ b1 ´ a1 y for i P B .
i f
ik k ks k f
Bland’s Rule (continued)
Proof.
At some step the variable xt reenters some basic feasible set. Let Bg be a
basic feasible set such that t P Bg `1 zBg , i.e. xt is the entering variable in
the step Bg Ñ Bg `1 . Let cj˚ , c ˚ , bi˚ , aij˚ refer to the data of the simplex
tableau from step 3) of the simplex algorithm for the basic feasible set
Bg . Therefore
ct˚ ă 0.
Consider a family of (possibly infeasible) solutions of the system Ax “b
$ x “ y,
’
& s
x “ 0 for i R B Y ts u,
’
%x “ b1 ´ a1 y for i P B .
i f
ik k ks k f
Since two expressions for the objective function are the same on the set
of all solutions Ax “ b (without the assumption x ě 0), for any y P R
ÿ ÿ
cs1 y ´ c 1 “ cs˚ y ` ck˚ xk ´ c ˚ “ cs˚ y ` ci˚k pbk1 ´ aks1 y q ´ c ˚ ,
R
k Bg P z
ik Bf Bg
‰
k s
Bland’s Rule (continued)
Proof.
By comparing the left hand side (objective function expressed with the
data for Bf ) with the right hand side (objective function expressed with
the data for Bg with values given by the family, in particular xi “ 0 for
i R Bf Y ts u)
ÿ
cs1 y ´ c 1 “ cs˚ y ` ci˚k pbk1 ´ aks1 y q ´ c ˚ ,
P z
ik Bf Bg
we see that the right hand side does not depend on y hence the
coefficient at y on the left hand side is equal to 0, i.e.
ÿ
cs1 ´ cs˚ ` ci˚k aks
1 “ 0.
P z
ik Bf Bg
Bland’s Rule (continued)
Proof.
(note that t P Bf zBg ) which gives
ÿ
cs1 ´ cs˚ ` ci˚k aks
1 “ 0.
P z
ik Bf Bg
Bland’s Rule (continued)
Proof.
(note that t P Bf zBg ) which gives
ÿ
cs1 ´ cs˚ ` ci˚k aks
1 “ 0.
P z
ik Bf Bg
Proof.
By the choice of t
iq ă t “ ip
and xiq is not the entering variable in the step Bg Ñ Bg `1 (as xt is),
hence ci˚q ą 0 (by the Bland’s rule) and q ă p (as iq ă ip ). Variable xiq is
fickle and we have shown
ci˚q aqs
1 ą 0,
which gives
1
aqs ą 0 and bq1 “ 0.
Bland’s Rule (continued)
Proof.
By the choice of t
iq ă t “ ip
and xiq is not the entering variable in the step Bg Ñ Bg `1 (as xt is),
hence ci˚q ą 0 (by the Bland’s rule) and q ă p (as iq ă ip ). Variable xiq is
fickle and we have shown
ci˚q aqs
1 ą 0,
which gives
1
aqsą 0 and bq1 “ 0.
This leads to contradiction, as the ratios a “ a “ 0 are the smallest,
1 1
b b
q p
1 1
not xi “ xt .
q
p
Example with Cycling Revisited
Consider the previous example with cycling. Note that for the
steps B1 Ñ . . . Ñ B5 we have been using the Bland’s rule.
Example with Cycling Revisited
Consider the previous example with cycling. Note that for the
steps B1 Ñ . . . Ñ B5 we have been using the Bland’s rule.
B5 “ t3, 4, 7u, s “ 1, r “ 1
» fi
´1
— 25
16 0 0 ´1 1 0 0
ffi
— ´2 ´6 0 0 ffi
— 56 1 0 2 ffi ÝÑ
— ´1 16 1
´ 23 0 0 ffi
– 4 3 0 1 3 fl
1
4 ´3 0 0
16
´ 1
3
2
3 1 1
ÿ
n
xi Ñ max
“
i 1
with constraints
$
’
’
’
x1 ď 21 ´ 1,
1 ` x2 ď 22 ´ 1,
’
’ 2x
’
’
& 2x1 ` 2x2 ` x3 ď 23 ´ 1,
..
’
’ .
’
’
’
’
’ 2x ` . . . ` 2xn´1 ` xn ď 2n ´ 1,
% 1
x1 , . . . , xn ě 0.
This is a variant of so called Klee–Minty cube and comes from
T. Kitahara and S. Mizuno.
Klee–Minty Cube for n “3
B1 “ t4, 5, 6u, s “ 1, r “ 1
» fi
´ 1 ´1 ´1 0 0 0 0
— 1 ffi
— 1 0 0 1 0 0 ffi ÝÑ
– 2 1 0 0 1 0 3 fl
2 2 1 0 0 1 7
B2 “ t1, 5, 6u, s “ 2, r “ 2
» fi
0 ´1 ´1 1 0 0 1
— 1 1 ffi
— 0 0 1 0 0 ffi ÝÑ
– 0 1 0 ´2 1 0 1 fl
0 2 1 ´2 0 1 5
B3 “ t1, 2, 6u, s “ 4, r “ 1
» fi
0 0 ´1 ´1 1 0 2
— 1 0 1 ffi
— 0 1 0 0 ffi ÝÑ
– 0 1 0 ´2 1 0 1 fl
0 0 1 2 ´2 1 3
Klee–Minty Cube for n “ 3 (continued)
B4 “ t2, 4, 6u, s “ 3, r “ 3
» fi
1 0 ´1 0 1 0 3
— 3 ffi
— 2 1 0 0 1 0 ffi ÝÑ
– 1 0 0 1 0 0 1 fl
´2 0 1 0 ´2 1 1
B5 “ t2, 3, 4u, s “ 1, r “ 3
» fi
´1 0 0
0 ´1 1 4
— 2 1 0 0 3 ffi
— 1 0 ffi ÝÑ
– ´2 0 1 0 ´2 1 1 fl
1 0 0 1 0 0 1
B6 “ t1, 2, 3u, s “ 5, r “ 2
» fi
0 0 0 1 ´1 1 5
— 1 1 ffi
— 0 0 1 0 0 ffi ÝÑ
– 0 1 0 ´2 1 0 1 fl
0 0 1 2 ´2 1 3
Klee–Minty Cube for n “ 3 (continued)
B7 “ t1, 3, 5u, s “ 4, r “ 1
» fi
0 1 0 ´1 0 1 6
— 1 1 ffi
— 0 0 1 0 0 ffi ÝÑ
– 0 2 1 ´2 0 1 5 fl
0 1 0 ´2 1 0 1
B8 “ t3, 4, 5u
» fi
1 1 0 0 0 1 7
— 2 7 ffi
— 2 1 0 0 1 ffi ÝÑ
– 1 0 0 1 0 0 1 fl
2 1 0 0 1 0 3
x B8 “ p0, 0, 7, 1, 3, 0q,
and f px B8 q “ 7.
Klee–Minty Cube for n “ 3 (no Bland’s rule)
Remark
Note that using the Bland’s rule the algorithm requires less steps,
i.e.
B1 Ñ B2 Ñ B6 Ñ B7 Ñ B8 .
However, there are known examples of exponential complexity for
the Bland’s rule.
Better Methods