next up previous
Next: References Up: Easy Graph Problems Previous: Prim's algorithm

Dijkstra's Algoritm for shortest path problems

gif This algorithm applies for cases where all edge weights are non-negative. This algorithm finds the shortest path from a given vertex v to other vertices on the graph. At the beginning of an iteration, have a set of vertices S to which we know the shortest path from tex2html_wrap_inline588 grow set by one. This algorithm exhibits dynamic programming-like strategy.



Nitin Sharma
Wed Oct 8 17:46:14 PDT 1997