文檔第五次作業(yè)_第1頁
文檔第五次作業(yè)_第2頁
文檔第五次作業(yè)_第3頁
文檔第五次作業(yè)_第4頁
文檔第五次作業(yè)_第5頁
已閱讀5頁,還剩1頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

Assignment5

1PrimeandDual

SupposethatwearegivenalinearprogramLinstandardform,andsupposethatforbothLandthedualofL,thebasicsolutionsassociatedwiththeinitialslackformsarefeasible.ShowthattheoptimalobjectivevalueofLis0.

Answer:TheLandthedualofL’sinitialsolutionsbothare0,andbecauseanysolutionforLisnotsmallerthanthesolutionfordualofL.ThentheoptimalofL(minforL)andtheoptimalofdualofL(maxfordualofL)arethesame,allare0.

2Linear-InequalityFeasibility

Givenasetofmlinearinequalitiesonnvariablesx1,x2,...,xn,thelinear-inequalityfeasibilityproblemasksifthereisasettingofthevariablesthatsimultaneouslysatisfieseachoftheinequalities.

a.Showthatifwehaveanalgorithmforlinearprogramming,wecanuseittosolvethelinear-inequalityfeasibilityproblem.Thenumberofvariablesandconstraintsthatyouuseinthelinear-grogrammingproblemshouldbepolynomialinnandm.

b.Showthatifwehaveanalgorithmforthelinear-inequalityfeasibilityproblem,wecanuseittosolvealinear-programmingproblem.Thenumberofvariablesandlinearinequalitiesthatyouuseinthelinear-inequalityfeasibilityproblemshouldbepolynomialinnandm,thenumberofvariablesandconstraintsinthelinearprogramming.

Answer:

Noneedforoptimalfunctionforthelinear-inequalityfeasibilityproblem.ThenruntheLP-Algorithm.Infact,theLP-Algorithmispolynomialinnandm.

Weshouldrunthealgorithmforthelinear-inequalityfeasibilityproblemfortheLP-ProblemandDLP-Problem.Thenwegettwovalue(oneforLPandanotherforDLP,butneitherisoptimal)Butwecangettheoptimalmustbeintheintervalofthesetwovalues.ThenwegetthemedianofthesetwovaluesandaddmoreinequalityforLP-ProblemandcorrespondingDLP-Problem.Weiterativelyrunthealgorithmuntiltheintervalistoomuchsmall.ThenthissmallintervalistheoptimalvalueforLP-Problem.

3LinearProgrammingModelling

IntegerLinearProgrammingProblemisdifferentfromtheclassicLinearProgrammingProblemthatsomeextraconstraintssuchas

xiisaninteger,foralli=1,2,...,n

areadded.

Arailwaystationhasestimatedthatatleastthefollowingnumberofstaffisneededineachfour-hourintervalthroughoutastandard24-hourperiodandthesalaryperhourforeverypersonduringthedifferentperiod:

TimePeriodStaffNeeded

5:00-9:00S1

9:00-13:00S2

13:00-17:00S3

17:00-21:00S4

21:00-1:00S5

1:00-5:00S6

TimePeriodSalaryPerHourForEveryPerson

0:00-8:00C1

8:00-16:00C2

16:00-24:00C3

Allstaffworksin8-hour-shifts,whichmeanseverypersonwilldocontinuousworkfor8hours.Therearesixpossibleshiftsthatstartonthehourinthebeginningofeach4-hourperiodinthetable.Nowiftherailwaystationwanttominimizethetotalsalarypaidinoneday,pleaseformulatethisproblemasanintegerlinearprogrammingproblem.

Answer:Wecansetthenumberofstaffstartingworkingat5:009:0013:0017:0021:001:00arex1,x2,x3,x4,x5,x6.Sowecangettheintegerlinearprogrammingmodel:

Min:3*C1*x1+5*C2*x1+7*C2*x2+C3*x2+3*C2*x3+5*C3*x3+7*C3*x4+C1*x4+

3*C3*x5+5*C1*x5+7*C1*x6+C2*x6

s.t.x1+x6≥S1

x1+x2≥S2

x2+x3≥S3

x3+x4≥S4

x4+x5≥S5

x5+x6≥S6

foralli=1…6xiispositiveinteger

4LinearProgrammingModelling

0-1IntegerProgrammingProblemisdifferentfromtheclassicLinearProgrammingProblemthatsomeextraconstraintssuchas

xi2{0,1},foralli=1,2,...,n

areadded.

ThereisanundirectedgraphGwithnnodes.WeuseamatrixMtodenotethatwhethertwonodesareconnectedbyanedge.Inotherwords,Mijis1ifiandjareadjacent,and0otherwise.Ifyouwanttopaintthenodeswithsomecolors,suchthatanytwoadjacentnodesdon’tsharethesamecolor,andyoutrytouseaslesscolorsaspossible,pleaseformulatethisproblemasanintegerlinearprogrammingproblem(seethedefinitioninProblem4)ora0-1linearprogrammingproblem.

Answer:wecangetallthetwonodeswhicharenotconnectedbyanedgemeansavariable(thisvariablecanbe0meansthetwonodesarenotinsamecolor,1meansinsamecolor)alsowegetthetwonodeswhichareconnectedbyanedgemeansaconstantfor0(itmeansthesetwonodescanneverbeinsamecolor).Wewillgetthemaxthesumofallthesevariablesintheconstraints:foreverythreenodesweshouldbesurethatthesumofthree“edges”canneverbe2(becauseifitis2,itmeansinthesethreenodes,thenumberoftwonodesisinsamecoloris2andothertwonodes

Answer:

wesetx1isthenumberofproductIandx2isthenumberofproductII,sothelinearprogrammingisasfollowing:

max2x1+3x2ormin-2x1-3x2

s.t.x1+2x2≤8

4x1≤16

4x2≤12

x1≥0

x2≥0

Wegettheoptimalanswerisx1=4,x2=2,andthismaxis14

thedualproblem:wecansety1,y2,y3,isthenumberofdevice,materialAandmaterialB.Sotheduallinearprogrammingisasfollowing:

min8y1+16y2+12y3

s.t.y1+4y2≥2

2y1+4y3≥3

y1≥0

y2≥0

y3≥0

Wecanalsogettheoptimalanswerisy1=1.5,y2=0.125,y3=0,andthisminis14,too.Themeaningofthedualproblem:

Wecanthinkthatinthiscase,wemustbesurethattheprofitofproductIisatleast$2,andtheprofitofproductIIisatleast$3,andletthestuff(itmeansthatwegetminof8y1+16y2+12y3)beasleast

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論