0% found this document useful (0 votes)
91 views

Optimization Lecture 2

The simplex method can be used to solve linear programming problems by moving between corner points (basic feasible solutions) of the feasible region. It begins with an initial basic feasible solution and moves to adjacent solutions that improve the objective function, using elementary row operations. This process continues until an optimal solution is found.

Uploaded by

Katie Cook
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views

Optimization Lecture 2

The simplex method can be used to solve linear programming problems by moving between corner points (basic feasible solutions) of the feasible region. It begins with an initial basic feasible solution and moves to adjacent solutions that improve the objective function, using elementary row operations. This process continues until an optimal solution is found.

Uploaded by

Katie Cook
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Lecture 2 Simplex methods

basic idea of the is to confine the


search to corner points of the feasible region(

of which
The simplex method
p g (
)in a most intelligent w
f
there are only finitely many ay
keyfor the istomakecomputers
.
The simplex method
i l l i
key for the is to make computers
see corner points;
h b d l h
The simplex method
f simplex algori the can be used to solve an
the must be converted into a problem where all the
thm ,

Before LP
LP
constraints are
maximization
and
objectivefunctionis minimizati
all variables are nonnegati
or
equ
on
ati ve ons .
. The maximization objective function is minimizati or
in this f
on
standard orm is said form to be in a .
.

The
An LP
Standard Fo Convert the rm to the LP LP
not in standard form is The LP
z 4x 3x Maximize = +
in is standard form The LP
z 4x 3x

Maximize = +
1 2
z 4x 3x Maximize
Subject to
= +
1 2
z 4x 3x Ma ximize
Subject to
= +
.
.
1 2
1 2
x x 40
2x

x 60
s
s
+
+
.
.
1
2
1 2
1 2
x x 40
2x x 60
s
s
=






=


+ +
+ +
,
1 2
1 2
x x >
s mmar if aconstraint of an isa constrai
, , ,
In
2
1 2
1 2
1 2
LP i
0 x x 0 s s
s
>
nt con ert summary if a constraint of an is a constrai , In LP i s nt convert
it to an constraint by adding a slack variable to the th
constraintandaddingthesignre
equal
striction
ity
,

i
i
i
0
s
s > constraint and adding the sign restriction .
i
0 s >
an has both and constraints apply the previous
procedurestotheindividual constraints
, If LP s >
procedures to the individual constraints
an below:
.
Consider LP
standar Non d form
M 20 15 +
Standard form
20 15

M
1 2
Max
Subject to
z 20x 15x = +
1 2
z 20x 15x Max
Subject to
= +
1
j
x


1 1
100
x 100
x 100
j
s


s





s
= +
100 +
2
1 2
x 100

50x 35x 6000

s
s
+
2
1 2
2
3
x 100
50x 35x 6000
s
s




+
+
=
= +
1 2
20x 15x 2000
x x 0
>
>
+
-
1 2 4
20x e
s
15x 20
s s e
00
x x 0
= +
>
,
1 2
x x 0 >
, , , , ,
1 2 1 2 3 4
s s s e x x 0 >
2. Preview of the Simplex Algorithm
an with m constraints and n variables
has been converted into the standard form

.
Suppose LP
from of such an is: The LP
M Mi or
1 1 2 2 n n
z c x Max Min
Subject
c x c x
t
= + + +
b
o Subject t

11 1 12 2 1n n 1
21 1 22 2 2n n 2
a x a x a x b
a x a x a x b
o
+ + + =
+ + + =

21 1 22 2 2n n 2
1 1 2 2
a x a x x a + + + b =
m1 1 m2 2 mn
a x a x x a + + +
, . ,
n m
i
b
x 0, i = 1 n >
we define
| | | | | |
| | |
If

11 12 1n 1 1
a a a x b
, , ,
| | |
| | |
| | |
| | |

21 22 2n 2 2
a a a x b
A x b = = =
theconstraintscanbewrittenasasystemof equations
| | |
\ . \ . \ .

m1 m2 mn n m
a a a x b
the constraints can be written as a system of equations
. Ax b =
a basic solution to is obtained by setting
variables equal to and solving for the remaining
i bl


, If n m Ax b
n m 0
>

=
variables
assumes that setting the variables equal to
.
This
m
n 0 m
yields a value for the remaining variables or
equivalently the columns for the remaining variables
li
uniqu
l i d d t
e ,
,
m
m
are linearly independent.
find a basic solution to we choose a set of
variables( ) and set each of
,
the , or nonbasic variables
To A
N
x b n m
BV
=
( )
these variables equal to
we solve for the values of the ( ) variabl
,
.
Then
0
n m m n = es ( )
nonbasic variables basic solutions
( ) that satisfy
lead to different
the , or .
.
basic variables
Different
Ax b BV =
basic so the to the following equations: lution Consider
1 2
x x + 3 =
1 2
number of nonbasic variables . The
2 3
- x x -1
3 2 1 -
+ =
= =
for example { }then { }
canobtainthevaluesfor th basicvariable ese bysetti s ng
, , , , . Setting
We
3 1 2
x NB x x V V B = =
can obtain the values for th basic variable ese by setti s ng
,
We
3
x 0 = that is

.
1 2
2
x x 3
- x - 0 1
+ =
+ =
basic solution and is a
.
, , . Thus
2
1 2 3
x 0
x 2 x 1 x 0 = = =
{ }and { }the becomes basic solution
d
, , If
1 2 3
NBV BV x x x
0 3 2
= =
basic solution
and
{ }and { }the becomes
, .
, , If
1 2 3
2 1 3
NB
x 0 x 3 x 2
x x x BV V
= = =
= =
and
set
, .
Some
1 2 3
x 3 x 0 x -1 = = =
s of variables do not yield a basic solution . m y
the following linear system: Consider
1 2 3
x 2x x 1

+ + =
1 2 3
1 2 3
x 2x x 1
2x x x 4
+ +
+ +
{ }and { }thecorrespondin basic g
.
If
3
x x x NB B V V
=
= = { }and { }the correspondin basic
sol
g
would satisf ut on y i
, ,


If
3 1 2
1 2
x x x
x 2x 1
NB B V V = =
+ =
t
.
Since
1 2
2x 4x 3

+ =
basi his c so system h lution as no solution, there is no y
corresponding to { } , .
1 2
x B x V =
Preview of the Simplex Algorithm
basic solution in which all variables are
is called a ( ) basic feasible soluti
nonnegativ
o
e
n or .
Any
bfs ( )
the basic solutions in the previous exa e mpl , , For
1
x 2
x 1 x
f
=
and arebasicfeasible 0 x 0 x 3 x 2 ,
2
x 1 x = and are basic feasible
solutions the basic solution fails
b ( )
, ,
, , ,
b
but
3 1 2 3
1 2 3
b
0 x 0 x 3 x 2
x 3 x
f
0 x -1
0
= = = =
= = =
to be a ( )
basic feasibl following show that a e
because .
two t The heorems
3
bfs x 0 <
g
is of solution great importance in . LP
easibleregionfor an linear programmingproblem
:
f The
Theorem 1
easible region for any linear programming problem
is a convex set
if h h b i l l i
f
.
The
Al LP if an has an , there must be an
extreme point
o
of
ptim
the
al solution
feasible region optimal that is
,
.
Also LP
Theorem
uniqueextreme any there is a point of the
:
, s

'
For L P P L
2
q
each basic feasib
y p
feasible region corresponding to solution
thereisatleastone correspond
l
ingtoeachextreme
e .
Also bfs there is at least one corresponding to each extreme
point in the fe
, Also bfs
asible region.
relationship between and
l ti tli di i
extremepoints basic feasi
i
ble The
Th E l 1 2 solutions outlined in is seen in
( ) is: in the standard form
, .
with slack variabl es The
Th Example 1
LP
eorem 2
X2
6
0 D
1 2
Maximiz z 4x 3x e
Subj
= +
ect to
5
0
Labor Constraint
Subj
.
1 1 2
x x 40
e
s
s 2x x 60
ct to
+ + =
+ +

3
0
4
0
Feasible Region
B

.
, , ,
2
1
1
2
2
1 2
s
s
2x x 60
x x s 0
+ + =
>
2
0
0
E
Leather Constraint
inequalities show the
.
Two shaded
area

1
0
A C
extrem of the
feasible region are
e points
, , ,
The
B C E . F
X1
10 20 30 40 50
A C
F
BV NBV bfs Corner Point
Table 1
, , , ( )


1 2 1 2 1 2 1 2
s s s s
BV NBV bfs Corne
x x 0 x x 20 E z 140
r Point
= = = = =
, , , , ( )
1 2 2 1 1 2 2 1
x x x 0 x 30 10 C z 120
0
s s s s = = = = =
( ) bf 40 20 0 , , ,
1 2 2 1 1 1 2
x x x 0 s s s x = =

-
-
, ( )
, , , , ( )
2 2
1 2 2 1 1 2 1 1 2
s s
s s s s s
bfs
bfs
40 20 0
x x x 0 x 60 20 0
no
no
= = <
= = = = < ( )
, , , , ( )
1 2 2 1 1
2 1 1 2
2 1 1 2
2 1 1 2
s s s s
f
x x x 0 x 40 20 B z 120 = = = = =

showsthecorrespondenc
, , , , ( )
1 2 1 2 1 2 1 2
Table 1
s s x x x x 0 40 60 F z 0 s s = = = = =
basicfeasiblesolutions ebetweenthe shows the correspondenc Table 1 basic feasible solutions
basicfeasiblesolutions
e between the
to the and the extreme points of the feasible region
tothestandardformof the correspond
.
The
LP
LP basic feasible solutionsto the standard form of the correspond
in a natural fashion to the ex

s
'
The LP
LP treme points.
SimplexAlgorithmProcedurefor maximization The LPs
The Simplex Algorithm For Max LPs
Simplex Algorithm Procedure for maximizati
standa
on
the to
a ( ) fromthe
rd form
standardform


if possible
The
Convert
Obtain
LPs
LP Step 1
Step 2 bf

s a ( ) from the standard form if possible

Obtain
Deter
Step 2
Step
bf
3
s
whether the current is optimal
h i i l d i hi h
mine
If S
bfs
bf 4 the current is not optimal determine which
should be com nonbasic variable basic e a and variabl
which should bas becom icvari
e
able
, If S bfs tep 4
eanonbasicvariable which should bas becom ic variable e a
to find a with a better objective function value
tofindanew
nonbasic variable
.
s Use elementary row operations(ero Step )' bfs 5
bfs
to find a new
with a better objective function value b
s
.
Use
Go
elementary row operations(ero Step ) bfs 5
ack to
thi i l l ith th i i th f
.
I bj ti f ti
Step 3
: this simplex algorithmthe is in the form

, In objective funct n io

1 1 2 2 n n
z c x c x c x 0.

=
. call this format the row version of the objective function We 0
:
1 2 3
z 60x 30x 20x
8 6 48
Examp maximize
bj t
le 2
t s
= + +

1 2 3
1 2 3


8x 6x x 48
4x 2x 1.5x 20
subject t o s
s
+ +
+ +
1 2 3


2x 1.5x 0.

x

5 8 s + +
2
x 5 s
, ,
Standar form
1 2 3
x x x 0. >

1 2 3
1 2
maximi z 60x 30x 20x
8x 6x
ze
subject t

o


= + +
+
3 1
x 48 s = + +
1 2
j
3
1 2
1
2 3
4x 2x 1.5x 20
2x 1 5x 0 5x 8
s
s




=
=
+ + +
+ + +
1 2 3
2
3
2x 1.5x 0.5x 8

s
x
=

+ + +
4
5
0
s = +
, , , , , ,
1 2 3 1 2 3 4
x x x s s s 0. s >
rows togetherinrow andthesignrestrictions
So
Pu
lu
t
tion
ting 1- 4 0
Example 2 - con
rows together in row and the sign restrictions
yields the equations and basic variables

.
Putting 1 4 0
Canonical Form0 BasicVariable Canonical Form 0 Basi

1 2 3
z 60x 30x 20x 0 z 0
8 6 48
c Variable
Row 0
R 1 48


= =
1 2 3
1 2 3
1 1
2
8x 6x x 48 Row 1 s s
Ro
48
4x 2x 1.5x w 2 s




=

= + + +
+ + +
2
s
R 3
20 20
2 1 5 0 5 8 8
= =
3 3
4
1
4
2 3
2
Row 3 s s
Row
2x 1.5x 0.5x 8 8
x 5 4 s 5 s



=
= =
=
+ + +
+
we set If
1 2 3
x = x = x we can solve for the values
{ }and { }
, , , , .
, , , , , , . Thus
1 2 3 4
1 2 3 1 2 3 4
=
BV
0
=
s s s s
s s s NB = x x x V s
each constraint is then in canonical form( s have a coefficient
in one row and zeros in
Since = 1 BV
right- hand side) r ) with a nonnegative (
a canbeobtainedbyinspection
hs all other rows ,
bfs a can be obtained by inspection. bfs
Obt i B i F ibl
Solution
S l ti
- Example 2 - con Step 2
perform the simplex algorithmwe need a basic( , although
.
To
Obtain a Basic Feasible Solution
) variable for
appears in w
not necessarily nonnegative .
Since
row 0
row 0 z ith a coefficient of and does , 1 z pp
not appear in any other we use as the
thisconvention thebasicfeasiblesolutionfor our
basic variable , .
, With
row z
this convention the basic feasible solution for our
initial canonical form has:
{
, With
= V z B s }and { }
1 1 2 3 2 3 4
= x x x NBV s s s { , V z B s }and { }
this initial
, , , , , .
, , , , , , For
1 1 2 3 2 3 4
1 2 3 4
x x x
z = 0 = 48 = 20 = 8 = 5
x = x = x =
NBV
bfs s s s
0
s s s
s
this example indicates a can be used as a
basicvariableif
sla
the of the
ck variable
.
, As
1 2 3
x = x =

rh
x =
s
0
constraintisnonnegative basic variable if the of the rhs constraint isnonnegative.
we have obtained a we need to determine whether it is optimal
:
, . Once
bfs
bfs
Determine if the Current is Optimal Step 3
do this we try to determine if there is any way can be increased
by inc
, To z
nonbasic variable
b i i bl
reasing some from its current value of zero
hil h ldi ll th t th i t l f nonbasic variabl while holding all other at their curr es ent values of
zero
for in yields:
.
Solving row0 z z 60x 30x 20x = + +
non
for in yields:
each


Solving
For
1 2 3
row 0 z z 60x 30x 20x = + +
basic variable
nonbasic variab
we can use the equation above to determine
if increasing a ( le
,
but hold nonbasic ing all other g (
nonbasic
) will increase
any of the w varia i l ble l
vari
g
to . a l

b es
Increasing
0 z
cause an increase in . z
increasing causes the greatest rate of increase in
increases from its current
b i i
value of it will have to become a
bl
.
,
However
If
1
1
zero
x
x
z
basic varia
this reason is
ble.
, For
1
x called the
h th t
entering varia
ti ffi
ble
i ti
.
Ob 0 has the most negative coefficient in . Observe
1
row 0 x
h h ( ) h i i bl
:
bl
Step 4
choose the ( ) to the
with the most negative coefficient
entering variable
in
desiretomake aslargeaspossiblebutaswedo the
nonbasic variable
in a max problem

We
We
row 0.
x desire to make as large as possible but as we do, the
current basi
We
1
x
c variables( ) will change value
increasing maycauseabasicvariabletobecomenegative
, , , .
Thus
1 2 3 4
s s s s
x increasing may cause a basic variable to become negative. ,

Thus
1
x
RATIO
wehave In Since row1 s s = 48 8x 0 x 48 8 = 6 > s we have
we have
wehave
, . ,
, . ,
In Since
In Since
In Since
1 1
2
1 1
1 2 1
row 1 s s
row 2 s s
row 3 s s
= 48 - 8x 0 x 48 8 = 6
= 20 - 4x 0 x 20 4 = 5
= 8 2x 0 x 8 2 = 4


> s
> s
> s we have , . ,
,
In Since
In
3 3 1 1
row 3 s s = 8 - 2x 0 x 8 2 = 4
row

4
> s
we have any will always be
t k ll th b i i bl ti th l t
. , . For
Thi
4 1 4
5 = x s s 0 >
means to keep all the basic variables nonnegative the largest
we can make is { }
,
, , .
This
1
6 5 4 4 m n x i =
The Ratio Te Solution- st Example 2 - con

entering a variable into the basis, compute the ratio:
of of entering variable in row


When
rhs row coefficient g
every constraint in which the entering For
ff
variable has a
positivecoefficient positive coefficient
constraint with the smallest ratio is called the winner
of theratiotest
.
The
of the ratio test
smallest ration is the large enterin st value of the
that will keep
g
v all ari ble a
.
The
thecurrent basicvariables that will keep v all ari ble a the current basic variables
nonnegative
th t i i bl b i i bl i
.
M k 3 the entering variable a basic variable in
since this ( ) was the winner of the ratiotest
( )

constraint
Make
1
x
8 / 2
row 3
row
4 = ( ). 8 / 2 4 =

k i l t b i i bl T
Solu The ti Ratio Test on-
3
Example 2 - con
make a in we use elementary
row operations( ) to make have a coefficient of
in and
b
acoefficient
a
of inall othe
sic va e
r
riabl ,
s
'
To
1
1
1
row x
x
0
3
ero
3

in and a coefficientof in all other 0 row 3 r
procedure is called pivoting on ;and
i ll dth
.
This
ows
row 3 row 3
i

is called the
final result is that replaces as the basicvariable
.
The
3 1
pivot row
s x
for
term in the that involves th
.
The
row 3
pivot row e entering basic
variable is called the . pivot term
Gauss- J ordan method using and
basic shownonthiss va lidemak riable es a
: s
.
'
The
1
ero simplex
tableaus x
Step 5
basic shown on this s va lide mak riable es a .
1
tableaus x
ero 1
z x1 x2 x3 s1 s2 s3 s4 rhs
ero
0 1 -60 -30 -20
1 8 6 1 1 48 1 8 6 1 1 48
2 4 2 1.5 1 20
3 1 0.75 0.25 0.5 4 row 3 divided by 1/2
4 1 1 5
ero 2
1 2 3 1 2 3 4 h
ero 2
z x1 x2 x3 s1 s2 s3 s4 rhs
0 1 15 -5 30 240 60 times row 3 added to row 0
1 8 6 1 1 48
2 4 2 1.5 1 20
3 1 0.75 0.25 0.5 4
4 1 1 5
ero 3
z x1 x2 x3 s1 s2 s3 s4 rhs

0 1 15 -5 30 240 0 1 15 5 30 240
1 -1 1 -4 16 - 8 times row 3 added to row 1
2 4 2 1.5 1 20
3 1 0.75 0.25 0.5 4
4 1 1 5 4 1 1 5
ero 4
z x1 x2 x3 s1 s2 s3 s4 rhs
0 1 15 -5 30 240
1 -1 1 -4 16
2 -1 0.5 1 -2 4 - 4 times row 3 added to row 2
3 1 0.75 0.25 0.5 4
4 1 1 5
The Result
Canonical Form1 Basic Variable
Example 2 - con

3 2 3
Canonical Form 1 Basic Va
z 15x 5x 30 240 z 240
riable
Row 0 s
R

1

+ + = =
4 16 16 Row1
1 3 1
2 3 2
3
2 3
x 4 16 16
x 0.5x 2 4 4
s s s
Row 2 s s s
+ = =
+ + = =


1 2 3 3 1
x 0.75x 0.25x 0.5 4 x 4

Row 3 s
Row 4 x
+ + + = =
2 4 4
5 s s 5 + = =
{ , , , , }and { }
the and
, , , . In
Yielding

1 2 1 3 2 4 3
BV NBV Canonical Form z x x x
z 240 16 4 x 4 5
1 s s s s
s s bfs s
= =
= = = = = the and
procedurefromgoingt
, , , ,
.
Yielding
The
1 2
3
1
2 3
4
z 240 16 4 x 4 5
x
s s bf
0
s
x
s
s
= = = = =
= =

=
oone toabetter adjacent is bfs bfs procedure from going t The o one to a better adjacent is
called an iteration( ) of the simplex algorithm

or sometime pivot .
bfs bfs
to wecandetermineif thecurrent Returning Step 3 bfs
Example 2 - con.
to we can determine if the current
is optimal
from yields:
,
.
Returning
Rearranging
Step 3
row0 canonical form1
bfs
from yields:

Rearranging
2 3 3
row 0 canonical form 1
z 240 15x 5

s x 30 = +
current i o s n The bfs optimal because increasing to
( ) will increase
t
while holding the other to nonbasic variable
3
1 x
0
the value of
either or basic will caused the value of
.
Making
2 3
z
x z s
to
- Reca
decre
ll
a
th
se.
Step 4 e rule for determining the entering variable p g g
is the coefficient with the greatest negative value
is the only variable with a coefficient negative
.
, Since
3 3
x x
row 0
y
should be entered int
g
o e th
,
3 3
basis.
iteration( ) pivot Begin 2
Example 2 - con.
( )
the ratio test using as the entering variable
yieldsthefollowingresults( ):

holding other s to zero
p g
Performing
3
x
N

BV yields the following results( ):
for all vaules of
holding other s to zero
, From
3 1
row 1 0 x
NBV
s > since
1 3
s = 16 x +
,
,
From if
From if
2 3
3 1
row 2 s
row 3
0 x 4 0.5 = 8
x 0 x 4 0.25 = 16
> s
> s
for all vaules of
t k ll th b i i bl ti th
, . From since
Thi
3
3 4
1
4
row 4 s 0 x 5 = s >
means to keep all the basic variables nonnegative the
l
, This
argest we can make is { } , .
3
x 8 16 = min 8
pivot becomes the
use to make a basic variable in
, .
- s, .
'
So
Now
3
row 2 ro
er
w
Step 5 r x ow 2 o
3
use to make a basic variable in - s, .
'
Now
3
ero Step 5 row 2 x
ero 1
z x1 x2 x3 s1 s2 s3 s4 rhs
0 1 15 -5 30 240
1 -1 1 -4 16
2 -2 1 2 -4 8 multiplied row 2 by 2
3 1 0.75 0.25 0.5 4
4 1 1 5
ero 2
z x1 x2 x3 s1 s2 s3 s4 rhs z x1 x2 x3 s1 s2 s3 s4 rhs
0 1 5 10 10 280 add 5 times row 2 to row 0
1 -1 1 -4 16
2 -2 1 2 -4 8
3 1 0 75 0 25 0 5 4 3 1 0.75 0.25 0.5 4
4 1 1 5
ero 3
z x1 x2 x3 s1 s2 s3 s4 rhs
0 1 5 10 10 280
1 -2 1 2 -8 24 add row 2 to row 1
2 -2 1 2 -4 8
3 1 0.75 0.25 0.5 4
4 1 1 5
ero 4
z x1 x2 x3 s1 s2 s3 s4 rhs
0 1 5 10 10 280
1 -2 1 2 -8 24
2 2 1 2 4 8 2 -2 1 2 -4 8
3 1 1.25 -0.5 1.5 2 add -1/4 times row 2 to row 3
4 1 1 5
The Result in Example 2 Canonical Form 2 - con

2 3 2
Canonical Form 2
z 5x 10 10 280 z 280
Basic Variable
Row 0 s s + + + = =
2 3 2
Row 1
1 2 3 1 2
2x 2 8 24 24
2x x 2 4 8 x 8
s s s s
Row 2 s s






+ + = =
+ + = =
2 2 3 3
1
3
2 2 1 3
2x x 2 4 8 x 8
x 1.25x 0.5 1.5 2 x 2
Row 2 s s
Row 3 s s
R 4



+ + = =
+ +

= =
5 5 + Row 4
, In
4 4 2
x 5 5 s s
Canonical Form 2
+ = =
{ , , , , }and { }
the and
, , .
, , , , Yielding

1 4 3 2
1 4
3 2
3
1
1
= z x BV NBV
bfs
x = x
z 28
s s s s
s s 0 24 x 8 x 2 5 = = = = = , , , ,
.
g
1 4
2
3
2 3
1
f z
s s x 0 = = =
Example 2 - con.
for in yields: Solving
2 2 3
z

row 0
z 280 5x 10 10

s s =
can see that increasing (
) will causethevalueof tode
, , or while holding the
other s to
We
2
2
2 3
2 3
z
s s
NBV z
x
0 crease ) will cause the value of to de other s to NBV z 0 crease
solution at the end of is therefore optimal
.
. The iteration 2
following rule can be applie
canonical form
d to determine whether a
optimal s is :


'
The
bfs
optimal is ( for a max pro Acanonical form ) if each
nonbasic variable has a nonnegative coefficient in the
blem
canonical forms .
'
row 0
simplexmethodalgorithmrequiresastarting The bfs
The Big M Meth d o
simplex method algorithm requires a starting
problems have found
l k i bl
starting by using
b th i i bl
.

The
Previous
bfs
bfs
slack variabl ba the as our
an have or constra
sic variabl s
nts
e
i
es .
, If LP > = however a starting
t b dil t
,
bf may not be readily apparent
such a case the method may be used to solve
h
.
, In
bfs
Big M
LP the

1 2
minimize
LP
z 2x 3x = +
.
1 2
0.5x 0.25x 4 subject to + s
.
1 2
x 3x 20 + > .
.
1 2
1 2
x 3x 20
x x 10
0


+ >
+ =
> . ,
1 2
x x 0 >
LP standard form The in
=
1 2
1 2 1
z 2x 3x
0.5x 0.25x 4
Minimize
Subject to

s
+
+ + =
1
2
2
1 2
1
x
j
3x 20
x x 10
e

+ =
+ =
1 2
x x 10

+ =
0 , , , >
1 2 1 2
x x s e
remedythepredicament arecreated artificial variables
order to use the simplex method a is needed , . -
To
In s bf
- remedy the predicament are created
variables will be labeled accord
artificial var
ing t
iables , .

To
The

- o the row in which they
areused are used.
instandardf artificial variab ormwith is les Th LP
Example 3 - con. Artificial Variabl
e
es
instandard f artificial variab orm with is les

Th
1 2
LP
Row 0
R 1
z 2x 3x 0
0 5 0 25
e
=
4
1 2
Row 1 s 0.5x 0.25x + +
2
1
2 1 2
4
x 3x 20 Row 2 e a


=
+ + =
theoptimal solution a artificial v ll ariable m s ust , - In
3 1 2
x x 10 Row a 3 + + =
the optimal solution a artificial v ll ariable m
b
s ust

, In
e set equal to zero
accomplishthis ina aterm isadded
.
To min Ma LP - accomplish this in a a term is added
to the objective functio artificial variables n for each
a theterm isaddedtotheobjective
, ,
.
To
For
i
i
min M
max M
a LP
P
a
a L
-
- a the term is added to the objective
function
, For
i
max - M P a L -
for each
t l b
.
i
M
a
represents some very large number. M -
Example 3 - con.
modified in standard form then becomes



The
1 2 2 3
Row 0
LP
z 2x 3x 0

- M - M a a =
1 1 2
Row 0.5x 0.25x 4

1 s
Row 2
+ + =
1 2 2 2
e x 3x 20 a + + =
theobjectivefunctionthiswaymakesit - Modifying
1 2
2
2
3 1
2
Row x x 3 1 a 0 + + =
the objective function this way makes it
extremely costly for an a
- Modifying
to be positive rtificial variab s le .
optimal solutionshould force . The
2 3
a a 0 = =
Initial Tableau Example 3 - con.

Row z x1 x2 s1 e2 a2 a3 rhs
0 1 00 2 00 3 00 M M 0 00 0 1.00 -2.00 -3.00 -M -M 0.00
1 0.50 0.25 1.00 4.00
2 1 00 3 00 -1 00 1 00 20 00 2 1.00 3.00 -1.00 1.00 20.00
3 1.00 1.00 1.00 10.00

2 3
in Row 0, To make = =0 a a
Row 0+ M*(Row 2)+M*(Row 3)
Pi vot 1 z x1 x2 s1 e2 a2 a3 rhs rati o ero
0 1.00 2M - 2 4M -3 -M 30M Row 0 + M(Row 2) + M(Row 3)
1 0.50 0.25 1.00 4.00 16
2 1.00 3 -1.00 1.00 20.00 6.67
3 1.00 1.00 1.00 10.00 10
ero 1 z x1 x2 s1 e2 a2 a3 rhs ero
0 1.00 2M-2 4M -3 -M 30M
1 0 50 0 25 1 00 4 00 1 0.50 0.25 1.00 4.00
2 0.33 1 -0.33 0.33 6.67 Row 2 di vi ded by 3
3 1.00 1.00 1.00 10.00
ero 2 z x1 x2 s1 e2 a2 a3 rhs ero
0 1.00 (2M-3)/3 (M-3)/3 (3-4M)/3 (60+10M)/3 Row 0 - (4M-3)*(Row 2) ( ) ( ) ( ) ( ) ( ) ( )
1 0.50 0.25 1.00 4.00
2 0.33 1 -0.33 0.33 6.67
3 1.00 1.00 1.00 10.00
ero 3 z x1 x2 s1 e2 a2 a3 rhs ero
0 1 00 (2M 3)/3 (M 3)/3 (3 4M)/3 (60 10M)/3 0 1.00 (2M-3)/3 (M-3)/3 (3-4M)/3 (60+10M)/3
1 0.42 1.00 0.08 -0.08 2.33 Row 1 - 0.25*(Row 2)
2 0.33 1 -0.33 0.33 6.67
3 1.00 1.00 1.00 10.00
ero 4 z x1 x2 s1 e2 a2 a3 rhs ero ero 4 z x1 x2 s1 e2 a2 a3 rhs ero
0 1.00 (2M-3)/3 (M-3)/3 (3-4M)/3 (60+10M)/3
1 0.42 1.00 0.08 -0.08 2.33
2 0.33 1 -0.33 0.33 6.67
3 0.67 0.33 -0.33 1.00 3.33 Row 3 - Row 2
The Solution- con
Pi vot 2 z x1 x2 s1 e2 a2 a3 rhs rati o
0 1.00 (2M-3)/3 (M-3)/3 (3-4M)/3 (60+10M)/3
1 0.42 1.00 0.08 -0.08 2.33 5.60
2 0.33 1 -0.33 0.33 6.67 20.00
3 0.67 0.33 -0.33 1.00 3.33 5.00
ero 1 z x1 x2 s1 e2 a2 a3 rhs ero
0 1.00 (2M-3)/3 (M-3)/3 (3-4M)/3 (60+10M)/3
1 0 42 1 00 0 08 -0 08 2 33 1 0.42 1.00 0.08 0.08 2.33
2 0.33 1 -0.33 0.33 6.67
3 1.00 0.50 -0.50 1.50 5.00 (Row 3)*(3/2)
ero 2 z x1 x2 s1 e2 a2 a3 rhs ero
0 1.00 -0.50 (1-2M)/2 (3-2M)/2 25.00 Row 0 + (3-2M)*(Row 3)/3
1 0 42 1 00 0 08 0 08 2 33 1 0.42 1.00 0.08 -0.08 2.33
2 0.33 1.00 -0.33 0.33 6.67
3 1.00 0.50 -0.50 1.50 5.00
ero 3 z x1 x2 s1 e2 a2 a3 rhs ero
0 1.00 -0.50 (1-2M)/2 (3-2M)/2 25.00
1 1 00 0 13 0 13 0 63 0 25 R 1 (5/12)*R 3) 1 1.00 -0.13 0.13 -0.63 0.25 Row 1 - (5/12)*Row 3)
2 0.33 1.00 -0.33 0.33 6.67
3 1.00 0.50 -0.50 1.50 5.00
ero 4 z x1 x2 s1 e2 a2 a3 rhs ero
0 1.00 -0.50 (1-2M)/2 (3-2M)/2 25.00
Optimal Solution
1 1.00 -0.13 0.13 -0.63 0.25
2 1.00 -0.50 0.50 -0.50 5.00 Row 2 -(1/3)*Row 3
3 1.00 0.50 -0.50 1.50 5.00
p
The summary for the optimal solution
variable with the positive coefficient in row
should enter the basis since this is a problem.
The
min
-
ratio test indicates that hould enter the s The
2
x -
basis in which means the artificial variable , row 2
will leave the basis
toeliminate from and
.
s

'
Use
2
2
row 1 row 3 e x
a
ro - to eliminate from and
ratio test indicates that
wh
s .
should enter the
basis in
Use
The
2
1
row 1 row 3
row 3
e x
x
ro -
ichmeansthenthat will leave a wh basis in , row 3 ich means then that will leave
the basis.
Th R l
3
a
optimal solu is . tion , The
The Result
1 2
z 25 x x 5

= = = -
Tutorial
the simplex method to solve the following Using LP
M i i 3 5
1 2
Maximize
Subject to
z 3x 5x
4
= +
.
.
1
2
Subject to
x 4
2x 12
s
s
2
.
1 2
3x 2x 18
0
s +
,
1 2
x x 0. >
LPs The Simplex Algorithm for Min
the following : Consider LP
2 Mi i i 3
1 2
z 2 Minimize
Subject to
x 3x
4
=
.
1 2
Subject to
x x 4 s +
x x 6 s .
,
1 2
1 2
x x 6
x x 0.
s
>

You might also like