













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!














1
2
3
4
5
6
7
1
7
Leave source vertex using cheapest/shortest edge. Leave new vertex using cheapest edge subject to the constraint that a new vertex is reached. Continue until destination is reached.
Construct these up to n paths in order of increasing length. Assume edge costs (lengths) are >= 0. So, no path has length < 0. First shortest path is from the source vertex to itself. The length of this path is 0.
Greedy Single Source All Destinations
1
2
3
4
5
6
7
Path (^) Length
(^1 ) 1 3 2
1 3 5 5
Greedy Single Source All Destinations
Greedy Single Source All Destinations
1
2
3
4
5
6
7
d p
1
2
3
4 7
Greedy Single Source All Destinations
1
2
3
4
5
6
7
d p
1
1 3
5 3
1 3 5
4 7
Greedy Single Source All Destinations
1
2
3
4
5
6
7
d p
1
1 3
5 3
1 3 5
1 2
4
Greedy Single Source All Destinations
1
2
3
4
5
6
7
d p
1 3 6
7
Greedy Single Source All Destinations
Path (^1 )
1 3 2
(^1 3 )
(^1 2 )
1 3 5 4 9
Length
Data Structures For Dijkstra’s Algorithm