1 / 13

15.082 and 6.855J

15.082 and 6.855J. Dijkstra’s Algorithm with simple buckets (also known as Dial’s algorithm). . . 0. . 1. . . . 2. 0. 1. 2. 3. 4. 5. 6. 7. 3. 4. 5. 6. An Example. Initialize distance labels. 4. 2. 4. 2. 2. Initialize buckets. 2. 1. 3. 1. 6. 4. 2. 3.

irene-miles
Download Presentation

15.082 and 6.855J

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 15.082 and 6.855J Dijkstra’s Algorithm with simple buckets (also known as Dial’s algorithm)

  2.  0  1    2 0 1 2 3 4 5 6 7 3 4 5 6 An Example Initialize distance labels 4 2 4 2 2 Initialize buckets. 2 1 3 1 6 4 2 3 Select the node with the minimum temporary distance label. 3 5 1

  3. 2 0 1 2 3 4 5 6 7 3 4 5 6 Update Step 2   4 2 4 2 2 0 2 1 3  1 6 4 2 3 3 5   4 1 2 3

  4. 0 1 2 3 4 5 6 7 Choose Minimum Temporary Label Find Min by starting at the leftmost bucket and scanning right till there is a non-empty bucket. 2  4 2 4 2 2 0 2 1 3  1 6 4 2 3 3 5  4 4 5 6 2 3

  5. 0 1 2 3 4 5 6 7 Update Step 6 2  4 2 4 2 2 0 2 1 3  1 6 4 2 3 3 5  4 4 3 4 5 6 3 2 3 4 5

  6. 0 1 2 3 4 5 6 7 Choose Minimum Temporary Label Find Min by starting at the leftmost bucket and scanning right till there is a non-empty bucket. 2 6 4 2 4 2 2 0 2 1 3  1 6 4 2 3 3 5 3 4 6 3 5 4

  7. 0 1 2 3 4 5 6 7 Update 2 6 4 2 4 2 2 0 2 1 3  1 6 4 2 3 3 5 3 4 6 3 5 4

  8. 0 1 2 3 4 5 6 7 Choose Minimum Temporary Label 2 6 4 2 4 2 2 0 2 1 3  1 6 4 2 3 3 5 3 4 6 5 4

  9. 0 1 2 3 4 5 6 7 Update 2 6 4 2 4 2 2 0 6 2 1 3  1 6 4 2 3 3 5 3 4 6 5 4 6

  10. 0 1 2 3 4 5 6 7 Choose Minimum Temporary Label 2 6 4 2 4 2 2 0 2 1 3 6 1 6 4 2 3 3 5 3 4 4 6

  11. 0 1 2 3 4 5 6 7 Update 2 6 4 2 4 2 2 0 2 1 3 6 1 6 4 2 3 3 5 3 4 4 6

  12. 0 1 2 3 4 5 6 7 Choose Minimum Temporary Label 2 6 4 2 4 There is nothing to update 2 2 0 2 1 3 6 1 6 4 2 3 3 5 3 4 6

  13. End of Algorithm 2 6 4 2 4 2 2 0 2 1 3 6 1 6 4 2 3 3 5 3 4 All nodes are now permanent The predecessors form a tree The shortest path from node 1 to node 6 can be found by tracing back predecessors

More Related