Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M12448

Dijkstra's Algorithm

Dijkstra's Algorithm
TechnicalHigh supportAlgorithms
Included
account_tree

Updated 2026-07-30

Loading revision record…

Summary

Dijkstra's algorithm (DYKE-strəz) is an algorithm for finding the shortest paths between nodes in a weighted graph, which may represent, for example, a road network. It was conceived by computer scientist Edsger W. Dijkstra in 1956 and published three years later. Dijkstra's algorithm finds the sh…

Definition

A classic algorithm for computing the shortest paths from a starting node to all other nodes in a graph. It uses a greedy strategy, each time selecting the unvisited node with the current shortest distance. Scaffold use: the power of optimal substructure. Subpaths of shortest paths are also shortest paths—this property allows the problem to be decomposed.

How to use

The power of optimal substructure. Subpaths of shortest paths are also shortest paths—this property allows the problem to be decomposed.

Mechanism

In a non-negative weighted graph, use a greedy approach with a priority queue to find the single-source shortest path, progressively locking in the shortest distances.

Practice

In progress 0/1

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%

Cases

  • Shortest route calculation in map navigation.

Common pitfalls

  • Not applicable when edge weights are negative.
Sources

Source support: Explicit

References currently contain only Wikipedia links; primary sources still need review.

  • link
    en.wikipedia.orghttps://en.wikipedia.org/wiki/Dijkstra%27s_algorithmZH · Explicit
    verified
account_treeGenealogyexpand_more

RELATED MODELS