


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The concept of shortest path problems in the context of directed weighted graphs. It covers different types of shortest path problems such as single source single destination and single source all destinations. The document also introduces a greedy algorithm, known as dijkstra's algorithm, for finding the shortest path from a single source to all destinations in a graph.
Typology: Study notes
1 / 4
This page cannot be seen from the preview
Don't miss anything!



1
2
3
4
5
6
7
1
7
1
2
3
4
5
6
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.
1
2
3
4
5
6
7
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.
1
2
3
4
5
6
7
Path (^) Length (^1 ) 1 3 2 1 3 5 5
Path Length (^1 )
1 3 2 (^1 3 )
1 2 6
1 3 5 4 9
1 3 6 10
1 3 6 7 11
1
2
3
4
5
6
7
d p
1
2
3
4 7
1
2
3
4
5
6
7
d p
1
1 3
2
5
6