Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 14

1

OR CHAPTER 18 SOLUTIONS FOR TEST #2


SECTION18.2SOLUTIONS
1.Defineft(i)tobetheshortestpathfromnodeitonode10
giventhatnodeisastagetnode.
Definext(i)tobetheendpointofthearcthatshouldbe
chosenifweareinnodei.
f4(8)=3x4(8)=10
f4(9)=4x4(9)=10
1+f4(8)=4*x3(5)=8
f3(5)=min
3+f4(9)=7
6+f4(8)=9
f3(6)=min
3+f4(9)=7*x3(6)=9
3+f4(8)=6*x3(6)=8
f3(7)=min
3+f4(9)=7
7+f3(5)=11*
f2(2)=min4+f3(6)=11*x2(2)=5or6
6+f3(7)=12

3+f3(5)=7*x2(3)=5
f2(3)=min2+f3(6)=9
4+f3(7)=10

4+f3(5)=8*
f2(4)=min1+f3(6)=8*x2(4)=5or6
5+f3(7)=11

2+f2(2)=13
f1(1)=min4+f2(3)=11*x2(1)=3or4
3+f2(4)=11*

2
Fromthisanalysisweseethat135810,146910,or145810are
allshortestpathsfromnode1tonode10(eachofthesepathshaslength
11).
2. See Figure below for network. Arc lengths indicate speech fee
travelcost.SundayBloomingtontoMondayIndianapolishasanarclength
of 5 while from Wednesday Bloomington to Thursday Indianapolis has a
lengthof165=11
Letft(i)bethemaximumnetprofitthatcanbeearnedduringdayst,t+
1,...5(includingdaytspeechfeeandtravelcostfromdaytcitytoday
t+1city)giventhatwebegindaytincityi.
LetI=IndianapolisB=BloomingtonC=Chicago.Sincewemustendupin
Indianapolis,
f4(I)=12,f4(B)=165=11,f4(C)=172=15andineach
ofthesestatestheoptimalactionistogotoIndianapolis
120+f4(I)=24
f3(I)=max125+f4(B)=18
122+f4(C)=25*(GotoCisoptimalhere)
165+f4(I)=23
f3(B)=max160+f4(B)=27*(StayinginBisoptimalhere)

167+f4(C)=24
172+f4(I)=27
f3(C)=max177+f4(B)=21
170+f4(C)=32*(StayinginCisoptimalhere)
120+f3(I)=37
f2(I)=max125+f3(B)=34
122+f3(C)=42*(GotoCisoptimalhere)
165+f3(I)=36
f2(B)=max160+f3(B)=43*(StayinginBisoptimalhere)
167+f3(C)=41

172+f3(I)=40
f2(C)=max177+f3(B)=37
170+f3(C)=49*(StayinginCisoptimalhere)
5+f2(I)=37
f1(B)=max0+f2(B)=43*(StayinginBisoptimalhere)
7+f2(C)=42

3
Retracing the optimal path we find that the salesman should speak in
BloomingtononMonday,Tuesday,andWednesdayandspeakinIndianapolison
Thursday.

SECTION18.3SOLUTIONS
1.

Produce x1(3) = 0 during month 1. Then produce x 2(3 1) = 3


unitsduringmonth2.Thenproducex3(2+33)=0unitsduring
month 3. Finally produce x4(2 2) = 4 units during month 4.
Minimumcostwillbef1(3)=$15.

2.Letft(i)betheminimumcostincurredduringmonthst,t+1,..3ifthe
inventoryatthebeginningofmonthtisi.
Notethatitisclearlysuboptimaltoproducemorethanthetotaldemand
of800units.Thismeansthatourinventoryatthebeginningofmonth3
can'texceed800(200+300)=300units.
Thusweneedonlycomputef3(i)fori=0,100,200and300.Asinthetext,
during month 3 we simply produce enough to meet month 3 demand from
currentinventoryandproduction.Letxt(i)bethequantitythatshouldbe
producedduringmonthtinordertoattainft(i).Then

f3(300)=0x3(300)=0
f3(200)=250+12(100)=1450x3(200)=100
f3(100)=250+12(200)=2,650x3(100)=200
f3(0)=250+12(300)=3,850x3(0)=300
Thenf2(i)=min{c(x)+1.5(i+x300)+f2(i+x300)}
x
wherec(0)=0
c(100)=250+10(100)=1,250
c(200)=250+10(200)=2,250
c(300)=250+10(300)=3,250
c(400)=250+10(400)=4,250
c(500)=250+10(500)=5,250
c(600)=250+10(600)=6,250
c(700)=250+10(700)=7,250
c(800)=250+10(800)=8,250
andx300i.Notethatduringmonth2enteringinventorycannotexceed800
200=600.Alsonotethatduringmonth2itwouldbefoolishtoproduce
morethan(300+300) i=600 iunits,becausewewouldthenhave
someinventoryattheendofmonth3.
Usingthesesimplificationsthenecessaryf2()computationsare
asfollows:
3,250+0+f3(0)=7100(Produce300)
4,250+150+f3(100)=7,050(Produce400)
f2(0)=min5,250+300+f3(200)=7,000(Produce500)
6,250+450+f3(300)=6,700*(Produce600)

x2(0)=600

4
2,250+0+f3(0)=6,100(Produce200)
f2(100)=min3,250+150+f3(100)=6,050(Produce300)
4,250+300+f3(200)=6,000(Produce400)
5,250+450+f3(300)=5,700*(Produce500)
x2(100)=500
1,250+0+f3(0)=5,100(Produce100)
f2(200)=min2,250+150+f3(100)=5,050(Produce200)
3,250+300+f3(200)=5,000(Produce300)
4,250+450+f3(300)=4,700*(Produce400)
x2(200)=400
0+0+f3(0)=3,850(Produce0)
f2(300)=min1,250+150+f3(100)=4,050(Produce100)
2,250+300+f3(200)=4,000(Produce200)
3,250+450+f3(300)=3,700*(Produce300)
x2(300)=300
0+150+f3(100)=2,800(Produce0)
f2(400)=min1,250+300+f3(200)=3,000(Produce100)
2,250+450+f3(300)=2,700*(Produce200)
x2(400)=200

0+300+f3(200)=1,750(Produce0)
f2(500)=min
1,250+450+f3(300)=1,700*(Produce100)
x2(500)=100
f2(600)=0+450+f3(300)=450x2(600)=0
Nowwecomputef1(0)from
f1(0)=min{c(x)+1.5(i+x200)+f2(i+x200)}
x
wherex200.Thus

2,250+0+f2(0)=8,950*(Produce200)

5
3,250+150+f2(100)=9,100(Produce300)
4,250+300+f2(200)=9,250(Produce400)
f1(0)=min5,250+450+f2(300)=9,400(Produce500)
6,250+600+f2(400)=9,550(Produce600)
7,250+750+f2(500)=9,700(Produce700)
8,250+900+f2(600)=9,600(Produce800)
x1(0)=200
Thus f1(0) = $8,950 and x1(0) = 200 radios should be produced during
month1.Thisyieldsamonth2inventoryof200 200=0.Thusduring
month2weproducex2(0)=600radios.Atthebeginningofmonth3the
inventorywillnowbe0+600300=300.Henceduringmonth3x3(300)=
0radiosshouldbeproduced.
Notethatthetotalproductioncostofthisplanis250+200(10)
+250+600(10)=8,500andTotalHoldingCost=1.5(300)=450(assessed
oninventoryatendofmonth2).Thustotalcostis8500+450=$8,950=
f1(0)
SECTION18.4
1.Letft(i)bethemaximumrevenueattainedfromsitest,t+1,..3ifi
milliondollarscanbeinvestedinthosesites.Letxt(i)betheamountof
money(inmillions)thatshouldbeassignedtositeiinordertoattain
ft(i).
Then(allfiguresareinmillions)
f3(4)=15x3(4)=4
f3(3)=13x3(3)=3
f3(2)=8x3(2)=2
f3(1)=7x3(1)=1
f3(0)=3x3(0)=0
f2(0)=3+f3(0)=6*x2(0)=0
3+f3(1)=10*x2(0)=0
f2(1)=max
6+f3(0)=9
3+f3(2)=11
f2(2)=max6+f3(1)=13*x2(2)=1or2
10+f3(0)=13*

3+f3(3)=16
f2(3)=max6+f3(2)=14
10+f3(1)=17*x2(3)=2
12+f3(0)=15
3+f3(4)=18
6+f3(3)=19*
f2(4)=max10+f3(2)=18
12+f3(1)=19*x2(4)=1or3
14+f3(0)=17
4+f2(4)=23
7+f2(3)=24*x1(4)=1
f1(4)=max8+f2(2)=21
9+f2(1)=19
11+f2(0)=17
Thusx1(4)=1milliondollarsshouldbeallocatedtosite1,x 2(41)=
2milliondollarsshouldbeallocatedtosite2andx 3(32)=1million
dollarsshouldbeallocatedtosite3.

4.Defineft(c)tobetheminimumnumberofcrimescommittedinprecincts
t,t+1,...3ifcsquadcarsmaybeallocatedtotheseprecincts.Also
definext(c)tobethenumberofcarsthatshouldbeassignedtoprecinct
tinordertoattainft(c).
In computing f3( ) it is clear that all available cars will be
allocatedtoprecinct3.Thisyields
f3(0)=20x3(0)=0
f3(1)=14x3(1)=1
f3(2)=11x3(2)=2
f3(3)=8x3(3)=3
f3(4)=6x3(4)=4
f3(5)=5x3(5)=5
Then
f2(0)=25+f3(0)=45*(Assign0toPre.2)x2(0)=0
25+f3(1)=39*(Assign0CarstoPre.2)
f2(1)=minx2(1)=0or1
19+f3(0)=39*Assign1CartoPre.2)

25+f3(2)=36(Assign0carstoPre.2)
f2(2)=min19+f3(1)=33*(Assign1CartoPre.2)x2(2)=1
16+f3(0)=36(Assign2CarstoPre.2)
25+f3(3)=33(Assign0CarstoPre.2)
19+f3(2)=30*(Assign1CartoPre.2)x2(3)=1or2

7
f2(3)=min16+f3(1)=30*(Assign2CarstoPre.2)
14+f3(0)=34(Assign3CarstoPre.2)

25+f3(4)=31(Assign0CarstoPre.2)
19+f3(3)=27*(Assign1CartoPre.2)x2(4)=1or2
f2(4)=min16+f3(2)=27*(Assign2CarstoPre.2)
14+f3(1)=28(Assign3CarstoPre.2)
12+f3(0)=32(Assign4CarstoPre.2)
25+f3(5)=30(Assign0CarstoPre.2)
19+f3(4)=25(Assign1CartoPre.2)
16+f3(3)=24*(Assign2CarstoPre.2)x2(5)=2
f2(5)=min14+f3(2)=25(Assign3CarstoPre.2)
12+f3(1)=26(Assign4CarstoPre.2)
11+f3(0)=31(Assign5CarstoPre.2)
14+f2(5)=38(Assign0CarstoPre.1)
10+f2(4)=37*(Assign1CartoPre.1)
7+f2(3)=37*(Assign2CarstoPre.1)
f1(5)=min4+f2(2)=37*(Assign3CarstoPre.1)
1+f2(1)=40(Assign4CarstoPre.1)
0+f2(0)=45(Assign5CarstoPre.1)
x1(5)=1,2or3

Severaloptimalallocationsofpatrolcars(allyielding37crimes)are
listedbelow
Precinct1Precinct2Precinct3TotalCrimes
31137
22137
21237
12237
11337

SECTION18.5SOLUTIONS
1.f5(1)=800,f5(2)=600,f5(3)=500
f4(3)=560+f5(1)=240*(Replace)
460+f5(1)=340(Replace)
f4(2)=min
120+f5(3)=380*(Keep)
260+f5(1)=540*(Replace)
f4(1)=min

8
80+f5(2)=520(Keep)

f3(3)=560+f4(1)=20*(Replace)
460+f4(1)=80(Replace)
f3(2)=min
120+f4(3)=120*(Keep)
260+f4(1)=280(Replace)
f3(1)=min
80+f4(2)=300*(Keep)
f2(3)cannotoccur
460+f3(1)=160(Replace)
f2(2)=min
120+f3(3)=140*(Keep)
260+f3(1)=40*(Replace)
f2(1)=min
80+f3(2)=40*(Keep)
f1(2)andf1(3)cannotoccur.

260+f2(1)=220*(Replace)
f1(1)=min
80+f2(2)=220*(Keep)
f0(0)=1,000+60+f1(1)=1,280*(Keep)
TodetermineanoptimalreplacementpolicynotethatatTime1weneed
toattainf1(1),sowemayeitherkeeporreplacethemachine.Supposewe
choosetokeepthemachine.ThenatTime2weneedtoattainf 2(2),sowe
keep the machine. Then we need to attain f 3(3),which requires that we
replacethemachine.Thentoattainf4(1)weagainreplacethemachine.
FinallywereplacethemachineatTime5.
2.Letg(t)betheminimumnetcostincurredfromTimettoTime6given
thatwehaveanewcaratTimet(includingpurchaseandsalvagecostsfor
thecarpurchasedatTimet).
Theng(6)=0.Alsonotethat
NetCostofKeepingCarfor1Year=10,0007000+300=$3300.
NetCostofKeepingCarfor2Years=10,0006000+300+500=$4800.
NetCostofKeepingCarfor3Years=10,000 4000+300+500+800=
$7600.
NetCostofKeepingCarfor4Years=10,000 3000+300+500+800+
1200=$9800.
NetCostofKeepingaCarfor5Years=10,0002000+300+500+800+
1200+1600=$12,400.
NetCostofKeepingaCarforSixYears=10,0001000+300+500+800
+1200+1600+2200=$15,600.
Then
g(5)=3300+g(6)=3300*(Keeptillendofyear6andtradein)

3300+g(5)=6600(NexttradeinatTime5)
g(4)=min
4800+g(6)=4800*(NexttradeinatTime6)

3300+g(4)=8,100(NexttradeinatTime4)
g(3)=min4800+g(5)=8,100(NexttradeinatTime5)
7600+g(6)=7,600*(NexttradeinatTime6)
3300+g(3)=10,900(NexttradeinatTime3)
4800+g(4)=9,600*(NexttradeinatTime4)
g(2)=min7600+g(5)=10,900(NexttradeinatTime5)
9800+g(6)=9,800(NexttradeinatTime6)
3300+g(2)=12,900(NexttradeinatTime2)
4800+g(3)=12,400*(NexttradeinatTime3)
g(1)=min7600+g(4)=12,400*(NexttradeinatTime4)
9800+g(5)=13,100(NexttradeinatTime5)

10
12,400+g(6)=12,400*(NexttradeinatTime6)

11

3300+g(1)=15,700(NexttradeinatTime1)
4800+g(2)=14,400*(NexttradeinatTime2)
g(0)=min7600+g(3)=15,200(NexttradeinatTime3)
9800+g(4)=14,600(NexttradeinatTime4)
12,400+g(5)=15,700(NexttradeinatTime5)
15,600+g(6)=15,600(NexttradeinatTime6)
Thusthecarshouldbetradedinattimes2,4and6.Anetcostof$14,400
willbeincurred.

SECTION18.6SOLUTIONS
1.Letft(i)=themaximumexpectednetprofitearnedduringyearst,t+
1,...10giventhatSuncohasibarrelsofreservesatthebeginningof
yeart.Then
f10(i)=max{xp10c(x)}
x
wherexmustsatisfy0xi.
Fort9
(1)ft(i)=max{xptc(x)+ft+1(i+btx)}
x
where0xi.

Weuse(1)toworkbackwardsuntilf1(i0)isdetermined.
(i0 = number of barrels available at beginning of period 1). If
discounting is allowed, let = the discount factor. Then we redefine
ft(i)tobemeasuredintermsofyeartdollars.Thenwereplace(1)by
(1')
(1')ft(i)=max{xptc(x)+ft+1(i+btx)}.
x
where0xb.
5. Let Subject 1 = French, Subject 2 = English, and Subject 3 =
Statistics.SinceProbabilityofpassingatleastonecourseequals1
(probabilityoffailingallthreecourses)ourproblemisequivalentto
minimizingtheprobabilityofflunkingall3subjects.Letf t(i)bethe
minimumprobabilityofflunkingsubjectst,t+1,...3whenihourscanbe
allocatedtothesesubjects.Letxt(i)beanoptimalallocationofstudy
hourstosubjecttwhichattainsft(i).
Then
f3(0)=.90x3(0)=0
f3(1)=.70x3(1)=1
f3(2)=.60x3(2)=2
f3(3)=.55x3(3)=3

12
f3(4)=.50x3(4)=4
f2(0)=.75(.90)=.675*x2(0)=0
.75f3(1)=.525*(0hrs.onEng.)x2(1)=0
f2(1)=min
.70f3(0)=.630(1hr.onEnglish)
.75f3(2)=*.45(0hrs.onEng.)x2(2)=0
f2(2)=min.70f3(1)=.49(1hr.onEng.)
.67f3(0)=.603(2hrs.onEng.)
.75f3(3)=.413*(0hrs.onEng.)x2(3)=0
f2(3)=min.70f3(2)=.420(1hr.onEng.)
.67f3(1)=.469(2hrs.onEng.)
.65f3(0)=.585(3hrs.onEng.)

13

.75f3(4)=.375*(0hrs.onEng.)x2(4)=0
.70f3(3)=.385(1hr.onEng.)
f2(4)=min.67f3(2)=.402(2hrs.onEng.)
.65f3(1)=.455(3hrs.onEng.)
.62f3(0)=.558(4hrs.onEng.)
.80f2(4)=.30(0hrs.onFrench)
.70f2(3)=.289*(1hr.onFrench)x1(4)=1
f1(4)=min.65f2(2)=.293(2hrs.onFrench)
.62f2(1)=.326(3hrs.onFrench)
.60f2(0)=.405(4hrs.onFrench)
We spend x1(4) = 1 hour studying French .x2(41) = 0 hours studying
English, and (of course!) 3 hours studying statistics. Her chance of
passingatleastonecourseis1.289=.711.
6.LetWarpDrive=Machine3,SolarRelay=Machine2,andReece'sPieces
Maker=Machine1.Thendefineft(a)tobethemaximumprobabilitythat
machinest,t+1,...3willworkduringET'striphomegiventhataactors
areavailabletoworkonmachinest,t+1,...3.Letx t(a)bethenumber
ofactorsthatmustbeassignedtomachinetinordertoattainft(a).
Then
f3(3)=.95x3(3)=3
f3(2)=.65x3(2)=2
f3(1)=.55x3(1)=1
f3(0)=.30x3(0)=0
.40f3(3)=.38(Assign0actorstoMach.2)
f2(3)=max.50f3(2)=.325(Assign1actortoMach.2)
.70f3(1)=.385*(Assign2actorstoMach.2)x2(3)=2
.90f3(0)=.270(Assign3actorstoMach.2)
.40f3(2)=.26(Assign0actorstoMach.2)
f2(2)=max.50f3(1)=.275*(Assign1actortoMach.2)x2(2)=1
.70f3(0)=.21(Assign2actorstoMach.2)
.40f3(1)=.22*(Assign0actorstoMach.2)x2(1)=0
f2(1)=max
.50f3(0)=.15(Assign1actortoMach.2)
f2(0)=.40f3(0)=.12*(Assign0actorstoMach.2)x2(0)=0
.45f2(3)=.173(Assign0actorstoMach.1)
f1(3)=max .55f2(2)=.151(Assign1actortoMach.1)

.80f2(1)=.176*(Assign2actorstoMach.1)x1(3)=2

.98f2(0)=.118(Assign3actorstoMach.1)
Sincex1(3)=2Machine1(theReece'sPiecesMaker)gets2actors.Then

14
x2(32)=0soMachine2(thesolarrelay)gets0actors.Thenx3(10)
=1soMachine3(theWarpDrive)gets1actor.ThusEThasonlya17.6%
chanceofgettinghome(maybeheshouldstayandmakeasequel!)
7.Defineft(w)tobethemaximumnetprofit(revenueslesscosts)obtained
fromthesteerduringweekst,t+1,...10giventhatthesteerweighsw
poundsatthebeginningofweekt.Thekeytotheproblemistoremember
thatrevenuesareonlyearnedduringweek10(becausethesteerisonly
soldonce!)Then
f10(w)=max{10g(w,p)c(p)}
p
where0p.
Thenfort9
ft(w)=max{c(p)+ft+1[g(w,p)]}
p
FarmerJonesshouldworkbackwardsuntilf1(w0)hasbeencomputed.
x

You might also like