Lec-15 Dijkstra Algorithm
Lec-15 Dijkstra Algorithm
Lec-15 Dijkstra Algorithm
derived by a Dutch
computer scientist
‘Edsger Wybe
Dijkstra’ in 1956 and
published in 1959
Dijkstra's algorithm - is a solution to the single-source
shortest path problem in graph theory.
Works on both directed and undirected graphs. However, all
edges must have nonnegative weights.
Approach: Greedy
Input: Weighted graph G={E,V} and source vertex, such that
all edge weights are nonnegative
Output: Lengths of shortest paths (or the shortest paths
themselves) from a given source vertex to all other vertices
This algorithm finds the with
lowest cost (i.e. the shortest path)
path
between that vertex and every other
vertex. For example, if the vertices of
the graph represent cities and edge path
costs represent driving distances
between pairs of cities connected by a
direct road, Dijkstra's algorithm can be
used to find the shortest route between
one city and all other cities.
In this interconnected
‘Vertex’ we’ll use
‘Dijkstra’s Algorithm’.