- 1、本文档共17页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Shortest Path Problems.ppt
Shortest Path Problems Dijkstra’s Algorithm TAT ’01 Michelle Wang Introduction Many problems can be modeled using graphs with weights assigned to their edges: Airline flight times Telephone communication costs Computer networks response times Where’s my motivation? Fastest way to get to school by car Finding the cheapest flight home How much wood could a woodchuck chuck if a woodchuck could chuck wood? Optimal driving time Tokyo Subway Map Setup: G = weighted graph In our version, need POSITIVE weights. G is a simple connected graph. A simple graph G = (V, E) consists of V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements of V called edges. A labeling procedure is carried out at each iteration A vertex w is labeled with the length of the shortest path from a to w that contains only the vertices already in the distinguished set. Outline of Algorithm Label a with 0 and all others with ?. L0(a) = 0 and L0(v) = ? Labels are shortest paths from a to vertices Sk = the distinguished set of vertices after k iterations. S0 = ?. The set Sk is formed by adding a vertex u NOT in Sk-1 with the smallest label. Once u is added to Sk we update the labels of all the vertices not in Sk To update labels: Lk(a, v) = min{Lk-1(a, v), Lk-1(a, u) + w(u, v)} Remarks Implementing this algorithm as a computer program, it uses O(n2) operations [additions, comparisons] Other algorithms exist that account for negative weights Dijkstra’s algorithm is a single source one. Floyd’s algorithm solves for the shortest path among all pairs of vertices. Endnotes 1 Endnotes 2 For Math 3975: * * UCLA In N’ Out The Red Garter My cardboard box on Sunset the beach (dude) 9 25 19 16 5 21 31 36 Using the previous example, we will find the shortest path from a to c. a i r c b 9 25 19 16 5 21 31 36 Label a with 0 and all others with ?. L0(a) = 0 and L0(v) = ? L0(a) = 0 L0(i) = ? L0(r) = ? L0(c) = ? L0(b) = ? 9 25 19 16 5 21 31 36 Labels are shortest paths fr
您可能关注的文档
- MCNPX 2.5.0.ppt
- Meanings of “Development”.ppt
- Methods in genome wide association studies.Norú Moreno.ppt
- modal verb.ppt
- Module 1 Relationship.ppt
- Module 11 Unit 1 Careers and skills.ppt
- Module 3 LiteratureOliver Asks for More.ppt
- MODULE 4 New technology.ppt
- Module 4 The way we look.ppt
- Multi-scale modeling of the carotid artery.ppt
- Simplify your Job – Automatic Storage Management.ppt
- SO42-:要离开Cu2+,觉得它太懒(蓝)了.ppt
- Software Quality The Elusive Target.ppt
- SOL 3.11 Energy Sources.ppt
- Solar FAQs and Global Renewable Energy.ppt
- some famous tourist attractions in Beijing .ppt
- Speaker Chun-Hung WangDate 2010.11.19.ppt
- SQL The Query Language Part 1.ppt
- STANFORD B型主动脉夹层TEVAR术后截瘫的病因及诊治探讨.ppt
- State of New HampshireNH State Liquor Commission.ppt
文档评论(0)