MIT1_204S10_lec12

MIT1_204S10_lec12 - 3/15/2010 1.204 Lecture 12...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
3/15/2010 1.204 Lecture 12 Greedy/dynamic programming algorithms: Shortest paths Shortest paths Shortest paths in networks Shortest path algorithm: Builds shortest path tree From a root node To all other nodes in the network. All shortest path algorithms are labeling algorithms Labeling is process of finding: Cost from root at each node (its label), and Predecessor node on path from root to node Algorithm needs two data structures: Find arcs out of each node Array-based representation of graph itself Keep track of candidate nodes to add to shortest path tree Candidate list (queue) of nodes as they are: Discovered and/or Revisited 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3/15/2010 2 Example Example (Lbl d (Label, predecessor) a b c 1 3 1 2 d a b c 1 3 1 2 (0, null) Root d
Background image of page 2
3/15/2010 3 Example (Lbl d d b di d (Label, predecessor) Example (Label, predecessor) (N (Node b discovered) a b c 1 3 1 2 (0, null) Root (3, a) d a b c 1 3 1 2 (0, null) Root (3, a) d (1, a)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
(3, a) 3/15/2010 4 Example (Lbl d (Label, predecessor) Example b i it d (Label, predecessor) a b c 1 3 1 2 (0, null) Root (3, a) (5, b) d (1, a) (N d (Node b revisited) a b c 1 3 1 2 (0, null) Root (5, b) (2, d) d (1, a)
Background image of page 4
(3, a) (5, b) (3, a) (5, b) 3/15/2010 5 Example (Lbl d (Label, predecessor) Example (Label, predecessor) a b c 1 3 1 2 (0, null) Root (2, d) (4, b) d (1, a) a b c 1 3 1 2 (0, null) Root (2, d) (4, b) d (1, a) Orange (thick) arcs are shortest path tree with distances and predecessors
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
- 3/15/2010 Types of shortest path algorithms Label setting. If arc is added to shortest path tree, it is permanent. Dijkstra (1959) is standard label setting algorithm. Fastest for dense networks with average out-degree ~> 30 Requires heap or sorted arcs Label correcting. If arc is added to tree, it may be altered later if better path if found. Series of algorithms, each faster, depending on how candidate list is managed. Fastest when out-degree ~< 30 Bellman-Ford (1958). New node discovered always put on back of candidate list and next node taken from front of list. (Queue) D’Esopo-Pape (1974). New node put on front of candidate list if it has been on list before, otherwise on back (‘Sharp labels’) Bertsekas (1992). New node put on front of candidate list if its label smaller than current front node, otherwise on back Hao-Kocur (1992). New node is put on front of list if it has been on list before. Otherwise it is put on back of list if label > front node and on front of list if smaller. (‘Sharp labels’) Previous example was label correcting Label setting requires looking at shortest arc at every step Computational results CPU times (in milliseconds) on road networks (HP9000 720 workstation 1992 (HP9000 720 workstation, 1992) Nodes Arcs Visit Dijkstra Bellman D’Esopo Bertsekas Hao-Kocur 5199 14642 13 98 42 37 21 19 28917 64844 96 1192 590 125 144 104 115812 250808 459 9007 5644 619 789 497 119995 271562 488 13352 7651 708 1183 596 187152 410338 779 27483 15067 1184 1713 926 Times are 300x faster today (hardware- Moore’s Law).
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/04/2011 for the course ESD 1.204 taught by Professor Georgekocur during the Spring '10 term at MIT.

Page1 / 18

MIT1_204S10_lec12 - 3/15/2010 1.204 Lecture 12...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online