麻省理工大学算法导论lecture22

麻省理工大学算法导论lecture22

ID:33930903

大小:177.21 KB

页数:19页

时间:2019-02-28

麻省理工大学算法导论lecture22_第1页
麻省理工大学算法导论lecture22_第2页
麻省理工大学算法导论lecture22_第3页
麻省理工大学算法导论lecture22_第4页
麻省理工大学算法导论lecture22_第5页
资源描述:

《麻省理工大学算法导论lecture22》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、IntroductiontoAlgorithms6.046J/18.401J/SMA5503Lecture22Prof.CharlesE.LeisersonFlownetworksDefinition.AflownetworkisadirectedgraphG=(V,E)withtwodistinguishedvertices:asourcesandasinkt.Eachedge(u,v)∈Ehasanonnegativecapacityc(u,v).If(u,v)∉E,thenc(u,v)=0.Example:233113ss32tt223©2001byCharlesE.

2、LeisersonIntroductiontoAlgorithmsDay38L22.2FlownetworksDefinition.ApositiveflowonGisafunctionp:V×V→Rsatisfyingthefollowing:•Capacityconstraint:Forallu,v∈V,0≤p(u,v)≤c(u,v).•Flowconservation:Forallu∈V–{s,t},∑p(u,v)−∑p(v,u)=0.v∈Vv∈VThevalueofaflowisthenetflowoutofthesource:∑p(s,v)−∑p(v,s).v∈V

3、v∈V©2001byCharlesE.LeisersonIntroductiontoAlgorithmsDay38L22.3Aflowonanetworkpositivecapacityflow2:21:32:30:11:31:1ss2:31:2tt1:22:2u2:3Flowconservation(likeKirchoff’scurrentlaw):•Flowintouis2+1=3.•Flowoutofuis0+1+2=3.Thevalueofthisflowis1–0+2=3.©2001byCharlesE.LeisersonIntroductiontoAlgori

4、thmsDay38L22.4Themaximum-flowproblemMaximum-flowproblem:GivenaflownetworkG,findaflowofmaximumvalueonG.2:22:32:30:10:31:1ss2:31:2tt2:22:23:3Thevalueofthemaximumflowis4.©2001byCharlesE.LeisersonIntroductiontoAlgorithmsDay38L22.5FlowcancellationWithoutlossofgenerality,positiveflowgoeseitherfr

5、omutov,orfromvtou,butnotboth.vvvvNetflowfrom2:31:21:30:2utovinbothcasesis1.uuuuThecapacityconstraintandflowconservationarepreservedbythistransformation.INTUITION:Viewflowasarate,notaquantity.©2001byCharlesE.LeisersonIntroductiontoAlgorithmsDay38L22.6AnotationalsimplificationIDEA:Workwithth

6、enetflowbetweentwovertices,ratherthanwiththepositiveflow.Definition.A(net)flowonGisafunctionf:V×V→Rsatisfyingthefollowing:•Capacityconstraint:Forallu,v∈V,f(u,v)≤c(u,v).•Flowconservation:Forallu∈V–{s,t},∑f(u,v)=0.Onesummationv∈Vinsteadoftwo.•Skewsymmetry:Forallu,v∈V,f(u,v)=–f(v,u).©2001byCh

7、arlesE.LeisersonIntroductiontoAlgorithmsDay38L22.7EquivalenceofdefinitionsTheorem.Thetwodefinitionsareequivalent.Proof.(⇒)Letf(u,v)=p(u,v)–p(v,u).•Capacityconstraint:Sincep(u,v)≤c(u,v)andp(v,u)≥0,wehavef(u,v)≤c(u,v).•Flowconservation:∑f(u,v)=∑(p(u,v)−p(v,u))v∈

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。