Content deleted Content added
m disambig link, doesn't link properly |
m must have open-interval bracket for infinity |
||
Line 3:
<b>Dijkstra's algorithm</b>, named after its inventor the Dutch [[computer scientist]] [[Edsger Dijkstra]], solves a [[shortest path problem]] for a directed and connected [[graph theory|graph]] G(V,E) which has nonnegative (>=0) [[edge]] weights. The set V is the set of all [[vertex|vertices]] in the graph G. The set E is the set of ordered pairs which represent connected vertices in the graph (if (u,v) belongs to E then there is a connection from vertex u to vertex v).
Assume that the function w: V x V -> [0, ∞
cost to be infinite for pairs of vertices that are not connected by an edge.)
The cost of a path between two vertices is the sum of costs of the edges in that path. The cost of an edge can be thought of as (a generalisation of) the distance between those two vertices. For a given pair of vertices s,t in V, the algorithm finds the path from s to t with lowest cost (i.e. the shortest path).
|