Dijkstras Algorithm
Dijkstras Algorithm
Dijkstra's algorithm
1.2 Introduction:
Conditions-
Dijkstra's algorithm
Example:
Find the shortest paths between K and L in the graph shown in fig using
Dijkstra's Algorithm.
Solution:
Step1: Include the vertex K is S and determine all the direct paths from
K to all other vertices without going through any other vertex.
S K a b c d L
S K a b c d L
S K a b c d L
K 0 3(K, c) 7(K, c) 2(K) 7(K, c, a) 8(K, c, b)
S K a b c d L
Hence we have found the shortest distance from K to all other vertices.
Thus, the shortest distance between K and L is 8 and the shortest path is
K, c, b, L.
Practice Questions
FAQ
Summary
Dijkstra Algorithm
Examples related to this Algorithm
Different applications of Algorithm
REFERENCES
Books
Websites
[1] https://www.gatevidyalay.com/dijkstras-algorithm-shortest-path-
algorithm/
[2]https://www.tutorialspoint.com/design_and_analysis_of_algorithms/
design_and_analysis_of_algorithms_shortest_paths.htm
[3]https://brilliant.org/wiki/dijkstras-short-path-finder/
[4] https://www.javatpoint.com/discrete-mathematics-dijkstras-
algorithm
Courses
[1] https://www.coursera.org/specializations/discrete-mathematics
[2] https://www.classcentral.com/course/swayam-discrete-mathematics-
12929
Video Links
[1] https://youtu.be/lAXZGERcDf4
[2] https://www.youtube.com/watch?v=wt5cqvfdyxg