Dijkstra's algorithm
Also known as Dijkstra, Uniform-cost search, UCS
search heuristic-searchdecoupled-search
Dijkstra's algorithm finds cheapest paths from a start state when every step has a non-negative cost. It always expands the open state with the lowest cost from the start, g, so each state is expanded first along its cheapest path. It uses no estimate of the remaining cost; A* adds one.
See it run
The start state is the only open state.
Pseudocode
algorithm Dijkstra(s₀, goal)input: start state s₀, goal test goaloutput: a cheapest path to a goal state, or failureg[s₀] ← 0OPEN ← {s₀} ▷ ordered by gwhile OPEN ≠ ∅ dos ← extract-min(OPEN)if goal(s) thenreturn path-to(s)for each (s′, c) in successors(s) doif g[s] + c < g[s′] then ▷ g of an unseen state is ∞g[s′] ← g[s] + cparent[s′] ← sinsert-or-update(OPEN, s′, g[s′])return failureIn the crates
heuristic-searchUniform-cost search returning the cheapest path, the path, outcome and expansion counters.
decoupled-searchCost-optimal uniform-cost search over decoupled states.
Lineage
Comes from
Nothing on this site.
Led to
A* generalizes it
Bidirectional Dijkstra builds on it
Ideal-point heuristic builds on it
Morris 2014 backpropagation builds on it
Pattern database builds on it
RUL⁻ builds on it
Sleeve routing combines it
Suurballe's algorithm builds on it
Symbolic Dijkstra builds on it
Papers
- A note on two problems in connexion with graphs Edsger W. Dijkstra · 1959· Numerische Mathematik