












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!













Single Source Shortest Path
Shortest route in map Lowest cost trip Most efficient internet route
Can also be used to solve problem 1 Would use different algorithm if only interested in a single destination
Shortest Path – Intuition for Dijkstra’s
Shortest paths are known for nodes in S Store in C[K] length of shortest path to node K (for all paths through nodes in { S } ) Add to { S } next closest node
Shortest Path – Intuition for Djikstra’s
Previous shortest path to K already in C[ K ] Possibly shorter path to J by going through node K Compare C[ J ] with C[ K ] + weight of (K,J), update C[ J ] if needed
Dijkstra’s Shortest Path Example
1 0 none 2 none 3 none 4 none 5 none
Dijkstra’s Shortest Path Example
1 0 none 2 none 3 none 4 none 5 none
Djikstra’s Shortest Path Example
1 0 none 2 5 1 3 8 1 4 none 5 none
Dijkstra’s Shortest Path Example
1 0 none 2 5 1 3 6 2 4 15 2 5 none
Dijkstra’s Shortest Path Example
1 0 none 2 5 1 3 6 2 4 9 3 5 none
Dijkstra’s Shortest Path Example
1 0 none 2 5 1 3 6 2 4 9 3 5 none
Dijkstra’s Shortest Path Example
1 0 none 2 5 1 3 6 2 4 9 3 5 18 4
Dijkstra’s Shortest Path Example
1 0 none 2 5 1 3 6 2 4 9 3 5 18 4
Typical Problem for Exam/Quiz
CS History Moment: Edsger Wybe Dijkstra
Dutch computer scientist Contributions Shortest Path Algorithm Reverse Polish Notation Semaphore construct A. M. Turing Award Recipient Turing Awards - http://awards.acm.org/homepage.cfm?srt=all&awd= Info and picture from Wikipedia http://en.wikipedia.org/wiki/Edsger_Dijkstra