Escolar Documentos
Profissional Documentos
Cultura Documentos
PROGRAMMING
A
Concise
Introduction
Thomas
S.
Ferguson
Contents
1.
Introduction
..............................................................3
TheStandardMaximumandMinimumProblems...........................4
TheDietProblem..........................................................5
TheTransportationProblem...............................................6
TheActivityAnalysisProblem.............................................6
TheOptimalAssignmentProblem..........................................7
Terminology...............................................................8
2.
Duality
...................................................................10
DualLinearProgrammingProblems.......................................10
TheDualityTheorem.....................................................11
TheEquilibriumTheorem.................................................12
InterpretationoftheDual.................................................14
3.
The
Pivot
Operation
....................................................16
4.
The
Simplex
Method
...................................................20
TheSimplexTableau......................................................20
ThePivotMadlyMethod.................................................21
PivotRulesfortheSimplexMethod.......................................23
TheDualSimplexMethod................................................26
5.
Generalized
Duality
.....................................................28
TheGeneralMaximumandMinimumProblems...........................28
SolvingGeneralProblemsbytheSimplexMethod.........................29
SolvingMatrixGamesbytheSimplexMethod............................30
1
6.
Cycling
...................................................................33
AModificationoftheSimplexMethodThatAvoidsCycling...............33
7.
Four
Problems
with
Nonlinear
Objective
Function
..................36
ConstrainedGames.......................................................36
TheGeneralProductionPlanningProblem................................36
MinimizingtheSumofAbsoluteValues...................................37
MinimizingtheMaximumofAbsoluteValues..............................38
ChebyshevApproximation................................................39
LinearFractionalProgramming...........................................39
ActivityAnalysistoMaximizetheRateofReturn.........................40
8.
The
Transportation
Problem
...........................................42
FindingaBasicFeasibleShippingSchedule................................44
CheckingforOptimality...................................................45
TheImprovementRoutine................................................47
9.
Solutions
to
the
Exercises
..............................................50
Related
Texts
...............................................................65
2
LINEAR
PROGRAMMING
1.
Introduction.
Alinearprogrammingproblemmaybedefinedastheproblemofmaximizing
or
minimizing
a
linear
function
subject
to
linear
constraints.Theconstraintsmaybeequalities
orinequalities.Hereisasimpleexample.
Findnumbersx1
andx2
thatmaximizethesumx1
+x2
subjecttotheconstraints
x1
=
0,x2
=
0,and
x1
+2x2
=
4
4x1
+2x2
=
12
-x1
+x2
=
1
Inthisproblemtherearetwounknowns,andfiveconstraints.Alltheconstraintsare
inequalitiesandtheyarealllinearinthesensethateachinvolvesaninequalityinsome
linearfunctionofthevariables.Thefirsttwoconstraints,x1
=
0andx2
=
0,arespecial.
Thesearecallednonnegativity
constraints
andareoftenfoundinlinearprogramming
problems.Theotherconstraintsarethencalledthemain
constraints.Thefunctiontobe
maximized(orminimized)iscalledtheobjective
function.Here,theobjectivefunctionis
x1
+x2
.
Sincethereareonlytwovariables,wecansolvethisproblembygraphingtheset
ofpointsintheplanethatsatisfiesalltheconstraints(calledtheconstraintset)and
thenfindingwhichpointofthissetmaximizesthevalueoftheobjectivefunction.Each
inequalityconstraintissatisfiedbyahalf-planeofpoints,andtheconstraintsetisthe
intersectionofallthehalf-planes.Inthepresentexample,theconstraintsetisthefive
sidedfigureshadedinFigure1.
Weseekthepoint(x1,x2),thatachievesthemaximumofx1
+x2
as(x1,x2)ranges
overthisconstraintset.Thefunctionx1
+x2
isconstantonlineswithslope-1,for
examplethelinex1
+x2
=1,andaswemovethislinefurtherfromtheoriginupandto
theright,thevalueofx1
+x2
increases.Therefore,weseekthelineofslope-1thatis
farthestfromtheoriginandstilltouchestheconstraintset.Thisoccursattheintersect
ofthelinesx1
+2x2
=4and4x1
+2x2
=12,namely,(x1,x2)=(8/3,2/3).Thevalueof
theobjectivefunctionthereis(8/3)+(2/3)=10/3.
Exercises1and2canbesolvedasabovebygraphingthefeasibleset.
Itiseasytoseeingeneralthattheobjectivefunction,beinglinear,alwaystakeson
itsmaximum(orminimum)valueatacornerpointoftheconstraintset,providedthe
3
6
5
x2 4
3
2
1
1 2 3 4
4x1 + 2x2 = 12
-x1 + x2 = 1
x1 + 2x2 = 4
optimal point
x1
Figure1.
constraintsetisbounded.Occasionally,themaximumoccursalonganentireedgeorface
oftheconstraintset,butthenthemaximumoccursatacornerpointaswell.
Notalllinearprogrammingproblemsaresoeasilysolved.Theremaybemanyvariables
andmanyconstraints.Somevariablesmaybeconstrainedtobenonnegativeand
othersunconstrained.Someofthemainconstraintsmaybeequalitiesandothersinequalitie
However,twoclassesofproblems,calledherethestandard
maximum
problem
and
thestandard
minimum
problem,playaspecialrole.Intheseproblems,allvariablesare
constrainedtobenonnegative,andallmainconstraintsareinequalities.
Wearegivenanm-vector,b
=(b1,...,bm)T,ann-vector,c
=(c1,...,cn)T,andan
m×nmatrix,
..
a11
a12
···
a1n
.
···
.
a21
a22
a2n
..
A
=....
.
....
.
.
...
aam2
···
a
m1
mn
ofrealnumbers.
The
Standard
Maximum
Problem:
Findann-vector,x
=(x1,...,xn)T,to
maximize
c
T
x
=c1x1
+···+cnxn
subjecttotheconstraints
a11x1
+a12x2
+···+a1nx=b1
n
a21x1
+a22x2
+···+a2nxn
=b2
(orAx
=b)
.
.
.
am1x1
+am2x2
+···+amnxn
=bm
and
x1
=0,x2
=0,...,xn
=0(orx
=0).
4
The
Standard
Minimum
Problem:
Findanm-vector,y
=(y1,...,ym),to
minimize
y
Tb
=y1b1
+···+ymbm
subjecttotheconstraints
y1a11
+y2a21
+···+ymam1
=c1
y1a12
+y2a22
+···+ymam2
=c2
(oryTA
=cT)
.
.
.
y1a1n
+y2a2n
+···+ymamn
=cn
and
y1
=0,y2
=0,...,ym
=0(ory
=0).
Notethatthemainconstraintsarewrittenas=
forthestandardmaximumproblem
and=
forthestandardminimumproblem.Theintroductoryexampleisastandard
maximumproblem.
Wenowpresentexamplesoffourgenerallinearprogrammingproblems.Eachofthese
problemshasbeenextensivelystudied.
Example
1.
The
Diet
Problem.
Therearemdifferenttypesoffood,F1,...,Fm
,
thatsupplyvaryingquantitiesofthennutrients,N1,...,Nn
,thatareessentialtogood
health.Letcj
betheminimumdailyrequirementofnutrient,Nj
.Letbi
bethepriceper
unitoffood,Fi
.Letaij
betheamountofnutrientNj
containedinoneunitoffoodFi
.
Theproblemistosupplytherequirednutrientsatminimumcost.
Letyi
bethenumberofunitsoffoodFi
tobepurchasedperday.Thecostperday
ofsuchadietis
b1y1
+b2y2
+···+bmym.(1)
TheamountofnutrientNj
containedinthisdietis
a1j
y1
+a2j
y2
+···+amj
ym
forj=1,...,n.Wedonotconsidersuchadietunlessalltheminimumdailyrequirements
aremet,thatis,unless
a1j
y1
+a2j
y2
+···+amj
ym
=cj
forj=1,...,n.(2)
Ofcourse,wecannotpurchaseanegativeamountoffood,soweautomaticallyhavethe
constraints
y1
=0,y2
=0,...,ym
=0.(3)
Ourproblemis:minimize(1)subjectto(2)and(3).Thisisexactlythestandardminimum
problem.
5
Example
2.
The
Transportation
Problem.
ThereareIports,orproduction
plants,P1,...,PI
,thatsupplyacertaincommodity,andthereareJmarkets,
M1,...,MJ
,towhichthiscommoditymustbeshipped.PortPi
possessesanamount
si
ofthecommodity(i=1,2,...,I),andmarketMj
mustreceivetheamountrj
ofthe
commodity(j=1,...,J).Letbij
bethecostoftransportingoneunitofthecommodity
fromportPi
tomarketMj
.Theproblemistomeetthemarketrequirementsatminimum
transportationcost.
Letyij
bethequantityofthecommodityshippedfromportPi
tomarketMj
.The
totaltransportationcostis
IJ
yij
bij
.(4)
i=1
j=1
J
TheamountsentfromportPi
isj=1
yij
andsincetheamountavailableatportPi
is
si
,wemusthave
J
yij
=si
fori=1,...,I.(5)j=1
I
TheamountsenttomarketMj
isi=1
yij
,andsincetheamountrequiredthereisrj
,
wemusthave
I
yij
=rj
forj=1,...,J.(6)i=1
ItisassumedthatwecannotsendanegativeamountfromPI
toMj
,wehave
yij
=0fori=1,...,Iandj=1,...,J.(7)
Ourproblemis:minimize(4)subjectto(5),(6)and(7).
Letusputthisproblemintheformofastandardminimumproblem.Thenumberof
yvariablesisIJ,som=IJ.Butwhatisn?Itisthetotalnumberofmainconstraints.
Therearen=I+Jofthem,butsomeoftheconstraintsare=
constraints,andsomeof
themare=
constraints.Inthestandardminimumproblem,allconstraintsare=.This
canbeobtainedbymultiplyingtheconstraints(5)by-1:
J
(-1)yij
=-sj
fori=1,...,I.(5)
j=1
cj
xj
.(8)
j=1
TheamountofresourceRi
usedinthisactivityallocationmustbenogreaterthanthe
supply,bi
;thatis,
aij
xj
=
bi
fori=1,...,m.(9)j=1
Itisassumedthatwecannotoperateanactivityatnegativeintensity;thatis,
x1
=
0,x2
=
0,...,xn
=
0.(10)
Ourproblemis:maximize(8)subjectto(9)and(10).Thisisexactlythestandard
maximumproblem.
Example
4.
The
Optimal
Assignment
Problem.
ThereareIpersonsavailable
forJjobs.Thevalueofpersoniworking1dayatjobjisaij
,fori=1,...,I,and
j=1,...,J.Theproblemistochooseanassignmentofpersonstojobstomaximizethe
totalvalue.
Anassignmentisachoiceofnumbers,xij
,fori=1,...,I,andj=1,...,J,where
xij
representstheproportionofpersoni stimethatistobespentonjobj.Thus,
J
xij
=
1fori=1,...,I(11)
j=1
I
.
xij
=
1forj=1,...,J(12)
i=1
and
xij
=
0fori=1,...,Iandj=1,...,J.(13)
Equation(11)reflectsthefactthatapersoncannotspendmorethan100%ofhistime
working,(12)meansthatonlyonepersonisallowedonajobatatime,and(13)saysthat
noonecanworkanegativeamountoftimeonanyjob.Subjectto(11),(12)and(13),we
wishtomaximizethetotalvalue,
IJ
aij
xij
.(14)
i=1
j=1
7
Thisisastandardmaximumproblemwithm=I+Jandn=IJ.
Terminology.
Thefunctiontobemaximizedorminimizediscalledtheobjective
function.
Avector,x
forthestandardmaximumproblemory
forthestandardminimum
problem,issaidtobefeasible
ifitsatisfiesthecorrespondingconstraints.
Thesetoffeasiblevectorsiscalledtheconstraint
set.
Alinearprogrammingproblemissaidtobefeasible
iftheconstraintsetisnotempty;
otherwiseitissaidtobeinfeasible.
Afeasiblemaximum(resp.minimum)problemissaidtobeunbounded
iftheobjective
functioncanassumearbitrarilylargepositive(resp.negative)valuesatfeasible
vectors;otherwise,itissaidtobebounded.Thustherearethreepossibilitiesforaline
programmingproblem.Itmaybeboundedfeasible,itmaybeunboundedfeasible,andit
maybeinfeasible.
Thevalue
ofaboundedfeasiblemaximum(resp,minimum)problemisthemaximum
(resp.minimum)valueoftheobjectivefunctionasthevariablesrangeovertheconstraint
set.
Afeasiblevectoratwhichtheobjectivefunctionachievesthevalueiscalledoptimal.
All
Linear
Programming
Problems
Can
be
Converted
to
Standard
Form.
Alinearprogrammingproblemwasdefinedasmaximizingorminimizingalinearfunction
subjecttolinearconstraints.Allsuchproblemscanbeconvertedintotheformofa
standardmaximumproblembythefollowingtechniques.
Aminimumproblemcanbechangedtoamaximumproblembymultiplyingthe
n
objectivefunctionby-1.Similarly,constraintsoftheformj=1
aij
xj
=
bi
canbe
n
changedintotheformj=1(-aij
)xj
=-bi
.Twootherproblemsarise.
n
(1)Some
constraints
may
be
equalities.
Anequalityconstraintj=1
aij
xj
=bi
may
beremoved,bysolvingthisconstraintforsomexj
forwhichaij
=0andsubstitutingthis
solutionintotheotherconstraintsandintotheobjectivefunctionwhereverxj
appears.
Thisremovesoneconstraintandonevariablefromtheproblem.
(2)Some
variable
may
not
be
restricted
to
be
nonnegative.
Anunrestrictedvariable,
xj
,maybereplacedbythedifferenceoftwononnegativevariables,xj
=uj
-vj
,where
uj
=
0andvj
=
0.Thisaddsonevariableandtwononnegativityconstraintstothe
problem.
Anytheoryderivedforproblemsinstandardformisthereforeapplicabletogeneral
problems.However,fromacomputationalpointofview,theenlargementofthenumber
ofvariablesandconstraintsin(2)isundesirableand,aswillbeseenlater,canbeavoid
8
Exercises.
1.Considerthelinearprogrammingproblem:Findy1
andy2
tominimizey1
+y2
subjecttotheconstraints,
y1
+2y2
=
3
2y1
+y2
=
5
y2
=
0.
Graphtheconstraintsetandsolve.
2.Findx1
andx2
tomaximizeax1
+x2
subjecttotheconstraintsinthenumerical
exampleofFigure1.Findthevalueasafunctionofa.
3.WriteoutthematrixA
forthetransportationprobleminstandardform.
4.Putthefollowinglinearprogrammingproblemintostandardform.Findx1
,x2
,
x3
,x4
tomaximizex1
+2x2
+3x3
+4x4
+5subjecttotheconstraints,
4x1
+3x2
+2x3
+x4
=
10
x1
-
x3
+2x4
=2
x1
+x2
+x3
+x4
=
1,
and
x1
=
0,x3
=
0,x4
=
0.
9
2.
Duality.
Toeverylinearprogramthereisaduallinearprogramwithwhichitisintimately
connected.Wefirststatethisdualityforthestandardprograms.AsinSection1,c
and
x
aren-vectors,b
andy
arem-vectors,andA
isanm×nmatrix.Weassumem=
1
andn=1.
Definition.
The
dual
of
the
standard
maximum
problem
T
maximize
cx
(1)
subject
to
the
constraints
Ax
=b
and
x
=
0
is
defined
to
be
the
standard
minimum
problem
Tb
minimize
y
(2)
subject
to
the
constraints
yTA
=cT
and
y
=0
Letusreconsiderthenumericalexampleoftheprevioussection:Findx1
andx2
to
maximizex1
+x2
subjecttotheconstraintsx1
=0,x2
=0,and
x1
+2x2
=
4
4x1
+2x2
=
12(3)
-x1
+x2
=
1.
Thedualofthisstandardmaximumproblemisthereforethestandardminimumproblem:
Findy1
,y2
,andy3
tominimize4y1
+12y2
+y3
subjecttotheconstraintsy1
=0,y2
=0,
y3
=0,and
y1
+4y2
-
y3
=
1
(4)
2y1
+2y2
+y3
=
1.
Ifthestandardminimumproblem(2)istransformedintoastandardmaximumproblem
(bymultiplyingA,b,andc
by-1),itsdualbythedefinitionaboveisastandard
minimumproblemwhich,whentransformedtoastandardmaximumproblem(againby
changingthesignsofallcoefficients)becomesexactly(1).Therefore,the
dual
of
the
standard
minimum
problem
(2)
is
the
standard
maximum
problem
(1).
The
problems
(1)
and
(2)
are
said
to
be
duals.
Thegeneralstandardmaximumproblemandthedualstandardminimumproblem
maybesimultaneouslyexhibitedinthedisplay:
(5)
x1
x2
···
xn
y1
y2
...
ym
a11
a21
...
am1
a12
a22
...
am2
···
···
···
a1n
a2n
...
amn
=b1
=b2
...
=bm
=c1
=c2
···
=cn
10
Ournumericalexampleinthisnotationbecomes
x1
x2
y1
y2
y3
1
4
-1
2
2
1
=
4
=
12
=
1
=
1=
1
(6)
Therelationbetweenastandardproblemanditsdualisseeninthefollowingtheorem
anditscorollaries.
Theorem
1.
If
x
is
feasible
for
the
standard
maximum
problem
(1)
and
if
y
is
feasible
for
its
dual
(2),
then
c
T
x
=
y
Tb.(7)
Proof.
c
T
x
=
y
TAx
=
y
Tb.
Thefirstinequalityfollowsfromx
=
0
andcT
=
yTA.Thesecondinequalityfollows
fromy
=
0
andAx
=
b.
Corollary
1.
If
a
standard
problem
and
its
dual
are
both
feasible,
then
both
are
bounded
feasible.
Proof.
Ify
isfeasiblefortheminimumproblem,then(7)showsthatyTb
isanupper
boundforthevaluesofcTx
forx
feasibleforthemaximumproblem.Similarlyforthe
converse.
**
Corollary
2.
If
there
exists
feasible
x
and
y
for
a
standard
maximum
problem
(1)
and
T**T
its
dual
(2)
such
that
cx
=yb,
then
both
are
optimal
for
their
respective
problems.
T*TT*
Proof.
Ifx
isanyfeasiblevectorfor(1),thencx
=
yb
=cx
*
.whichshowsthatx
*
isoptimal.Asymmetricargumentworksfory
.
Thefollowingfundamentaltheoremcompletestherelationshipbetweenastandard
problemanditsdual.ItstatesthatthehypothesisofCorollary2arealwayssatisfied
ifoneoftheproblemsisboundedfeasible.Theproofofthistheoremisnotaseasy
astheprevioustheoremanditscorollaries.Wepostponetheproofuntillaterwhenwe
giveaconstructiveproofviathesimplexmethod.(Thesimplexmethodisanalgorithmic
methodforsolvinglinearprogrammingproblems.)Weshallalsoseelaterthatthistheorem
containstheMinimaxTheoremforfinitegamesofGameTheory.
The
Duality
Theorem.
If
a
standard
linear
programming
problem
is
bounded
feasible,
then
so
is
its
dual,
their
values
are
equal,
and
there
exists
optimal
vectors
for
both
problems.
11
Therearethreepossibilitiesforalinearprogram.Itmaybefeasiblebounded(f.b.),
feasibleunbounded(f.u.),orinfeasible(i).Foraprogramanditsdual,therearetherefo
ninepossibilities.Corollary1statesthatthreeofthesecannotoccur:Ifaproblemand
itsdualarebothfeasible,thenbothmustbeboundedfeasible.Thefirstconclusionofthe
DualityTheoremstatesthattwootherpossiblitiescannotoccur.Ifaprogramisfeasible
bounded,itsdualcannotbeinfeasible.Thex sintheaccompanyingdiagramshowthe
impossibilities.Theremainingfourpossibilitiescanoccur.
StandardMaximumProblem
f.b.f.u.i.
f.b.
xx
xx
x
(8)
Dualf.u.
i.
AsanexampleoftheuseofCorollary2,considerthefollowingmaximumproblem.
Findx1
,x2
,x2
,x4
tomaximize2x1
+4x2
+x3
+x4
,subjecttotheconstraintsxj
=
0
forallj,and
x1
+3x2
+x4
=
4
2x1
+x2
=
3(9)
x2
+4x3
+x4
=
3.
Thedualproblemisfoundtobe:findy1
,y2
,y3
tominimize4y1
+3y2
+3y3
subjectto
theconstraintsyi
=
0foralli,and
y1
+2y2
=
2
3y1
+y2
+y3
=
4
(10)
4y3
=
1
y1
+y3
=
1.
Thevector(x1,x2,x3,x4)=(1,1,1/2,0)satisfiestheconstraintsofthemaximumproblem
andthevalueoftheobjectivefunctionthereis13/2.Thevector(y1,y2,y3)=
(11/10,9/20,1/4)satisfiestheconstraintsoftheminimumproblemandhasvaluethereof
13/2also.Hence,bothvectorsareoptimalfortheirrespectiveproblems.
AsacorollaryoftheDualityTheoremwehave
**
The
Equilibrium
Theorem.
Let
x
and
y
be
feasible
vectors
for
a
standard
maximum
**
problem
(1)
and
its
dual
(2)
respectively.
Then
x
and
y
are
optimal
if,
and
only
if,
n
**
yi
=0for
all
ifor
which
j=1
aij
xj
<bi
(11)
and
m
**
x=0for
all
jfor
which
i
aij
>cj
(12)
ji=1
y
**
Proof.
If:
Equation(11)impliesthaty=0unlessthereisequalityinj
aij
x=
bi
.
ij
Hence
m
mn
mn
*
**
**
yi
bi
=yaij
x=yi
aij
xj
.(13)
ij
i=1
i=1
j=1
i=1
j=1
12
SimilarlyEquation(12)implies
mn
n
**
*
yi
aij
x=cjxj
.(14)
j
i=1
j=1
j=1
**
Corollary2nowimpliesthatx
andy
areoptimal.
Only
if:
AsinthefirstlineoftheproofofTheorem1,
nmn
m
*
***
cj
xj
=
yi
aij
xj
=
yi
bi.(15)
j=1
i=1
j=1
i=1
**
BytheDualityTheorem,ifx
andy
areoptimal,theleftsideisequaltotherightside
sowegetequalitythroughout.Theequalityofthefirstandsecondtermsmaybewritten
as
.
nm
**
cj
-
yi
aij
xj
=0.(16)
j=1
i=1
**
Sincex
andy
arefeasible,eachterminthissumisnonnegative.Thesumcanbezero
m
**
onlyifeachtermiszero.Henceifj
,thenx=0.Asymmetricargument
i=1
yi
aij
>cj
**
showsthatifj=1
aij
xj
<bi
,thenyi
=0.
Equations(11)and(12)aresometimescalledthecomplementary
slackness
conditions.
Theyrequirethatastrictinequality(aslackness)inaconstraintinastandard
problemimpliesthatthecomplementaryconstraintinthedualbesatisfiedwithequality.
AsanexampleoftheuseoftheEquilibriumTheorem,letussolvethedualtothe
introductorynumericalexample.Findy1
,y2
,y3
tominimize4y1
+12y2
+y3
subjectto
y1
=
0,y2
=
0,y3
=
0,and
y1
+4y2
-
y3
=
1
2y1
+2y2
+y3
=
1.(17)
**
Wehavealreadysolvedthedualproblemandfoundthatx1
>0andx2
>0.Hence,from
*
(12)weknowthattheoptimaly
givesequalityinbothinequalitiesin(17)(2equations
*
in3unknowns).Ifwechecktheoptimalx
inthefirstthreemainconstraintsofthe
maximumproblem,wefindequalityinthefirsttwoconstraints,butastrictinequalityin
*
thethird.Fromcondition(11),weconcludethaty=0.Solvingthetwoequations,
3
y1
+4y2
=1
2y1
+2y2
=1
**
wefind(y1
,y)=(1/3,1/6).Sincethisvectorisfeasible,the if partoftheEquilibrium
2
Theoremimpliesitisoptimal.Asacheckwemayfindthevalue,4(1/3)+12(1/6)=10/3,
andseeitisthesameasforthemaximumproblem.
Insummary,ifyouconjectureasolutiontooneproblem,youmaysolveforasolution
tothedualusingthecomplementaryslacknessconditions,andthenseeifyourconjecture
iscorrect.
13
Interpretation
of
the
dual.
Inadditiontothehelpitprovidesinfindingasolution,
thedualproblemoffersadvantagesintheinterpretationoftheoriginal,primalproblem.
Inpracticalcases,thedualproblemmaybeanalyzedintermsoftheprimalproblem.
Asanexample,considerthedietproblem,astandardminimumproblemoftheform
(2).Itsdualisthestandardmaximumproblem(1).First,letusfindaninterpretationof
thedualvariables,x1,x2,...,xn
.Inthedualconstraint,
n
aij
xj
=
bi,(18)
j=1
thevariablebi
ismeasuredaspriceperunitoffood,Fi
,andaij
ismeasuredasunits
ofnutrientNj
perunitoffoodFi
.Tomakethetwosidesoftheconstraintcomparable,
xj
mustbemeasuredinofpriceperunitoffoodFi
.(Thisisknownasadimensional
n
analysis.)Sincecj
istheamountofNj
requiredperday,theobjectivefunction,1
cj
xj
,
representsthetotalpriceofthenutrientsrequiredeachday.Someoneisevidentlytrying
tochoosevectorx
ofpricesforthenutrientstomaximizethetotalworthoftherequired
nutrientsperday,subjecttotheconstraintsthatx
=
0,andthatthetotalvalueofthe
n
nutrientsinfoodFi
,namely,j=1
aij
xj
,isnotgreaterthantheactualcost,bi
,ofthat
food.
Wemayimaginethatanentrepreneurisofferingtosellusthenutrientswithoutthe
food,sayintheformofvitaminormineralpills.HeofferstosellusthenutrientNj
ata
pricexj
perunitofNj
.Ifhewantstodobusinesswithus,hewouldchoosethexj
so
thatpricehechargesforanutrientmixturesubstituteoffoodFi
wouldbenogreaterthan
theoriginalcosttousoffoodFi
.Thisistheconstraint,(18).Ifthisistrueforalli,we
n
maydobusinesswithhim.Sohewillchoosex
tomaximizehistotalincome,1
cj
xj
,
subjecttotheseconstraints.(Actuallywewillnotsavemoneydealingwithhimsincethe
mn
dualitytheoremsaysthatourminimum,yibi
,isequaltohismaximum,1
cjxj
.)
1
Theoptimalprice,xj
,isreferredtoastheshadow
price
ofnutrientNj
.Althoughno
suchentrepreneurexists,theshadowpricesreflecttheactualvaluesofthenutrientsas
shapedbythemarketpricesofthefoods,andourrequirementsofthenutrients.
Exercises.
1.Findthedualtothefollowingstandardminimumproblem.Findy1
,y2
andy3
to
minimizey1
+2y2
+y3
,subjecttotheconstraints,yi
=
0foralli,and
y1
-
2y2
+y3
=
2
-y1
+y2
+y3
=
4
2y1
+y3
=
6
y1
+y2
+y3
=
2.
2.ConsidertheproblemofExercise1.Showthat(y1,y2,y3)=(2/3,0,14/3)is
optimalforthisproblem,andthat(x1,x2,x3,x4)=(0,1/3,2/3,0)isoptimalforthedual.
14
3.Considertheproblem:Maximize3x1
+2x2
+x3
subjecttox1
=
0,x2
=
0,x3
=
0,
and
x1
-
x2
+x3
=
4
2x1
+x2
+3x3
=
6
-x1
+2x3
=
3
x1
+x2
+x3
=
8.
(a)Statethedualminimumproblem.
(b)Supposeyoususpectthatthevector(x1,x2,x3)=(0,6,0)isoptimalforthe
maximumproblem.UsetheEquilibriumTheoremtosolvethedualproblem,andthen
showthatyoursuspicioniscorrect.
4.(a)Statethedualtothetransportationproblem.
(b)Giveaninterpretationtothedualofthetransportationproblem.
15
3.
The
Pivot
Operation.
Considerthefollowingsystemofequations.
3y1
+2y2
=s1
y1
-
3y2
+3y3
=s2
(1)
5y1
+y2
+y3
=s3
Thisexpressesdependent
variables,s1
,s2
ands3
intermsoftheindependent
variables,
y1
,y2
andy3
.Supposewewishtoobtainy2
,s2
ands3
intermsofy1
,s1
andy3
.We
solvethefirstequationfory2
,
=1
y2
s1
-
3
y1,
22
andsubstitutethisvalueofy2
intotheotherequations.
y1
-
3(1
s1
-
3
y1)+3y3
=s2
22
5y1
+(1
s1
-
3
y1)+y3
=s3
.
22
Thesethreeequationssimplifiedbecome
-3
+1
2
y12
s1
=y2
11
y1
-
3
s1
+3y3
=s2
22
7
y1
+1
s1
+y3
=s3.(2)
22
Thisexampleistypicalofthefollowingclassofproblems.Wearegivenasystemof
nlinearfunctionsinmunknowns,writteninmatrixformas
y
TA
=s
T
(3)
whereyT
=(y1,...,ym),sT
=(s1,...,sn),and
.
a11
a12
...a1n
.
A
=.
.
.
a21
...
a22
...
...
...
a2n
....
.
.
.
aa...a
m1
m2
mn
Equation(3)thereforerepresentsthesystem
y1a11
+···
+yiai1
+···
+ymam1
=s1
...
...
...
y1a1j
+···
+yiaij
+···
+ymamj
=sj
(4)
...
...
...
y1a1n
+···
+yiain
+···
+ymamn
=sn.
Inthisform,s1,...,sn
arethedependentvariables,andy1,...,ym
aretheindependent
variables.
16
Supposethatwewanttointerchangeoneofthedependentvariablesforoneofthe
independentvariables.Forexample,wemightliketohaves1,...,sj-1,yi,sj+1,...,sn
in
termsofy1,...,yi-1,sj
,yi+1,...,ym
,withyi
andsj
interchanged.Thismaybedoneif
andonlyifaij
=0.Ifaij
=0,wemaytakethejthequationandsolveforyi
,tofind
1
yi
=(-y1a1j
-···-yi-1a(i-1)j
+sj
-yi+1a(i+1)j
-···-ymamj
).(5)
aij
Thenwemaysubstitutethisexpressionforyi
intotheotherequations.Forexample,the
kthequationbecomes
aika1j
aik
aikamj
y1
a1k
-
+···+sj
+···+ym
amk
-
=sk.(6)
aij
aij
aij
Wearriveatasystemofequationsoftheform
y1 a11
+···
+sj
a i1
+···
+yma m1
=s1
...
...
...
y1a 1j
+···
+sj
a ij
+···
+ym amj
=yi
(7)
...
...
...
y1a 1n
+···
+sj
a in
+···
+yma mn
=sn.
Therelationbetweenthe aij
sandtheaij
smaybefoundfrom(5)and(6).
1
=
aij
aij
a hj
=-
ahj
forh=i
aij
a ik
=aik
fork=j
aij
aikahj
a hk
=ahk
-
fork=jandh=i.
aij
Letusmechanizethisprocedure.Wewritetheoriginalm×nmatrixA
inadisplay
withy1
toym
downtheleftsideands1
tosn
acrossthetop.Thisdisplayistakento
representtheoriginalsystemofequations,(3).Toindicatethatwearegoingtointerchan
yi
andsj
,wecircletheentryaij
,andcallthisentrythe
pivot.Wedrawanarrowtothe
newdisplaywithyi
andsj
interchanged,andthenewentriesof aij
s.Thenewdisplay,
ofcourse,representstheequations(7),whichareequivalenttotheequations(4).
y1
.
.
.
yi
.
.
.
ym
s1
···
sj
···
sn
a11
···
a1j
···
a1n
.........
ai1
···
aij
···
ain
.........
am1
···
amj
···
amn
-.
y1
...
sj
...
ym
17
s1
···
yi
···
sn
a 11
···
a 1j
···
a 1n
...
...
...
a i1
···
a ij
···
ain
...
...
...
m1
···
a mj
···
amn
a
Intheintroductoryexample,thisbecomes
y1
y2
y3
s1
s2
s3
315
2-
31
031
y1
-.
s1
y3
y2
s2
s3
-
3/211/27/2
1/2-
3/21/2
031
(NotethatthematrixA
appearingontheleftisthetransposeofthenumbersasthey
appearinequations(1).)Wesaythatwehavepivoted
aroundthecircledentryfromthe
firstmatrixtothesecond.
Thepivotingrulesmaybesummarizedinsymbolicnotation:
pr1/pr/p
cq-.
-
c/pq-
(rc/p)
Thissignifies:Thepivotquantitygoesintoitsreciprocal.Entriesinthesamerowasthe
pivotaredividedbythepivot.Entriesinthesamecolumnasthepivotaredividedbythe
pivotandchangedinsign.Theremainingentriesarereducedinvaluebytheproductof
thecorrespondingentriesinthesamerowandcolumnasthemselvesandthepivot,divided
bythepivot.
Wepivottheintroductoryexampletwicemore.
y2
s2
s3
y1
-
3/211/27/2
s1
1/2-
3/21/2
y3
031
y1
-.
s1
s3
y2
s2
y3
-
3/2-
5-
7/2
1/2-
3-
1/2
031
s2
-.
s1
s3
Thelastdisplayexpressesy1
,y2
andy3
intermsofs1
,s2
ands3
.
andcolumns,wecanfindA-1
.
.
y1
y2
y3
-
.61.41.6
s1
-
.61.41.6
A-1
..
so=-
.2.3.7
s2
-
.2.3.7
.6-
.9-
1.1
s3
.6-
.9-
1.1
ThearithmeticmaybecheckedbycheckingAA-1
=I
.
Exercise.
SolvethesystemofequationsyTA
=sT
,
y1
y2
y3
y4
s1
s2
s3
s4
12
10
02-
11
-
1103
1-
221
18
y2
y1
y3
.3-
.2.7
1.4-
.61.6
-
.9.6-
1.1
Rearrangingrows
.
fory1
,y2
,y3
andy4
,bypivoting,inorder,abouttheentries
(1)firstrow,firstcolumn(circled)
(2)secondrow,thirdcolumn(thepivotis-1)
(3)fourthrow,secondcolumn(thepivotturnsouttobe1)
(4)thirdrow,fourthcolumn(thepivotturnsouttobe3).
RearrangerowsandcolumnstofindA-1
,andcheckthattheproductwithA
gives
theidentitymatrix.
19
4.
The
Simplex
Method
The
Simplex
Tableau.
Considerthestandardminimumproblem:Findy
to
minimizeyTb
subjecttoy
=
0
andyTA
=
cT
.Itisusefulconceptuallytotransform
thislastsetofinequalitiesintoequalities.Forthisreason,weaddslack
variables,
sT
=yTA-cT
=0.Theproblemcanberestated:Findy
ands
tominimizeyTb
subject
toy
=
0,s
=0
andsT
=yTA
-cT
.
WewritethisprobleminatableautorepresentthelinearequationssT
=yTA
-cT
.
s1
s2
···
sn
y1
y2
...
ym
a11
a21
...
am1
a12
a22
...
am2
···
···
···
a1n
a2n
...
amn
b1
b2
...
bm
1-c1
-c2
···
-cn
0
TheSimplexTableau
Thelastcolumnrepresentsthevectorwhoseinnerproductwithy
wearetryingtominimize.
If
-c
=
0
and
b
=
0,
there
is
an
obvious
solution
to
the
problem;
namely,
the
minimum
occurs
at
y
=0
and
s
=-c,
and
the
minimum
value
is
yTb
=0.Thisis
feasiblesincey
=
0,s
=
0,andsT
=yTA
-c,andyetyibi
cannotbemadeany
smallerthan0,sincey
=0,andb
=
0.
Supposethenwecannotsolvethisproblemsoeasilybecausethereisatleastone
negativeentryinthelastcolumnorlastrow.(exclusiveofthecorner).Letuspivotabou
a11
(supposea11
=0),includingthelastcolumnandlastrowinourpivotoperations.We
obtainthistableau:
y1
s2
···
sn
s1
y2
...
ym
a11
a21
...
am1
a12
a22
...
am2
···
···
···
a1n
a2n
...
amn
b1
b2
...
bm
1- c1
- c2
···
- cn
v
Letr
=(r1,...,rn)=(y1,s2,...,sn)denotethevariablesontop,andlett
=
(t1,...,tm)=(s1,y2,...,ym)denotethevariablesontheleft.ThesetofequationssT
=
TT
yTA
-cisthenequivalenttothesetr=tTA
-c
,representedbythenewtableau.
Moreover,theobjectivefunctionyTb
maybewritten(replacingy1
byitsvalueinterms
ofs1
)
m
b1
a21b1
am1b1
c1b1
yibi
=s1
+(b2
-
)y2
+···+(bm
-
)y2
+
a11
a11
a11
a11
i=1
T
=tb
+ v
20
Thisisrepresentedbythelastcolumninthenewtableau.
Wehavetransformedourproblemintothefollowing:Findvectors,y
ands,to
minimizetT b
subjecttoy
=0,s
=0andr
=tTA
-c
(wheretT
representsthevector,
(s1,y2,...,ym),andrT
represents(y1,s2,...,sn)).Thisisjustarestatement
ofthe
originalproblem.
Again,if- c
=
0
andb
0,wehavetheobvioussolution:t
=0
andr
=-c
with
value v.
Itiseasytoseethatthisprocessmaybecontinued.Thisgivesusamethod,admittedly
notverysystematic,forfindingthesolution.
The
Pivot
Madly
Method.
Pivot
madly
until
you
suddenly
find
that
all
entries
in
the
last
column
and
last
row
(exclusive
of
the
corner)
are
nonnegative
Then,
setting
the
variables
on
the
left
to
zero
and
the
variables
on
top
to
the
corresponding
entry
on
the
last
row
gives
the
solution.
The
value
is
the
lower
right
corner.
-u2
=a21x1
+a22x2
+···+a2nxn
-b2
etc.
become
1a12
a1n
b1
-x1
=u1
+x2
+xn
-
a11
a11
a11
a11
a21
a21a12
-u2
=-
u1
+a22
-
x2
+···
etc.
a11
a11
Inotherwords,thesamepivotrulesapply!
pr1/pr/p
cq-.
-c/pq-(rc/p)
21
Ifyoupivotuntilthelastrowandcolumn(exclusiveofthecorner)arenonnegative,you
canfindthesolutiontothedualproblemandtheprimalproblematthesametime.
Insummary,youmaywritethesimplextableauas
x1
x2
···
xn
-1
y1
y2
...
ym
a11
a21
...
am1
a12
a22
...
am2
···
···
···
a1n
a2n
...
amn
b1
b2
...
bm
1-c1
-c2
···
-cn
0
Ifwepivotuntilallentriesinthelastrowandcolumn(exclusiveofthecorner)arenonn
thenthevalueoftheprogramanditsdualisfoundinthelowerrightcorner.
Thesolutionoftheminimumproblemisobtainedbylettingtheyi
sontheleftbezero
andtheyi
sontopbeequaltothecorrespondingentryinthelastrow.Thesolutionof
themaximumproblemisobtainedbylettingthexj
sontopbezero,andthexj
sonthe
leftbeequaltothecorrespondingentryinthelastcolumn.
Example
1.
Considertheproblem:Maximize5x1
+2x2
+x3
subjecttoallxj
=
0
and
x1
+3x2
-
x3
=
6
x2
+x3
=
4
3x1
+x2
=
7.
Thedualproblemis:Minimize6y1
+4y2
+7y3
subjecttoallyi
=0and
y1
+3y3
=
5
3y1
+y2
+y3
=
2
-y1
+y2
=
1.
Thesimplextableauis
x1
x2
x3
y1
13-16
y2
0114
y3
3107
-5-2-10
.
Ifwepivotonceaboutthecircledpoints,interchangingy2
withx3
,andy3
withx1
,we
arriveat
y3
x2
y2
y1
23/3
x3
4
x1
7/3
5/32/3147/3.
22
Fromthiswecanreadoffthesolutiontobothproblems.Thevalueofbothproblemsis
47/3.Theoptimalvectorforthemaximumproblemisx1
=7/3,x2
=0andx3
=4.
Theoptimalvectorfortheminimumproblemisy1
=0,y2
=1andy3
=5/3.
The
Simplex
Method
isjustthepivotmadlymethodwiththecrucialaddedingredient
thattellsyouwhichpointstochooseaspivotstoapproachthesolutionsystematically.
Supposeafterpivotingforawhile,oneobtainsthetableau
r
t
A
b
-c
v
whereb
=
0.Thenoneimmediatelyobtainsafeasiblepointforthemaximumproblem
(infactanextremepointoftheconstraintset)bylettingr
=0
andt
=b,thevalueof
theprogramatthispointbeingv.
Similarly,ifonehad-c
=
0,onewouldhaveafeasiblepointfortheminimumproblem
bysettingr
=-c
andt
=0.
Pivot
Rules
for
the
Simplex
Method.
Wefirstconsiderthecasewherewehave
alreadyfoundafeasiblepointforthemaximumproblem.
Case
1:
b
=
0.
Take
any
column
with
last
entry
negative,
say
column
j0
with
-cj0
<0.
Among
those
ifor
which
ai,j0
>0,
choose
that
i0
for
which
the
ratio
bi/ai,j0
is
smallest.
(If
there
are
ties,
choose
any
such
i0
.)
Pivot
around
ai0,j0
.
Herearesomeexamples.Inthetableaux,thepossiblepivotsarecircled.
r1
r2
r3
r4
t1
1-1316
t2
01244
t3
30317
-5-1-42
r1
r2
r3
t1
5211
t2
10-10
t3
3-142
-1-2-30
0..
Whathappensifyoucannotapplythepivotruleforcase1?Firstofallitmight
happenthat-cj
=
0forallj.Thenyouarefinished youhavefoundthesolution.The
onlyotherthingthatcangowrongisthatafterfindingsome-cj0
<0,youfindai,j0
=
0
foralli.Ifso,thenthe
maximum
problem
is
unbounded
feasible.Toseethis,considerany
vector,r,suchthatrj0
>0,andrj
=0forj=j0
.Thenr
isfeasibleforthemaximum
problembecause
n
ti
=(-ai,j
)rj
+bi
=-ai,j0
rj0
+bi
=
0
j=1
foralli,andthisfeasiblevectorhasvaluecjrj
=cj0
rj0
,whichcanbemadeaslarge
asdesiredbymakingrj0
sufficientlylarge.
23
Suchpivotingrulesaregoodtousebecause:
1.Afterpivoting,theb
columnstaysnonnegative,soyoustillhaveafeasiblepointfor
themaximumproblem.
2.Thevalueofthenewtableauisneverlessthanthatoftheold(generallyitisgreater
Proofof1.Letthenewtableaubedenotedwithhatsonthevariables.Wearetoshow
bi
0foralli.Fori=i0
wehave bi0
=bi0
/ai0,j0
stillnonnegative,sinceai0,j0
>0.For
i
=i0
,wehave
ai,j0
bi0
bi
=bi
-
.
ai0,j0
Ifai,j0
=
0,then bi
=
bi
=
0sinceai,j0
bi0
/ai0,j0
=
0.Ifai,j0
>0,thenbythepivotrule,
bi/ai,j0
=
bi0
/ai0,j0
,sothat bi
=
bi
-
bi
=0.
Proofof2.
v =v-
(-
cj0
)(bi0
/ai0,j0
)=
v,because-
cj0
<0,ai0,j0
>0,andbi0
=
0.
Thesetwopropertiesimplythatifyoukeeppivotingaccordingtotherulesofthe
simplexmethodandthevaluekeepsgettinggreater,thenbecausethereareonlyafinite
numberoftableaux,youwilleventuallyterminateeitherbyfindingthesolutionorby
findingthattheproblemisunboundedfeasible.Intheproofof2,notethatvincreases
unlessthepivotisinarowwithbi0
=0.Sothesimplexmethodwilleventuallyterminate
unlesswekeeppivotinginrowswithazerointhelastcolumn.
Example
2.
Maximizex1
+x2
+2x3
subjecttoallxi
=
0and
x2
+2x3
=
3
-
x1
+3x3
=
2
2x1
+x2
+x3
=
1.
Wepivotaccordingtotherulesofthesimplexmethod,firstpivotingaboutrowthree
column2.
x1
x2
x3
y1
0123
y2
-
1032
y3
2111
-
1-
1-
20
-.
x1
y3
x3
y1
-
2-
112
y2
-
1032
x2
2111
11-
11
-.
x1
y3
y2
y1
4/3
x3
2/3
x2
1/3
2/311/35/3
Thevaluefortheprogramanditsdualis5/3.Theoptimalvectorforthemaximum
problemisgivenbyx1
=0,x2
=1/3andx3
=2/3.Theoptimalvectorfortheminimum
problemisgivenbyy1
=0,y2
=1/3andy3
=1.
Case
2:
Some
bi
are
negative.
Takethefirstnegativebi
,saybk
<0(whereb1
=
0,...,bk-1
=
0).Findanynegativeentryinrowk,sayak,j0
<0.(Thepivotwillbe
incolumnj0
.)Comparebk/ak,j0
andthebi/ai,j0
forwhichbi
=
0andai,j0
>0,and
choosei0
forwhichthisratioissmallest(i0
maybeequaltok).Youmaychooseany
suchi0
ifthereareties.Pivotonai0,j0
.
24
Herearesomeexamples.Inthetableaux,thepossiblepivotsaccordingtotherules
forCase2arecircled.
r1
r2
r3
r4
t1
23102
t2
-1-1-22-1
t3
1-10-1-2
1-1020
r1
r2
r3
t1
1-100
t2
-1-2-3-2
t3
2211
10-20
WhatiftherulesofCase2cannotbeapplied?Theonlythingthatcangowrongis
thatforbk
<0,wefindakj
=
0forallj.Ifso,thenthe
maximum
problem
is
infeasible,
sincetheequationforrowkreads
n
-tk
=akj
rj
-
bk.
j=1
Forallfeasiblevectors(t
=
0,r
=
0),theleftsideisnegativeorzero,andtherightside
ispositive.
TheobjectiveinCase2istogettoCase1,sinceweknowwhattodofromthere.The
ruleforCase2islikelytobegoodbecause:
1.Thenonnegativebi
staynonnegativeafterpivoting,and
2.bk
hasbecomenosmaller(generallyitgetslarger).
Proofof1.
Supposebi
=
0,soibi0
/ai0,j0
=k.Ifi=i0
,then =bi0
=
0.Ifi=i0
,
then
ai,j0
bi
=bi
-
bi0
.
ai0,j0
Nowbi0
/ai0,j0
=
0.Hence,ifai,j0
=
0,then bi
=
bi
=
0.andifai,j0
>0,then
bi0
/ai0,j0
=
bi/ai,j0
,sothat bi
=
bi
-
bi
=0.
Proofof2.
Ifk=i0
,then bk
=bk/ak,j0
>0(bothbk
<0andak,j0
<0).Ifk
=i0
,
then
ak,j0
bk
=bk
-
bi0
=
bk,
ai0,j0
sincebi0
/ai0,j0
=
0andak,j0
<0.
ThesetwopropertiesimplythatifyoukeeppivotingaccordingtotheruleforCase2,
andbk
keepsgettinglarger,youwilleventuallygetbk
=
0,andbeonecoefficientcloser
tohavingallbi
=
0.Noteintheproofof2,thatifbi0
>0,then bk
>bk
.
Example
3.
Minimize3y1
-
2y2
+5y3
subjecttoallyi
=
0and
-
y2
+2y3
=
1
y1
+y3
=
1
2y1
-
3y2
+7y3
=
5.
25
WepivotaccordingtotherulesforCase2ofthesimplexmethod,firstpivotingaboutrow
twocolumnone.
x1
x2
x3
y1
0123
y2
-
10-
3-
2
y3
2175
-
1-
1-
50
-.
y2
x2
x3
y1
0123
x1
-
1032
y3
2111
-
1-
1-
22
Notethatafterthisonepivot,wearenowinCase1.Thetableauisidenticaltotheexamp
forCase1exceptforthelowerrightcornerandthelabelsofthevariables.Furtherpivot
asisdonethereleadsto
y2
y3
x1
y1
4/3
x3
2/3
x2
1
2/311/311/3
Thevalueforbothprogramsis11/3.Thesolutiontotheminimumproblemisy1
=0,
y2
=2/3andy3
=1.Thesolutiontothemaximumproblemisx1
=0,x2
=1/3and
x3
=2/3.
The
Dual
Simplex
Method.
Thesimplexmethodhasbeenstatedfromthepoint
ofviewofthemaximumproblem.Clearly,itmaybestatedwithregardtotheminimum
problemaswell.Inparticular,ifafeasiblevectorhasalreadybeenfoundfortheminimum
problem(i.e.thebottomrowisalreadynonnegative),itismoreefficienttoimprovethis
vectorwithanotherfeasiblevectorthanitistoapplytheruleforCase2ofthemaximum
problem.
Westatethesimplexmethodfortheminimumproblem.
Case
1:
-
c
=
0.
Takeanyrowwiththelastentrynegative,saybi0
<0.Amongthosej
forwhichai0,j
<0,choosethatj0
forwhichtheratio-
cj/ai0,j
isclosesttozero.Pivot
onai0,j0
.
Case
2:
Some
-
cj
are
negative.
Takethefirstnegative-
cj
,say-
ck
<0(where
-
c1
=
0,...,-
ck-1
=
0).Findanypositiveentryincolumnk,sayai0,k
>0.Compare
-
ck/ai0,k
andthose-
cj
/ai0,j
forwhich-
cj
=
0andai0,j
<0,andchoosej0
forwhich
thisratioisclosesttozero.(j0
maybek).Pivotonai0,j0
.
Example:
y1
x2
x3
x1
1/2
y2
1
y3
5/2
1/23/22-
1/2
x1
x2
x3
y1
-
2-
1-
2-
1
y2
2352-.
y3
-
34-
11
123
0
26
IfthisexampleweretreatedasCase2forthemaximumproblem,wemightpivotabout
the4orthe5.Sincewehaveafeasiblevectorfortheminimumproblem,weapplyCase
1above,findauniquepivotandarriveatthesolutioninonestep.
Exercises.
Forthelinearprogrammingproblemsbelow,statethedualproblem,solve
bythesimplex(ordualsimplex)method,andstatethesolutionstobothproblems.
1.Maximizex1
-2x2
-3x3
-x4
subjecttotheconstraintsxj
=0foralljand
x1
-x2
-2x3
-
x4
=4
2x1
+x3
-4x4
=2
-2x1
+x2
+x4
=1.
2.Minimize3y1
-y2
+2y3
subjecttotheconstraintsyi
=0foralliand
2y1
-
y2
+y3
=-1
y1
+2y3
=
2
-7y1
+4y2
-6y3
=
1.
3.Maximize-x1
-x2
+2x3
subjecttotheconstraintsxj
=0foralljand
-3x1
+3x2
+x3
=3
2x1
-
x2
-2x3
=1
-x1
+x3
=1.
4.Minimize5y1
-2y2
-y3
subjecttotheconstraintsyi
=0foralliand
-2y1
+3y3
=-1
2y1
-
y2
+y3
=
1
3y1
+2y2
-
y3
=
0.
5.Minimize-2y2
+y3
subjecttotheconstraintsyi
=0foralliand
-y1
-2y2
=-3
4y1
+y2
+7y3
=-1
2y1
-3y2
+y3
=-5.
6.Maximize3x1
+4x2
+5x3
subjecttotheconstraintsxj
=0foralljand
x1
+2x2
+2x3
=
1
-3x1
+x3
=-1
-2x1
-
x2
=-1.
27
5.
Generalized
Duality.
Weconsiderthegeneralformofthelinearprogrammingproblem,allowingsomeconstraints
tobeequalities,andsomevariablestobeunrestricted(-8
<xj
<8).
The
General
Maximum
Problem.
Findxj
,j=1,...,n,tomaximizexTc
subjectto
n
aij
xj
=
bi
fori=1,...,k
j=1
n
aij
xj
=bi
fori=k+1,...,m
j=1
and
xj
=
0forj=1,...,
xj
unrestrictedforj=+1,...,n.
Thedualtothisproblemis
The
General
Minimum
Problem.
Findyi
,i=1,...,m,tominimizeyTb
subjectto
m
yiaij
=
cj
forj=1,...,
i=1
m
yiaij
=cj
forj=+1,...,n
i=1
and
yi
=
0fori=1,...,k
yi
unrestrictedfori=k+1,...,m.
Inotherwords,astrictequalityintheconstraintsofoneprogramcorrespondstoan
unrestrictedvariableinthedual.
Ifthegeneralmaximumproblemistransformedintoastandardmaximumproblem
by
1.replacingeachequalityconstraint,j
aij
xj
=bi
,bytwoinequalityconstraints,
j
aij
xj
==
bi
and(-aij
)xj
=-bi
,and
j
2.replacingeachunrestrictedvariable,xj
,bythedifferenceoftwononnegativevariables,
xj
=xj
-
xj
withxj
=
0andxj
=
0,
andifthedualgeneralminimumproblemistransformedintoastandardminimumproblem
bythesametechniques,thetransformedstandardproblemsareeasilyseentobedualsby
thedefinitionofdualityforstandardproblems.(Exercise1.)
ThereforethetheoremsondualityforthestandardprogramsinSection2arevalid
forthegeneralprogramsaswell.TheEquilibriumTheoremseemsasifitmightrequire
28
**
specialattentionforthegeneralprogrammingproblemssincesomeoftheyi
andxj
may
benegative.However,itisalsovalid.(Exercise2.)
Solving
General
Problems
by
the
Simplex
Method.
Thesimplextableauand
pivotrulesmaybeusedtofindthesolutiontothegeneralproblemifthefollowingmodifi
areintroduced.
1.
Considerthegeneralminimumproblem.Weaddtheslackvariables,sT
=yTA-cT
,
buttheconstraintsnowdemandthats1
=
0,...,s.
=
0,s+1
=0,...,sn
=0.Ifwepivot
inthesimplextableausothats+1
,say,goesfromthetoptotheleft,itbecomesan
independentvariableandmaybesetequaltozeroasrequired.Onces+1
isontheleft,
itisimmaterialwhetherthecorresponding bi
inthelastcolumnisnegativeorpositive,
sincethis bi
isthecoefficientmultiplyings+1
intheobjectivefunction,ands+1
iszero
anyway.Inotherwords,onces+1
ispivotedtotheleft,wemaydeletethatrow we
willneverpivotinthatrowandweignorethesignofthelastcoefficientinthatrow.
Thisanalysisholdsforallequalityconstraints:pivots+1,...,sn
totheleftand
delete.Thisisequivalenttosolvingeachequalityconstraintforoneofthevariablesand
substitutingtheresultintotheotherlinearforms.
2.
Similarly,theunconstrainedyi
,i=k+1,...,m,mustbepivotedtothetopwhere
theyrepresentdependentvariables.Oncetherewedonotcarewhetherthecorresponding
-c j
ispositiveornot,sincetheunconstrainedvariableyi
maybepositiveornegative.In
otherwords,onceyk+1
,say,ispivotedtothetop,wemaydeletethatcolumn.(Ifyou
wantthevalueofyk+1
inthesolution,youmayleavethatcolumnin,butdonotpivotin
thatcolumn ignorthesignofthelastcoefficientinthatcolumn.)
Afterallequalityconstraintsandunrestrictedvariablesaretakencareof,wemay
pivotaccordingtotherulesofthesimplexmethodtofindthesolution.
Similarargumentsapplytothegeneralmaximumproblem.Theunrestrictedxi
may
bepivotedtotheleftanddeleted,andtheslackvariablescorrespondingtotheequality
constraintsmaybepivotedtothetopanddeleted.
3.
Whathappensiftheabovemethodfortakingcareofequalityconstraintscannot
bemade?Itmayhappeninattemptingtopivotoneofthesj
forj=
+1totheleft,
thatoneofthem,saysa
,cannotbesomovedwithoutsimultaneouslypivotingsomesj
forj<abacktothetop,becauseallthepossiblepivotnumbersincolumnaarezero,
exceptforthoseinrowslabelledsj
forj=
+1.Ifso,columnarepresentstheequation
sa
=yj
aj,a
-
c a.
j=+1
Thistimetherearetwopossibilities.If ca
=0,the
minimum
problem
is
infeasible
sinceall
sj
forj=
+1mustbezero.Theoriginalequalityconstraintsoftheminimumproblem
wereinconsistent.If ca
=0,equalityisautomaticallyobtainedintheaboveequationand
columnamayberemoved.The
original
equality
constraints
contained
a
redundency.
Adualargumentmaybegiventoshowthatifitisimpossibletopivotoneofthe
unrestrictedyi
,sayyß
,tothetop(withoutmovingsomeunrestrictedyi
fromthetop
29
backtotheleft),thenthemaximumproblemisinfeasible,unlessperhapsthecorresponding
lastentryinthatrow, bß
,iszero.If bß
iszero,wemaydeletethatrowasbeingredundant.
4.
Insummary,thegeneralsimplexmethodconsistsofthreestages.Inthefirststage,
allequalityconstraintsandunconstrainedvariablesarepivoted(andremovedifdesired).
Inthesecondstage,oneusesthesimplexpivotingrulestoobtainafeasiblesolutionfor
theproblemoritsdual.Inthethirdstage,oneimprovesthefeasiblesolutionaccording
tothesimplexpivotingrulesuntiltheoptimalsolutionisfound.
Example
1.
Maximize5x2
+x3
+4x4
subjecttotheconstraintsx1
=
0,x2
=
0,
x4
=
0,x3
unrestricted,and
-
x1
+5x2
+2x3
+5x4
=
5
3x2
+x4
=2
-
x1
+x3
+2x4
=1.
Inthetableau,weputarrowspointingupnexttothevariablesthatmustbepivoted
tothetop,andarrowspointingleftabovethevariablestoendupontheleft.
x1
x2
x3
x4
.
y1
-
1525
5
.y2
0301
2
.y3
-
1012
.
1
0-
5-
1-
4
0
-.
x1
x2
.y3
x4
y1
.y2
.
x3
15-
21
0301
-
1012
3
2
1
-
1-
51-
21
Afterdeletingthethirdrowandthethirdcolumn,wepivoty2
tothetop,andwehave
foundafeasiblesolutiontothemaximumproblem.Wethendeletey2
andpivotaccording
tothesimplexruleforCase1.
x1
x2
.y2
y1
12-
11
x4
0312
-
1125
-.
-.
y1
x2
.y2
x1
121
x4
032
1316
Afteronepivot,wehavealreadyarrivedatthesolution.Thevalueoftheprogramis6,
andthesolutiontothemaximumproblemisx1
=1,x2
=0,x4
=2and(fromthe
equalityconstraintoftheoriginalproblem)x3
=-
2.
Solving
Matrix
Games
by
the
Simplex
Method.
Consideramatrixgamewith
n
n×
mmatrixA.IfPlayerIchoosesamixedstrategy,x
=(x1,...,xn)with1
xi
=1
n
andxi
=
0foralli,hewinsatleast.ontheaverage,where.=
i=1
xiaij
for
j=1,...,m.Hewantstochoosex1,...,xn
tomaximizethisminimumamounthe
wins.Thisbecomesalinearprogrammingproblemifweadd.tothelistofvariables
chosenbyI.Theproblembecomes:Choosex1,...,xn
and.tomaximize.subjectto
x1
=
0,...,xn
=
0,.unrestricted,and
n
.-
xiaij
=
0forj=1,...,n,and
i=1
n
xi
=1.
i=1
30
Thisisclearlyageneralminimumproblem.
PlayerIIchoosesy1,...,ywithyi
=0foralliandm
yi
=1,andlosesatmostm
1
µ,whereµ=
j=1
aij
yj
foralli.Theproblemistherefore:Choosey1
...,ym
andµto
minimizeµsubjecttoy1
=0,...,ym
=0,µunrestricted,and
m
µ-
aij
yj
=0fori=1,...,n,and
j=1
m
yj
=1.
j-1
ThisisexactlythedualofPlayerI sproblem.Theseproblemsmaybesolvedsimultaneously
bythesimplexmethodforgeneralprograms.
Note,however,thatifA
isthegamematrix,itisthenegativeofthetransposeofA
thatisplacedinthesimplextableau:
x1
x2
···
xn
..
y1
...
ym
.µ
-a11
-a21
...
-a1m
-a2m
11
···
···
···
-an1
-anm
1
1
...
1
0
0
...
0
1
00···
0-10
Example
2.
Solvethematrixgamewithmatrix
14.
0-1.
A
=
.
2-131
.
.
-1103
Thetableauis:
x1
x2
x3
..
y1
-1-2110
y2
-41-110
y3
0-3010
y4
1-1-310
.µ11101
000-10
Wewouldliketopivottointerchange.andµ.Unfortunately,asisalwaysthecasefor
solvinggamesbythismethod,thepivotpointiszero.Sowemustpivottwice,onceto
moveµtothetopandoncetomove.totheleft.Firstweinterchangey3
and.and
deletethe.row.Thenweinterchangex3
andµanddeletetheµcolumn.
x1
x2
x3
y3
y1
-111-10
y2
-44-1-10
y4
12-3-10
.µ11101
0-3010
-.
x1
x2
y3
y1
-20-1-1
y2
-35-11
y4
45-13
x3
1101
0-310
31
Now,weusethepivotrulesforthesimplexmethoduntilfinallyweobtainthetableau,say
y4
y2
y1
y3
3/7
x2
16/35
x1
2/7
x3
9/35
13/358/3514/3533/35
Therefore,thevalueofthegameis33/35.TheuniqueoptimalstrategyforPlayerIis
(2/7,16/35,9/35).TheuniqueoptimalstrategyforPlayerIIis(14/35,8/35,0,13/35).
Exercises.
1.(a)Transformthegeneralmaximumproblemtostandardformby(1)replacing
eachequalityconstraint,j
aij
xj
=bi
bythetwoinequalityconstraints,j
aij
xj
=bi
andj
(-aij
)xj
=-bi
,and(2)replacingeachunrestrictedxj
byxj
-xj
,wherexj
and
xarerestrictedtobenonnegative.
j
(b)Transformthegeneralminimumproblemtostandardformby(1)replacingeach
equalityconstraint,i
yiaij
=cj
bythetwoinequalityconstraints,i
yiaij
=cj
and
i
yj
(-aij
)=-cj
,and(2)replacingeachunrestrictedyi
byy-y,whereyandy
ii
ii
arerestrictedtobenonnegative.
(c)Showthatthestandardprograms(a)and(b)areduals.
**
2.Letx
andy
befeasiblevectorsforageneralmaximumproblemanditsdual
*
respectively.AssumingtheDualityTheoremforthegeneralproblems,showthatx
and
*
y
areoptimalif,andonlyif,
n
*
y=0foralliforwhichj
<bj
ij=1
aij
x
and(*)
m
*
x=0foralljforwhichi
aij
>cj.
ji=1
y
3.(a)StatethedualfortheproblemofExample1.
(b)FindthesolutionofthedualoftheproblemofExample1.
..
10-21
..
4.Solvethegamewithmatrix,A
=-1230.Firstpivottointer-
2-34-3
change.andy1
.Thenpivottointerchangeµandx2
,andcontinue.
32
6.
Cycling.
Unfortunately,therulesofthesimplexmethodasstatedgivenovisibleimprovement
ifbr
,theconstantterminthepivotrow,iszero.Infact,itcanhappenthatasequenceof
pivots,chosenaccordingtotherulesofthesimplexmethod,leadsyoubacktotheoriginal
tableau.Thus,ifyouusethesepivotsyoucouldcycleforever.
Example
1.
Maximize3x1
-5x2
+x3
-2x4
subjecttoallxi
=0and
x1
-2x2
-x3
+2x4
=0
2x1
-3x2
-x3
+x4
=0
x3
=1
Ifyouchoosethepivotsverycarefully,youwillfindthatinsixpivotsaccordingthethe
rulesofthesimplexmethodyouwillbebackwiththeoriginaltableau.Exercise1shows
howtochoosethepivotsforthistohappen.
A
modification
of
the
simplex
method
that
avoids
cycling.
Giventwon-
dimensionalvectorsr
ands,r
=s,wesaythatr
islexographically
less
than
s,insymbols,
r
.
s,ifinthefirstcoordinateinwhichr
ands
differ,sayr1
=s1
,...,rk-1
=sk-1
,
rk
=sk
,wehaverk
<sk
.
Forexample,(0,3,2,3).(1,2,2,-1).(1,3,-100,-2).
Thefollowingproceduremaybeusedtoavoidcycling.Addaunitmatrixtotheright
oftheb-columnofthesimplextableau,andanm-vector(cn+1,...,cn+m),initially0,to
therightofthevaluevariablev.Thisproducesamodifiedsimplextableau:
x1
x2
···
xn
y1
y2
...
ym
a11
a21
...
am1
a12
a22
...
am2
···
···
···
a1n
a2n
...
amn
b1
b2
...
bm
1
0
0
0
1
0
...
...
...
0
0
...
1
-c1
-c2
···
-cn
vcn+1
cn+2
...cn+m
Thinkoftherightsideofthetableauasvectors,b1
=(b1,1,0,...,0),...,bm
=
(bm,0,0,...,1),andv
=(v,cn+1,...,cn+m),andusethesimplexpivotrulesasbefore,
butreplacethebi
bythebi
andusethelexographicordering.
MODIFIEDSIMPLEXRULE:Wesupposeallbi
=
0.Findcs
<0.Amongallr
suchthatars
>0,pivotaboutthatars
suchthatbr/ars
islexographicallyleast.
Wenotethatthevectorsb1,...,bn
arelinearlyindependent,thatis,
m
aibi
=0
impliesai
=0fori=1,2,...,m.
i=1
33
Wewillbepivotingaboutvariouselementsars
0anditisimportanttonoticethat
=
thesevectorsstaylinearlyindependentafterpivoting.Thisisbecauseifb1,...,bm
are
linearlyindependent,andifafterpivoting,thenewb-vectorsbecome
b.
=(1/ars)br
and,fori=r,
r
(*)
b.
i
=bi
-
(ais/ars)br,
m
thenaib.
=0
impliesthat
i=1
i
aib.
i
=aibi
-
(aiais/ars)br
+(ar/ars)br
=0
i=1
i=r
i=r
whichimpliesthatai
=0fori=1,...,m.
Westatethebasicpropertiesofthemodifiedsimplexmethodwhichshowthatcycling
doesnotoccur.Notethatwestartwithallbi
.
0,thatis,thefirstnon-zerocoordinate
ofeachbi
ispositive.
Propertiesofthemodifiedsimplexrule:
(1)Ifallcs
=
0,asolutionhasalreadybeenfound.
(2)Ifforcs
<0,allars
=
0,thentheproblemisunbounded.
(3)Afterpivoting,theb.
staylexographicallypositive,asiseasilychecked
i
fromequations(*).
(4)Afterpivoting,thenewv.
islexographicallygreaterthanv,asiseasily
seenfromv.
=v
-
(cs/ars)br
.
Thus,fortheModifiedSimplexRule,thevaluev
alwaysincreaseslexographically
witheachpivot.Sincethereareonlyafinitenumberofsimplextableaux,andsincev
increaseslexographicallywitheachpivot,theprocessmusteventuallystop,eitherwithan
optimalsolutionorwithanunboundedsolution.
Thisfinallyprovidesuswithaproofofthedualitytheorem!Theproofisconstructive.
Givenaboundedfeasiblelinearprogrammingproblem,useoftheModifiedSimplexRule
willeventuallystopatatableau,fromwhichthesolutiontotheproblemanditsdualmay
bereadout.Moreoverthevalueoftheproblemanditsdualarethesame.
Inpracticalproblems,theModifiedSimplexRuleisneverused.Thisispartlybecause
cyclinginpracticalproblemsisrare,andsoisnotfelttobeneeded.Butalsothereisa
verysimplemodificationofthesimplexmethod,duetoBland( Newfinitepivotingrules
forthesimplexmethod ,Math.
of
Oper.
Res.
2,1977,pp.103-107),thatavoidscycling,
andisyetveryeasytoincludeinalinearprogrammingalgorithm.Thisiscalledthe
Smallest-Subscript
Rule:Ifthereisachoiceofpivotcolumnsorachoiceofpivotrows,
selecttherow(orcolumn)withthexvariablehavingthelowestsubscript,orifthereare
noxvariables,withtheyvariablehavingthelowestsubscript.
34
Exercises.
1.(a)SetupthesimplextableauforExample1.
(b)Pivotasfollows.
1.Interchangex1
andy1
.
2.Interchangex2
andy2
.
3.Interchangex3
andx1
.
4.Interchangex4
andx2
.
5.Interchangey1
andx3
.
6.Interchangey2
andx4
.
Now,noteyouarebackwhereyoustarted.
2.SolvetheproblemofExample1bypivotingaccordingtothemodifiedsimplexrule.
3.SolvetheproblemofExample1bypivotingaccordingtothesmallestsubscript
rule.
35
7.
Four
problems
with
nonlinear
objective
functions
solved
by
linear
methods.
1.
Constrained
Games.
Findxj
forj=1,...,ntomaximize
..
..
mincijxj
(1)
1=i=p
j=1
subjecttotheconstraintsasinthegeneralmaximumproblem
n
aij
xj
=
bi
fori=1,...,k
j=1
(2)n
aij
xj
=bi
fori=k+1,...,n
j=1
and
xj
=
0forj=1,...,
(3)
(xj
unrestrictedforj=+1,...,n)
Thisproblemmaybeconsideredasageneralizationofthematrixgameproblemfrom
playerI sviewpoint,andmaybetransformedinasimilarmannerintoagenerallinear
program,asfollows.Add.tothelistofunrestrictedvariables,subjecttotheconstraint
n
.-
cij
xj
=
0fori=1,...,p(4)
j=1
Theproblembecomes:maximize.subjecttotheconstraints(2),(3)and(4).
Example
1.
The
General
Production
Planning
Problem
(SeeZukhovitskiy
andAvdeyeva, LinearandConvexProgramming ,(1966)W.B.Saunderspg.93)There
arenactivities,A1,...,An
,acompanymayemployusingtheavailablesuppliesofm
resources,R1,...,Rm
.Letbi
betheavailablesupplyofRi
andletaij
betheamount
ofRi
usedinoperatingAj
atunitintensity.Eachactivitymayproducesomeorallof
thepdifferentpartsthatareusedtobuildacompleteproduct(say,amachine).Each
productconsistsofN1
parts#1,...,Np
parts#p.Letcij
denotethenumberofparts#i
producedinoperatingAj
atunitintensity.Theproblemistochooseactivityintensities
tomaximizethenumberofcompleteproductsbuilt.
Letxj
betheintensityatwhichAj
isoperated,j=1,...,n.Suchachoiceofinten
nn
sitiesproducesj=1
cijxj
parts#i,whichwouldberequiredinbuildingj=1
cij
xj
/Ni
completeproducts.Therefore,suchanintensityselectionmaybeusedtobuild
..
..
mincij
xj
/Ni
(5)
1=i=p
j=1
36
completeproducts.TheamountofRi
usedinthisintensityselectionmustbenogreater
thanbi
,
n
aij
xj
=
bi
fori=1,...,m(6)
j=1
andwecannotoperateatnegativeintensity
xj
=
0forj=1,...,n(7)
Wearerequiredtomaximize(5)subjectto(6)and(7).Whenp=1,thisreducestothe
ActivityAnalysisProblem.
Exercise
1.
Inthegeneralproductionplanningproblem,supposethereare3activities,
1resourceand3parts.Letb1
=12,a11
=2,a12
=3anda13
=4,N1
=2,N2
=1,
andN3
=1,andletthecij
beasgiveninthematrixbelow.(a)Setupthesimplex
tableauoftheassociatedlinearprogram.(b)Solve.(Ans.x1
=x2
=x3
=4/3,value=
8.)
A1
A2
A3
.
.
part#1246
C
=part#2
.
213
.
part#3132
2.
Minimizing
the
sum
of
absolute
values.
Findyi
fori=1,...,m,tominimize
p
.
m
.
.
yibij
-
bj
.
(8)
j=1
i=1
subjecttotheconstraintsasinthegeneralminimumproblem
m
yiaij
=
cj
forj=1,...,
i=1
(9)
m
yiaij
=cj
forj=+1,...,n
i=1
and
yi
=
0fori=1,...,k
(10)
(yi
unrestrictedfori=k+1,...,m.)
Totransformthisproblemtoalinearprogram,addpmorevariables,ym+1,...,ym+p
,
whereym+j
istobeanupperboundofthejthtermof(8),andtrytominimize
p
m+j
.Theconstraints
j=1
y
.
m
.
.
yibij
-
bj
.
=
ym+j
forj=1,...,p
i=1
37
areequivalenttothe2plinearconstraints
m
yibij
-
bj
=
ym+j
forj=1,...,p
i=1
(11)
m
-
yibij
+bj
=
ym+j
forj=1,...,p
i=1
p
Theproblembecomesminimizej=1
ym+j
subjecttotheconstraints(9),(10)and(11).
Inthisproblem,theconstraints(11)implythatym+1,...,ym+p
arenonnegative,soitdoes
notmatterwhetherthesevariablesarerestrictedtobenonnegativeornot.Computations
aregenerallyeasierifweleavethemunrestricted.
Example
2.
Itisdesiredtofindanm-dimensionalvector,y,whoseaveragedistance
topgivenhyperplanes
m
yibij
=bj
forj=1,...,p
i=1
00
isaminimum.Tofindthe(perpendicular)distancefromapoint(y1
,...,y)totheplane
m
mm
i=1
yibij
=bj
,wenormalizethisequationbydividingbothsidesbydj
=(bij
2
)1/2
.
i=1
m
0
Thedistanceisthen|
i
b.
-
b.
|,whereb.
=bij
/dj
andb.
=bj
/dj
.Therefore,we
i=1
yijjij
j
aresearchingfory1,...,ym
tominimize
p
.
m
1
.
.
yib.
-
b.
.
.
ij
j
p
j=1
i=1
Therearenoconstraintsoftheform(9)or(10)totheproblemasstated.
Exercise
2.
Considertheproblemoffindingy1
andy2
tominimize|y1
+y2
-
1|
+
|2y1
-
y2
+1|
+|y1
-
y2
-
2|
subjecttotheconstraintsy1
=
0andy2
=
0.(a)Setupthe
simplextableauoftheassociatedlinearprogram.(b)Solve.(Ans.(y1,y2)=(0,1),value
=3.)
3.
Minimizing
the
maximum
of
absolute
values.
Findy1,...,ym
tominimize
.
m
.
max
.
yibij
-
bj
.
(12)
1=j=p
i=1
subjecttothegeneralconstraints(9)and(10).Thisobjectivefunctioncombinesfeatures
oftheobjectivefunctionsof1.and2.Asimilarcombinationofmethodstransformsthis
problemtoalinearprogram.Addµtothelistofunrestrictedvariablessubjecttothe
constraints
.
m
.
.
yibij
-
bj
.
=
µforj=1,...,p
i=1
38
andtrytominimizeµ.Thesepconstraintsareequivalenttothefollowing2plinear
constraints
m
.
yibij
-
bj
=
µforj=1,...,p
i=1
m
(13)
.
-
yibij
+bj
=
µforj=1,...,p
i=1
Theproblembecomes:minimizeµsubjectto(9),(10)and(13).
Example
3.
Chebyshev
Approximation.
Givenasetofplinearaffinefunctions
inmunknowns,
m
.j
(y1,...,ym)=yibij
-
bj
forj=1,...,p,(14)
i=1
00
findapoint,(y1
,...,y),forwhichthemaximumdeviation(12)isaminimum.Sucha
m
pointiscalledaChebyshevpointforthesystem(14),andisinsomesenseasubstitute
forthenotionofasolutionofthesystem(l4)whenthesystemisinconsistent.Another
substitutewouldbethepointthatminimizesthetotaldeviation(8).Ifthefunctions(l4)
m
arenormalizedsothatb2
=1forallj,thenthemaximumdeviation(12)becomes
i=1
ij
themaximumdistanceofapointy
totheplanes
m
yibij
=bj
forj=1,...,p.
i=1
Withoutthisnormalization,onecanthinkofthemaximumdeviationasa weighted
maximumdistance.(SeeZukhovitskiyandAvdeyeva,pg.191,orStiefel NoteonJordan
Elimination,LinearProgramming,andTchebycheffApproximation Numerische
Mathematik
2
(1960),1-17.
Exercise
3.
FindaChebyshevpoint(unnormalized)forthesystem
.1(y1,y2)=y1
+y2
-
1
.2(y1,y2)=2y1
-
y2
+1
.3(y1,y2)=y1
-
y2
-
2
by(a)settinguptheassociatedlinearprogram,and(b)solving.(Ans.y1
=0,y2
=-1/2,
value=3/2.)
4.
Linear
Fractional
Programming.
(CharnesandCooper, Programmingwith
linearfractionalfunctionals ,Naval
Research
Logistics
Quarterly
9
(1962),181-186.)Find
x
=(x1,...,xn)T
tomaximize
cTx
+a
(15)
dTx
+ß
39
subjecttothegeneralconstraints(2)and(3).Here,c
andd
aren-dimensionalvectors
andaandßarerealnumbers.Toavoidtechnicaldifficultieswemaketwoassumptions:
thattheconstraintsetisnonemptyandbounded,andthatthedenominatordTx
+ßis
strictlypositivethroughouttheconstraintset.
Notethattheobjectivefunctionremainsunchangeduponmultiplicationofnumerator
anddenominatorbyanynumbert>0.Thissuggestsholdingthedenominatorfixedsay
(dTx
+ß)t=1,andtryingtomaximizecTxt+at.Withthechangeofvariablez
=xt,
thisbecomesembeddedinthefollowinglinearprogram.Findz
=(z1,...,zn)andtto
maximize
c
T
z
+at
subjecttotheconstraints
dT
z
+ßt=1
n
aij
zj
=
bitfori=1,...,k
j=1
n
aij
zj
=bitfori=k+1,...,m
j=1
and
t=
0
zj
=
0forj=1,...,
zj
unrestrictedforj=+1,...,n.
Everyvalueachievablebyafeasiblex
intheoriginalproblemisachievablebya
feasible(z,t)inthelinearprogram,bylettingt=(dTx
+ß)-1
andz
=xt.Conversely,
everyvalueachievablebyafeasible(z,t)witht>0inthelinearprogramisachievable
byafeasiblex
intheoriginalproblembylettingx
=z/t.Buttcannotbeequaltozero
foranyfeasible(z,t)ofthelinearprogram,sinceif(z,0)werefeasible,x
+dz
wouldbe
feasiblefortheoriginalprogramforalld>0andanyfeasiblex,sothattheconstraint
setwouldeitherbeemptyorunbounded.(Onemayshowtcannotbenegativeeither,so
thatitmaybetakenasoneoftheunrestrictedvariablesifdesired.)Hence,asolutionof
thelinearprogramalwaysleadstoasolutionoftheoriginalproblem.
Example
4.
Activity
analysis
to
maximize
rate
of
return.
Therearenactivities
A1,...,An
acompanymayemployusingtheavailablesupplyofmresources
R1,...,Rm
.Letbi
betheavailablesupplyofRi
andletaij
betheamountofRi
used
inoperatingAj
atunitintensity.Letcj
bethenetreturntothecompanyforOperating
Aj
atunitintensity,andletdj
bethetimeconsumedinoperatingAj
atunitintensity.
CertainotheractivitiesnotinvolvingR1,...,Rm
arerequiredofthecompanyandyield
netreturnaatatimeconsumptionofß.Theproblemistomaximizetherateofreturn
(15)subjecttotherestrictionsAx
=
b
andx
=
0.Wenotethattheconstraintsetis
nonemptyifb
=
0,thatitisgenerallybounded(forexampleifaij
>0foralliandj),
andthatdTx
+ßispositiveontheconstraintsetifd
=
0
andß>0.
40
Exercise
4.
Therearetwoactivitiesandtworesources.Thereare2unitsofR1
and
3unitsofR2
available.ActivityA1
operatedatunitintensityrequires1unitofR1
and
3unitsofR2
,yieldsareturnof2,andusesup1timeunit.ActivityA2
operatedatunit
intensityrequires3unitsofR1
and2unitsofR2
,yieldsareturnof3,andusesup2
timeunits.Itrequires1timeunittogetthewholeprocedurestartedatnoreturn.(a)
Setupthesimplextableauoftheassociatedlinearprogram.(b)Findtheintensitiesthat
maximizetherateofreturn.(Ans.A1atintensity5/7,A2atintensity3/7,maximalrate
=19/18.)
41
8.
The
Transportation
Problem.
ThetransportationproblemwasdescribedanddiscussedinSection1.Briefly,the
problemistofindnumbersyij
ofamountstoshipfromPortPi
toMarketMj
tominimize
thetotaltransportationcost,
IJ
yij
bij
,(1)
i=1
j=1
subjecttothenonnegativityconstraints,yij
=
0foralliandj,thesupplyconstraints,
J
.
j=1
yij
=
si
fori=1,...,I(2)
andthedemandconstraints,
I
.
i=1
yij
=
rj
forj=1,...,J(3)
wheresi
,rj
,bij
aregivennonnegativenumbers.
Thedualproblemistofindnumbersu1,...,uI
andv1,...,vJ
,tomaximize
J
.
j=1
rj
vj
-
I
.
i=1
siui
(4)
subjecttotheconstraintsvj
=
0,ui
=
0,and
vj
-
ui
=
bij
foralliandj.(5)
Clearly,thetransportationproblemisnotfeasibleunlesssupplyisatleastasgreat
asdemand:
IJ
si
=
rj
.(6)
i=1
j=1
Itisalsoeasytoseethatifthisinequalityissatisfied,thentheproblemisfeasible;
I
example,wemaytakeyij
=sirj
/(atleastifsi
>0.Sincethedualproblemis
i=1
si
obviouslyfeasible(ui
=vj
=0),condition(6)isnecessaryandsufficientforbothproblems
tobeboundedfeasible.
Below,wedevelopasimplealgorithmforsolvingthetransportationproblemunder
theassumptionthatthetotaldemandisequaltothetotalsupply.Thisassumptioncan
easilybeavoidedbythedeviceofaddingtotheproblemadummymarket,calledthe
dump,whoserequirementischosentomakethetotaldemandequaltothetotalsupply,
andsuchthatalltransportationcoststothedumparezero.Thusweassume
IJ
si
=rj
.(7)
i=1
j=1
42
Underthisassumption,theinequalitiesinconstraints(2)and(3)mustbesatisfied
withequalities,becauseiftherewereastrictinequalityinoneoftheconstraints(2)or
thensumming(2)overiand(3)overjwouldproduceastrictinequalityin(7).Thuswe
mayreplace(2)and(3)with
J
yij
=si
fori=1,...,I(8)
j=1
and
I
yij
=rj
forj=1,...,J.(9)i=1
Hence,inordertosolvebothproblems,itissufficient(andnecessary)tofindfeasible
vectors,yij
andui
andvj
,thatsatisfytheequilibriumconditions.Duetotheequalities
intheconstraints(8)and(9),theequilibriumconditionsreducetoconditionthatforall
iandj
yij
>0impliesthatvj
-
ui
=bij
.(10)
Thisproblemcan,ofcourse,besolvedbythesimplexmethod.However,thesimplex
tableauforthisprobleminvovesanIJbyI+Jconstraintmatrix.Instead,weuseamore
efficientalgorithmthatmaybedescribedeasilyintermsoftheIbyJtransportation
array.
M1
M2
...MJ
P1
b11
y11
b12
y12
...b1J
y1J
b21
y21
b22
y22
...b2J
y2J
...
...
...
bI1
yI1
bI2
yI2
...bIJ
yIJ
s1
P2
s2
(11)
.
.
.
PI
sI
r1
r2
rJ
Thefollowingisanexampleofatransportationarray.
M1
M2
M3
M4
P1
47113
7564
1348
5
(12)
P2
7
P3
8
2945
43
Thisindicatestherearethreeportsandfourmarkets.PortP1
has5unitsofthecommodity,
P2
has7units,andP3
has8units.MarketsM1
,M2
,M3
andM4
require2,9,4
and5unitsofthecommodityrespectively.Theshippingcostsperunitofthecommodity
areenteredintheappropriatesquares.Forexample,itcosts11perunitsentfromP1
to
M3
.Wearetoentertheyij
,theamountstobeshippedfromPi
toMj
,intothearray.
Thealgorithmconsistsofthreeparts.
1.Findabasicfeasibleshippingschedule,yij
.
2.Testforoptimality.
3.Ifthetestfails,findanimprovedbasicfeasibleshippingschedule,andrepeat2.
1.
Finding
an
initial
basic
feasible
shipping
schedule,
yij
.
Wedescribethe
methodinformallyfirstusingtheexamplegivenabove.Chooseanysquare,saytheupper
leftcorner,(1,1),andmakey11
aslargeaspossiblesubjecttotheconstraints.Inthiscase,
y11
ischosenequalto2.WeshipallofM1
srequirementsfromP1
.Thus,y21
=y31
=0.
Wechooseanothersquare,say(1,2),andmakey12
aslargeaspossiblesubjecttothe
constraints.Thistime,y12
=3,sincethereareonlythreeunitsleftatP1
.Hence,
y13
=y14
=0.Next,choosesquare(2,2),say,andputy22
=6,sothatM2
receivesallof
itsrequirements,3unitsfromP1
and6unitsfromP2
.Hence,y32
=0.Onecontinuesin
thiswayuntilallthevariablesyij
aredetermined.(Thiswayofchoosingthebasicfeasible
shippingscheduleiscalledtheNorthwestCornerRule.)
M1
M2
M3
M4
P1
4
2
7
3
113
75
6
6
1
4
134
3
8
5
5
(13)
P2
7
P3
8
2945
Wehavecircledthosevariables,yij
,thathaveappearedinthesolutionforuselater
infindinganimprovedbasicfeasibleshippingschedule.Occasionally,itisnecessaryto
circleavariable,yij
,thatiszero.Thegeneralmethodmaybestatedasfollows.
A1.
(a)
Choose
any
available
square,
say
(i0,j0),
specify
yi0j0
as
large
as
possible
subject
to
the
constraints,
and
circle
this
variable.
(b)
Delete
from
consideration
whichever
row
or
column
has
its
constraint
satisfied,
but
not
both.
If
there
is
a
choice,
do
not
delete
a
row
(column)
if
it
is
the
last
row
(resp.
column)
undeleted.
(c)
Repeat
(a)
and
(b)
until
the
last
available
square
is
filled
with
a
circled
variable,
and
then
delete
from
consideration
both
row
and
column.
Wenotetwopropertiesofthismethodofchoosingabasicfeasibleshippingschedule.
44
Lemma
1.
(1)
There
are
exactly
I+J-
1circled
variables.
(2)
No
submatrix
of
rrows
and
ccolumns
contains
more
than
r+c-
1circled
variables.
Proof.
Oneroworcolumnisdeletedforeachcircledvariableenteredxceptforthelast
oneforwhicharowandacolumnaredeleted.SincethereareI+Jrowsandcolumns,
theremustbeI+J-
1circledvariables,proving(1).Asimilarargumentproves(2)by
concentratingontherrowsandccolumns,andnotingthatatmostonecircledvariable
isdeletedfromthesubmatrixforeachofitsrowsandcolumns,andthewholesubmatrix
isdeletedwhenr+c-
1ofitsrowsandcolumnsaredeleted.
TheconverseofLemma1isalsovalid.
Lemma
2.
Any
feasible
set
of
circled
variables
satisfying
(1)
and
(2)
of
Lemma
1
is
obtainable
by
this
algorithm.
Proof.
Everyrowandcolumnhasatleastonecircledvariablesincedeletingarowor
columnwithnocircledvariablewouldgiveasubmatrixcontradicting(3).From(2),since
thereareI+JrowsandcolumnsbutonlyI+J-
1circledvariables,thereisatleast
oneroworcolumnwithexactlyonecircledvariable.Wemaychoosethisroworcolumn
firstinthealgorithm.Theremaining(I-
1)×
JorI×
(J-
1)subarraysatisfiesthe
sametwoproperties,andanotherroworcolumnwithexactlyonecircledvariablemaybe
chosennextinthealgorithm.Thismaybecontinueduntilallcircledvariableshavebeen
selected.
Toillustratethecirclingofazeroandtheuseof(b)ofalgorithmA1,wechoosea
differentorderforselectingthesquaresintheexampleabove.Wetrytofindagoodiniti
solutionbychoosingthesquareswiththesmallesttransportationcostsfirst.Thisiscall
theLeast-Cost
Rule.
Thesmallesttransportationcostisinthelowerleftsquare.Thusy31
=2iscircled
andM1
isdeleted.Oftheremainingsquares,3isthelowesttransportationcostandwe
mightchoosetheupperrightcornernext.Thus,y14
=5iscircledandwemaydelete
eitherP1
orM4
,butnotboth,accordingtorule(b).SaywedeleteP1
.Nexty32
=6is
circledandP3
isdeleted.Oftheports,onlyP2
remains,sowecircley22
=3,y23
=4
andy24
=0.
47113
5
75
3
6
4
4
0
1
2
3
6
48
5
7(14)
8
2945
2.
Checking
for
optimality.
Givenafeasibleshippingschedule,yij
,weproposeto
usetheequilibriumtheoremtocheckforoptimality.Thisentailsfindingfeasibleui
and
vj
thatsatisfytheequilibriumconditions(10).
45
Onemethodistosolvetheequations
vj
-
ui
=bij
(15)
forall(i,j)-squarescontainingcircledvariables(whetherornotthevariablesarezero)
ThereareI+J-
1circledvariablesandsoI+j-
1equationsinI+Junknowns.
Therefore,oneofthevariablesmaybefixed,sayequaltozero,andtheequationsmaybe
usedtosolvefortheothervariables.Someoftheui
orvj
mayturnouttobenegative,
butthisdoesnotmatter.Onecanalwaysaddalargepositiveconstanttoalltheui
and
vj
tomakethempositivewithoutchangingthevaluesofvj
-
ui
.
Oncetheui
andvj
havebeendeterminedtosatisfyequilibrium,feasibilitymustbe
checkedbycheckingthatvj
-
ui
=
bij
forall(i,j)-squareswithoutcircledvariables.In
summary,
A2.
(a)
Set
one
of
the
vj
or
ui
to
zero,
and
use
(15)
for
squares
containing
circled
variables
to
find
all
the
vj
and
ui
.
(b)
Check
feasibility,
vj
-
ui
=
bij
,
for
the
remaining
squares.
If
feasible,
the
solution
is
optimal
for
the
problem
and
its
dual.
Wemustprovethatpart(a)ofA2canalwaysbecarriedout.Thatis,wemustshow
thatwhenoneofthevariables,vj
orui
,issetequaltozero,thereexistsauniquesolution
to(15)forthe(i,j)-squarescontainingcircledvariables.AsintheproofofLemma2,
wemayfindarow(orcolumn)withexactlyonecircledvariable.Theui
(resp.vj
)
correspondingtothisrow(resp.column)maybefounduniquelyoncetherestoftheui
andvj
havebeendetermined.Wedeletethisrow(resp.column)andnotethatthesame
isalsotrueofthereducedarray.Continuinginlikemanner,wemayreducethearrayto
asingleelement.Eitherdualvariablecorrespondingtothissquaremaybefixedandthe
restofthevariablesfounduniquely.Theinitialfixedvariablemaybeadjustedtogivean
preassignedui
orvj
thevaluezero.
Letuscheckthefeasibleshippingschedule(14)foroptimality.
First
solve
for
the
ui
and
vj
.
Weputu2
=0becausethatallowsustosolvequicklyfor
v2
=5,v3
=6,andv4
=4.(Generally,itisagoodideatostartwithaui
=0(or
vj
=0)forwhichtherearemanycircledvariablesintheithrow(jthcolumn).)Knowing
v4
=4allowsustosolveforu1
=1.Knowingv2
=5allowsustosolveforu3
=2,which
allowsustosolveforv1
=3.Wewritethevj
variablesacrossthetopofthearrayand
ui
alongtheleft.
3
14
07
21
2
564
7113
55
5
3
6
4
4
07(16)
348
68
2945
46
Then,
check
feasibility
of
the
remaining
six
squares.
Theupperleftsquaresatisfiesthe
constraintvj
-
ui
=
bij
,since3-
1=2=
4.Similarly,allthesquaresmaybeseento
satisfytheconstraints,andhencetheabovegivesthesolutiontobothprimalanddual
problems.Theoptimalshippingscheduleisasnoted,andthevalueisyij
bij
=
2·
1+6·
3+3·
5+4·
6+0·
4+5·
3=74.Asacheck,vj
rj
-
uisi
=95-
21=74.
Noticethatifb21
wereequalto2insteadof7,thenthesameshippingschedulemay
beobtainedfromtheleastcostrule,yetitwouldnotbeoptimal,becausev1
-u2
>b21
=2.
3.
The
improvement
routine.
Supposewehavetestedafeasibleshippingschedule
foroptimalitybycomputingthedualvariablesui
andvj
tosatisfyequilibriumandfound
thatthedualvariablesarenotfeasible.Takeanysquare(i0,j0)forwhichvj0
-ui0
>bi0j0
.
WewouldliketoshipsomeamountofthecommodityfromportPtomarketMj0
,say
i0
y=..Butifweadd.tothatsquare,wemustsubtractandadd.toothersquares
i0j0
containingcircledvariablestokeeptheconstraintssatisfied.
Considertheaboveexamplewithb21
changedto2.Thenfeasibilityisnotsatisfied
forsquare(2,1).Wewouldliketoadd.tosquare(2,1).Thisrequiressubtracting.
fromsquares(3,1)and(2,2),andadding.tosquare(3,2).
47113
5
7564
+.-.340
1348
-
.2+.6
5
7(17)
8
2945
Wechoose.aslargeaspossible,bearinginmindthatnegativeshipmentsarenotallowed.
Thismeanswechoose.tobetheminimumoftheyij
inthesquaresinwhichweare
subtracting..Intheexample,.=2.
Atleastoneoftheyij
isputto,orremainsat,0.Removeanyonesuchfromthe
circledvariablesandcircley.Thenperformthecheckforoptimality.Thisisdonefor
i0j0
theexamplewhereitisseenthatthenewscheduleisoptimal,withvalue72.
2564
147113
55
02
2
5
1
6
4
4
07(18)
21348
88
2945
Insummary,
47
A3.
(a)
Choose
any
square
(i,j)with
vj
-
ui
>bij
,set
yij
=.,
but
keep
the
constraints
satisfied
by
subtracting
and
adding
.to
appropriate
circled
variables.
(b)
Choose
.to
be
the
minimum
of
the
variables
in
the
squares
in
which
.is
subtracted.
(c)
Circle
the
new
variable
and
remove
from
the
circled
variables
one
of
the
variables
from
which
.was
subtracted
that
is
now
zero.
Notethatifallnon-circledvariablesyij
aregivenanyvalues,wemaysolveforthe
circledvariablesoneatatimeusing(8)and(9)bychoosingaroworcolumnwithonecirc
variablefirst,andcontinuinginlikemanneruntilallvariablesarespecified.Therefore,
step(a)ofA3mayalwaysbecarriedout.
Wemustshowthatstep(c)ofA3leavesasetofcircledvariablesabtainablebythe
methodofA1ofthealgorithmsothatA2andA3mayberepeated.Toseethis,note
thatwhen.iscircledasanewvariable,thesetofvariablesdependingon.iscontained
inasquaresubarrayofsaykrowsandcolumnscontaining2kcircledvariables,with2
circledvariablesineachrowandcolumn.TheotherI+J-
2krowsandcolumnswith
circledvariablescanbedeletedoneatatimeasintheproofofLemma2.Ifanyoneof
theremainingcircledvariablesmayalsobedeletedoneroworcolumnatatime.
Letusseewhatimprovementismadeinthetransportationcostbythisprocedure.
Thecostbeforethechangeminusthecostafterwardmaybecomputedasyij
bij
-
+
-
+
yij
bij
=.bij
-
.bij
,whereisthesumoverthesquarestowhich.has
-
beenadded,andisthesumoverthesquarestowhich.hasbeensubtracted.Since
bij
=vj
-
ui
forallthosesquaresexceptthenewone,callit(i0,j0),wemaywritethis
improvementinthecostas
+
-
.(vj0
-
ui0
-
bi0j0
)-
.(vi
-
uj)+.(vj
-
ui)=.(vj0
-
ui0
-
bi0j0
)(19)
sinceeachvj
andui
thatisaddedisalsosubtracted.Thisisnevernegative,anditis
strictlypositiveif.>0.Thatistheimprovementroutinegivesastrictimprovement
when.>0.
Itmayhappenthat.=0,inwhichcasetheimprovementroutinegivesnoimprovement,
butchangesthebasicshippingscheduleintoanewonefromwhichonecanhope
foranimprovementorevenanoptimalitycheck.
Exercises.
Solvethetransportationproblemswiththefollowingarrays.
1.
14
26
2
2
31
48
2.
1358
2567
6
5
1235
3.
1089
523
674
768
15
20
30
35
252550
4.
4342
8675
6453
7564
4
4
6
4
2736
49
9.
Solutions
to
Exercises.
Solutions
to
Exercises
of
Section
1.
1.Thegraphoftheproblemis
6
5
4
3
2
1
1 2 3 4 5
2y1 + y2 = 5
y1 + 2y2 = 3
optimal point
y2
y1
Figure1.
Theconstraintsetisshaded.Theobjectivefunction,y1
+y2
,hasslope-1.As
wemovealineofslope-1down,thelastplaceittouchestheconstraintsetisatthe
intersectionofthetwolines,2y1
+y2
=5andy1
+2y2
=3.Thepointofintersection,
1
namely(21
,),istheoptimalvector.
33
1
2.Foralessthan-1,theoptimalvectoris(0,1).Forafrom-1to,theoptimal
2
51
81
vectoris(23
,).Forafromto2,theoptimalvectoris(83
,).Forafrom0to,the
32
32
optimalvectoris(3,0).Therefore,thevalueis
.
1fora=-1
.
(2a+5)/3for-1=
a=1/2
Value=
.
(8a+2)/3for1/2=a=2
.
3afora=2.
3.LetyT
=(y11,...,y1J,y21,...,y2J,···
,yI1,...,yIJ).Thenthemainconstraints
50
maybewrittenasyTA
=cT,where
..
-10···
010···
0
.
-10···
001···
0
.
..
.
......
.
......
.
......
.
..
.
-10···
000···
1
.
..
.
0-1···
010···
0
.
..
.
0-1···
001···
0
.
..
....
..
.
......
.
.
......
.
..
A
=
.
0-1···
000···
1
.
..
.
....
.
..
.
....
.
..
.
....
.
..
.
00···
-100···
0
.
..
.
00···
-101···
0
.
.
....
.
..
.
......
.
..
00···
-100···
1
....
and
c
T
=(-s1,-s2,...,-sI
,r1,r2,...,rJ
).
4.Sincex2
isunrestricted,wemustreplacex2
,whereveritoccurs,byu2
-v2
with
u2
=
0andv2
=
0.Thesecondmainconstraintisanequalitysoitmustbereplacedby
twoinequalities.Theprobleminstandardformbecomes:
Maximizex1
+2u2
-2v2
+3x3
+4x4
subjectto
4x1
+3u2
-
3v2
+2x3
+x4
=
10
x1
-
x3
+2x4
=
2
-x1
+x3
-
2x4
=-2
-x1
-
u2
+v2
-
x3
-
x4
=-1,
and
x1
=0,u2
=0,v2
=0,x3
=0,x4
=0.
51
Solutions
to
Exercises
of
Section
2.
1.Findx1
,x2
,x3
andx4
tomaximize2x1
+4x2
+6x3
+2x4
,subjectto
x1
-
x2
-
2x3
+x4
=
1
-2x1
+x2
+x4
=
2
x1
+x2
+x3
+x4
=
1
and
x1
=
0,x2
=
0,x3
=
0,x4
=
0.
14
12
2.Wecheckthaty
=(23
,0,)andx
=(0,3
,3
,0)arefeasiblefortheirrespective
3
problems,andthattheyhavethesamevalue.Clearly,y
=
0andx
=
0.Substituting
2
+14
16
+14
y
intothemainconstraintsofExercise1,wefind==
2,-2
=4=
4,
333
33
4
+14
2
+14
16
=6=
6,and==
2,soy
isfeasible.Similarlysubstitutingx
into
33
333
1
themainconstraintsofthesolutionofExercise1,wefind-
1
+4
=1=
1,
=
2,and
33
3
12
+14
16
3
+23
=2=
2,sox
isfeasible.Thevalueofy
is33
=3
,andthevalueofx
is
4
+12
=16
.Sincetheseareequal,bothareoptimal.
33
3
3.(a)Findy1
,y2
,y3
andy4
tominimize4y1
+6y2
+3y3
+8y4
,subjectto
y1
+2y2
-
y3
+y4
=
3
-y1
+y2
+y4
=
2
y1
+3y2
+2y3
+y4
=
1
and
y1
=
0,y2
=
0,y3
=
0,y4
=
0.
(b)Ifx
=(0,6,0)isoptimalforthemaximumproblem,thenthestrictinequalityin
thefirst,thirdandfourthmainconstraintsimpliesthaty1
=y3
=y4
=0.Also,x2
>0
impliesthatthereisequalityinthesecondconstraintintheminimumproblem.Solving
thisgivesy2
=2.Aftercheckingthaty
=(0,2,0,0)isfeasible,weconcludeitisoptimal.
I
J
4.(a)Findx
=(x1,...,xI
,xI+1,...,xI+J
)tomaximize-
i=1
sixi
+j=1
rj
xI+j
subjectto
-xi
+xI+j
=
bij
foralliandj
and
xi
=
0foralli.
(b)Sincebij
ismeasuredincost,sayindollars,perunitofthecommodity,themain
constraintsshowthatthexi
arealsomeasuredindollarsperunitofthecommodity.The
objectivefunctionisthereforemeasuredindollars.(Thisisthedimensionalanalysis.)We
mayimagineanindependententrepreneurwhoofferstobuythecommoditiesatportPi
52
forxi
dollarsperunit,andtosellthematmarketMj
forxI+j
dollarsperunit.Ifthemin
constraintsaresatisfied,wecanessentiallygetallourgoodstransportedfromtheports
themarketsatnoincreaseincost,sowewouldaccepttheoffer.Naturallyhewillchoose
I
J
xi
tomaximizehisprofit,whichisjusttheobjectivefunction,-
i=1
sixi
+j=1
rj
xI+j
.
Thus,xi
for1=
i=
Irepresentstheshadowvalueofaunitofthecommodityatport
Pi
,andxI+j
for1=
j=
Jrepresentstheshadowvalueofaunitofthecommodityat
marketMj
.
53
Solution
to
the
Exercise
of
Section
3.
s1
s2
s3
s4
y1
y2
y3
y4
110
02-
1
-
110
1-
22
2
1
3
1
-.
y1
y4
y2
s4
s1
2-
1-
21
-.
s3
-
2231
y3
s2
3-
2-
4
-
1123
1
Therefore,
A-1
y1
s2
y2
s4
s1
1102
s3
0-
2-
1-
1
y3
1205
y4
-
1121
y1
y2
y3
y4
=
s1
s2
s3
s4
1-
2
3
-
1
3
-
1
3
-
210
3
-
1
3
-
5
3
-
313
3
-
1
3
8
3
1-
4
3
1
3
-
2
3
s1
y2
y3
y4
y1
s2
s3
s4
1102
02-
11-.
1205
-
1-
32-
1
s1
-.
s3
s4
s2
.
3
y1
y4
y2
y3
1-
1
-
2
-
1
333
-
38
13
-
1
33
3
1
1-
2
-
4
333
5
10
-
2-
1
33
3
-
2-
1-
1.
1-
610-
1-
5=.
.
3.
-
913-
18.
3-
41-
2
54
Solutions
to
the
Exercises
of
Section
4.
1.Minimize4y1
+2y2
+y3
subjectto
y1
+2y2
-2y3
=
1
-y1
++y3
=-2
andy1
=0,y2
=0,y3
=0.
-2y1
+y2
=-3
-y1
-4y2
+y3
=-1
Pivotingaccordingtothesimplexrulesgives
x1
x2
x3
x4
y1
1-1-2-14
y2
201-42
y3
-21011
-12310
-.
y2
x2
x3
x4
15
-
1
3
y1
2
-1-2
11
-2
1
x1
2
02
111-3
3
y3
17
-1
1
2
22
y2
x2
x3
y1
x4
3
x1
7
y3
12
01114
-.
Fromthisweseethatthevalueforbothprogramsis4,thesolutiontotheminimum
problemisy1
=1,y2
=0,y3
=0,andthesolutiontothemaximumproblemisx1
=7,
x2
=0,x3
=0,x4
=3.
2.Maximize-x1
+2x2
+x3
subjectto
2x1
+x2
-7x3
=
3
-x1
+4x3
=-1
andy1
=0,y2
=0,y3
=0.
-2y1
+y2
=-3
-y1
-4y2
+y3
=-1
x1
x2
x3
y1
21-73
y2
-104-1
y3
12-62
1-2-1
0
y2
x2
x3
y1
2-111
x1
-1041
y3
12-21
1-23-1
-.
-.
y2
y3
x3
y1
3/2
x1
1
x2
1/2
2110
Thevalueiszero,thesolutiontotheminimumproblemisy1
=0,y2
=2,y3
=1,and
thesolutiontothemaximumproblemisx1
=1,x2
=1/2,x3
=0.
55
3.
x1
x2
x3
y1
-
3313
y2
2-
1-
21
y3
-
1011
11-
20
-.
x1
x2
y3
y1
-
23-
12
y2
0-
123
x3
-
1011
-
1122
Thefirstcolumnshowsthatthemaximumproblemisunboundedfeasible.
4.
x1
x2
x3
y1
-
2235
y2
0-
12-
2
y3
31-
1-
1
1-
100
-.
x1
x2
y3
y1
7532
y2
612-
4
x3
-
3-
1-
11
1-
100
Thesecondrowshowsthatthemaximumproblemisinfeasible.
5.UsingtheDualSimplexMethod,
-.
x1
x2
x3
y1
-
1420
y2
-
21-
3-
2
y3
0711
3150
y2
x2
x3
y1
1
x1
1
y3
1
3
2
5
2
1
2
-
3
Thevalueis-
3,thesolutiontotheminimumproblemisy1
=0,y2
=3/2,y3
=0,and
thesolutiontothemaximumproblemisx1
=1,x2
=0,x3
=0.
6.UsingtheDualSimplexMethod,case2,
-.
x1
x2
x3
y1
1221
y2
-
301-
1
y3
-
2-
10-
1
-
3-
4-
50
y1
x2
x3
x1
1
y2
2
y3
1
3213
Thevalueis3,thesolutiontotheminimumproblemisy1
=3,y2
=0,y3
=0,andthe
solutiontothemaximumproblemisx1
=1,x2
=0,x3
=0.
56
Solutions
to
the
Exercises
of
Section
5.
n
.
n
1.(a)Maximize+(-cj)xsubjectto
j=1
cj
xj
+j=+1
cj
xjj=+1j
n
n
aij
xj
+aij
xj
+(-aij
)xj
=
bi
fori=1,...,k
j=1
j=+1
j=+1
n
n
aij
xj
+aij
xj
+(-aij
)xj
=
bi
fori=k+1,...,m
j=1
j=+1
j=+1
n
n
aij
xj
+(-aij
)xj
+aij
xj
=
bi
fori=k+1,...,m
j=1
j=+1
j=+1
and
xj
=
0forj=1,...,
xj
=
0andxj
=
0forj=+1,...,n
k
m
.
m
(b)Minimizebiyi
+biy+(-bi)ysubjectto
i=1
i=k+1
ii=k+1i
km
m
yiaij
+yj
aij
+y(-aij
)=
cj
forj=1,...,
i
i=1
i=k+1
i=k+1
km
m
yiaij
+yj
aij
+y(-aij
)=
cj
forj=+1,...,n
i
i=1
i=k+1
i=k+1
km
m
yiaij
+yj
(-aij
)+yi
aij
=
cj
forj=+1,...,n
i=1
i=k+1
i=k+1
and
yi
=
0fori=1,...,k
yi
=
0andy=
0fori=k+1,...,m
i
(c)Itiseasytocheckthatthesestandardprogramsaredual.
2.OnecanmimictheproofoftheEquilibriumTheoremforStandardProblems.Let
**
x
andy
befeasiblefortheGeneralMaximumProblemanditsdual.Ifthecondition
(*)issatisfied,then
m
mn
mn
*
**
**
y=y()=y
i
bii
aij
xji
aij
xj
i=1
i=1
j=1
i=1
j=1
57
n
**
sinceyi
=0wheneverbi
=j=1
aij
xj
.Similarly,
n
nm
mn
*
**
**
cj
xj
=(yi
aij
)xj
=yi
aij
xj
.
j=1
j=1
i=1
i=1
j=1
**
Sincethevaluesareequal,bothx
andy
areoptimal.
**
Nowsupposex
andy
areoptimal.BytheDualityTheorem,theirvaluesareequal,
**
thatis,j
cjx=i
yi
bi
.But
j
cjxj
=
yiaij
xj
=
yibi
jji
i
*
forallfeasiblex
andy.Soforx
andy
*
,wegetequalitythroughout.Therefore,
*
(cj
-
aij
yi)xj
=0
ji
*
**
andsincecj
=
i
aij
yforallj,wemusthavethatx=0whenevercj
<i
aij
yi
.
i
.
j
**
Similarly,y=0wheneverj
aij
xj
<bi
,aswastobeshown.
i
3.(a)Minimize5y1
+2y2
+y3
subjectto
-
y1
-
y3
=
0
5y1
+3y2
=
5
andy1
=
0,y2
andy3
unrestricted.
2y1
+y3
=1
5y1
+y2
+2y3
=
4
(b)FromthedisplayinExample1,weseethattheoptimalvaluesarey1
=1,and
y2
=1.Thensolvingtheequalityconstraintfory3
,wefindy3
=1-
2y1
=-
1.
4.Wefirstpivottointerchangey1
and.anddeletethe.row.
-.
x1
x2
x3
..
y1
-
11210
y2
0-
2310
y3
2-
3-
410
y4
-
10310
.µ11101
000-
10
x1
x2
x3
y1
y2
1-
31-
10
y3
3-
4-
6-
10
y4
0-
11-
10
.µ11101
-
11210
Thenweinterchangex2
andµ,deletetheµrow,andpivotonceaccordingtotherules
ofthesimplexmethod:
x1
x3
y1
y2
44-
13
y3
7-
2-
14
y4
12-
11
x2
1101
-
211-
1
y3
x3
y1
y2
5/7
x1
4/7
y4
3/7
x2
3/7
2/73/75/71/7
-.
-.
Thevalueofthegameis1/7.TheoptimalstrategyforPlayerIis(4/7,3/7,0),andthe
optimalstrategyforPlayerIIis(5/7,0,2/7,0).
58
Solutions
to
the
Exercises
of
Section
6.
1.Pivotingaccordingtotheinstructionsgives
-.
-.
x1
x2
x3
x4
y1
1-
2-
120
y2
2-
3-
110
y3
00101
-
35-
120
y1
x2
x3
x4
x1
1-
2-
120
y2
-
211-
30
y3
00101
3-
1-
480
y1
y2
x3
x4
x1
-
321-
40
x2
-
211-
30
y3
00101
11-
350
y1
y2
x1
x4
x3
-
321-
40
x2
1-
1-
110
y3
3-
2-
141
-
873-
70
-.
-.
y1
y2
x1
x2
1-
2-
34
0
x3
1-
1-
11
0
x4
-
123-
4
1
y3
-
10-
47
0
x3
y2
x1
x2
y1
1-
2-
340
x4
-
11230
y3
10001
1-
2-
7110
x3
x4
x1
x2
y1
-
121-
20
y2
-
11230
y3
10001
-
12-
350
-.
-.
andwearebackwherewestartedwithjustsomecolumnsinterchanged.
2.
-.
x1
x2
x3
x4
y1
1-
2-
120100
y2
2-
3-
110010
y3
00101001
-
35-
120000
y2
x2
x3
x4
y1
-
.5-
.5-
.51.501-
.50
x1
.5-
1.5-
.5.500.50
y3
00101001
1.5.5-
2.53.5001.50
y2
x2
y3
x4
y1
-
.5-
.5.51.5.51-
.5.5
x1
.5-
1.5.5.5.50.5.5
x3
00101001
1.5.52.53.52.501.52.5
-.
Thevalueis2.5,thesolutiontothemaximumproblemisx
=(.5,0,1,0),andthesolution
totheminimumproblemisy
=(0,1.5,2.5).
59
3.ThefirstfourpivotsarethesameasforProblem1.Then
1
1
3
1
3
4
3
x2
0
-1
3
-4
3
5
3
y3
1
1
31
34
3
y1
y2
00
2
3-1
3
-1
3
2
3
-7
3
8
3
x3
x4
x1
1
1
21
2
5
2
x2
0
-1
2
-3
2
1
2
y3
1
1
21
25
2
y2
0
-1
2
1
2
3
2
x4
0
3
21
2
7
2
x3
y1
x1
y1
y2
x1
x2
1-
2-
34
0
x3
1-
1-
11
0
x4
-
123-
4
1
y3
-
10-
47
0
-.
-.
ThisisthesolutionfoundinProblem2,butwithsomecolumnsinterchangedandsome
rowsinterchanged.
60
Solutions
to
the
Exercises
of
Section
6.
1.Pivotingaccordingtotheinstructionsgives
-.
-.
x1
x2
x3
x4
y1
1-
2-
120
y2
2-
3-
110
y3
00101
-
35-
120
y1
x2
x3
x4
x1
1-
2-
120
y2
-
211-
30
y3
00101
3-
1-
480
y1
y2
x3
x4
x1
-
321-
40
x2
-
211-
30
y3
00101
11-
350
y1
y2
x1
x4
x3
-
321-
40
x2
1-
1-
110
y3
3-
2-
141
-
873-
70
-.
-.
y1
y2
x1
x2
1-
2-
34
0
x3
1-
1-
11
0
x4
-
123-
4
1
y3
-
10-
47
0
x3
y2
x1
x2
y1
1-
2-
340
x4
-
11230
y3
10001
1-
2-
7110
x3
x4
x1
x2
y1
-
121-
20
y2
-
11230
y3
10001
-
12-
350
-.
-.
andwearebackwherewestartedwithjustsomecolumnsinterchanged.
2.
-.
x1
x2
x3
x4
y1
1-
2-
120100
y2
2-
3-
110010
y3
00101001
-
35-
120000
y2
x2
x3
x4
y1
-
.5-
.5-
.51.501-
.50
x1
.5-
1.5-
.5.500.50
y3
00101001
1.5.5-
2.53.5001.50
y2
x2
y3
x4
y1
-
.5-
.5.51.5.51-
.5.5
x1
.5-
1.5.5.5.50.5.5
x3
00101001
1.5.52.53.52.501.52.5
-.
Thevalueis2.5,thesolutiontothemaximumproblemisx
=(.5,0,1,0),andthesolution
totheminimumproblemisy
=(0,1.5,2.5).
61
3.ThefirstfourpivotsarethesameasforProblem1.Then
1
1
3
1
3
4
3
x2
0
-1
3
-4
3
5
3
y3
1
1
31
34
3
y1
y2
00
2
3-1
3
-1
3
2
3
-7
3
8
3
x3
x4
x1
1
1
21
2
5
2
x2
0
-1
2
-3
2
1
2
y3
1
1
21
25
2
y2
0
-1
2
1
2
3
2
x4
0
3
21
2
7
2
x3
y1
x1
y1
y2
x1
x2
1-
2-
34
0
x3
1-
1-
11
0
x4
-
123-
4
1
y3
-
10-
47
0
-.
-.
ThisisthesolutionfoundinProblem2,butwithsomecolumnsinterchangedandsome
rowsinterchanged.
62
Solutions
to
the
Exercises
of
Section
8.
1.TheNorthwestCornerRuleandtheLeast-CostRuleleadtothesamefeasible
shippingschedule.Solveforthedualvariablesandfindthattheconstraintvj
-
ui
=
bij
isnotsatisfiedfori=1,j=2.Add.tothatsquare,andaddandsubtract.from
othersquareskeepingtheconstraintssatisfied.Thetransporationcostcanbeimproved
bytaking.=1.
2614
14
2
26
1
1
1
14
-
.2+.
26
+.1-
.1
0
2
2
-.
-.
0
-
1
2
2
14
11
26
2
2
2
313131
Thisleadstoatransportationarraythatsatisfiestheoptimalitycondition.Thevalueof
theoptimalshippingscheduleis1+4+4=9.Asacheck,vj
rj
-
uisi
=7+2=9.
2.TheLeast-CostRule,whichgivesthesameresultnomatterhowtherowsand
columnsarerearranged,leadstosuccessonthefirsttry.Thevalueis1+6+15+35=57.
1356
0
1
1
3
2
5
3
8
256
0
7
5
6
-
1
5
1235
3.AfterfindingtheLeast-Costshippingscheduleandthedualvaraibles,weseethat
theconstraintvj
-
ui
=
bij
isnotsatisfiedfori=2,j=3.Thisleadstoanimprovement
byadding.=5tothatsquare.Thenewscheduleisoptimal,withvalue535.
768767
-
1
1089
15
52
-
.20
3
+.
674
30
7
25
6
+.5
8
-
.5
-
2
15
1089
15
52
15
3
5
674
30
7
25
6
10
8
15
4
4
20
20
-.
4
3
30
30
0
0
35
35
252550252550
63
4.AfterfindinganinitialshippingscheduleusingtheLeast-CostRule,ittakestwo
moreapplicationsoftheimprovmentroutinewith.=1ineachtoarriveattheoptimal
schedule.
8675
3
4
+.
342
-.4
8
-
.2
67
2
5
64
-.4
53
+.2
75
+.3
6
-.1
4
4
0
4
2
6
1
4
2736
8776
4
4
+.1
342
-.3
8
-
.1
67
3
5
+.
64
3
53
3
75
4
64
4
0
4
3
6
2
4
2736
7675
3
4
2
342
2
867
3
5
1
64
3
53
3
75
4
64
4
0
4
2
6
1
4
2736
64
Related
Texts
[1]Va.sekChv´atal,Linear
Programming,(1983)W.H.Freeman&Co.
[2]G.B.Dantzig,Linear
Programming
and
Extensions,(1963)PrincetonUniversity
Press.
[3]DavidGale,The
Theory
of
Linear
Economic
Models,(1960)McGraw-Hill.
[4]SamuelKarlin,Mathematical
Methods
and
Theory
in
Games,
Programming
and
Economics,vol.1,(1959)Addison-Wesley.
[5]JamesK.Strayer,Linear
Programming
and
Applications,(1989)Springer-Verlag.
65