Changes to Dijkstra's algorithm

TechWritereditor · 5 Dec 2026, 03:24 · “New page”

+ added − removed (first version)

Title

Removed:  
Added: Dijkstra's algorithm

Short description

Removed:  
Added: Algorithm for finding shortest paths in a graph (1959)

Type

Removed:  
Added: technology

Summary

Removed:  
Added: Dijkstra's algorithm is a method for finding the shortest route from a starting point to other points in a network whose links have non-negative lengths. Devised by Edsger W. Dijkstra in 1956 and published in 1959, it underpins route planning and network routing.

Fact box

Removed:  
Added: Type: Graph search algorithm
Added: Inventor: Edsger W. Dijkstra
Added: Devised: 1956 (Mathematisch Centrum, Amsterdam)
Added: Published: 1959, Numerische Mathematik
Added: Problem solved: Single-source shortest paths

Article

Added: **Dijkstra's algorithm** is a step-by-step method for finding the shortest path between points in a network, such as cities connected by roads, when every link has a length that is zero or positive.[^3] It is named after the Dutch computer scientist [[Edsger W. Dijkstra]].[^2]
 
Added: ## History
Added: Dijkstra devised the algorithm while working at the Mathematisch Centrum in Amsterdam (now CWI), and first used it in 1956 to demonstrate a new computer, the ARMAC, at its official presentation.[^2] For the demonstration he chose the problem of finding the shortest route between two Dutch cities on a simplified map.[^2] He published it in 1959 in a three-page paper, "A note on two problems in connexion with graphs", in the first volume of the journal *Numerische Mathematik*.[^1] Similar methods were found independently by several other researchers in the late 1950s.[^3]
Added:  
Added: ## How it works
Added: The algorithm starts from a chosen home node and repeatedly picks the unprocessed node that is currently nearest to it, records that distance as final, and then checks whether going through this node gives a shorter route to its neighbours.[^3] Because it always takes the closest remaining node next, it is described as a greedy algorithm.[^3] If all distances are non-negative it is guaranteed to give the correct answer; with negative distances it may fail to find the best route.[^3] A simple version takes time proportional to the square of the number of nodes, and data structures such as heaps can speed up the selection step.[^3]
Added:  
Added: ## Uses and legacy
Added: The algorithm is widely taught in computer science and operations research and is used in applications such as online driving directions.[^3] In computer networks, the Open Shortest Path First (OSPF) routing protocol used on the [[Internet]] has each router build a tree of shortest paths, which the standard states is derived using the Dijkstra algorithm.[^4] In 1999 the computer scientist Mikkel Thorup observed that all theoretical developments on the single-source shortest path problem had been based on Dijkstra's algorithm.[^2]
Added:  
Added: ## See also
Added: - [[Edsger W. Dijkstra]]
Added: - [[Packet switching]]
Added: - [[TCP/IP]]

Sources

Removed:  
Added: A note on two problems in connexion with graphs | https://link.springer.com/doi/10.1007/BF01386390 | Numerische Mathematik (Springer) | 1959-12
Added: E.W. Dijkstra: brilliant, colourful, and opinionated | https://www.cwi.nl/about/history/e-w-dijkstra-brilliant-colourful-and-opinionated | CWI
Added: Dijkstra's Algorithm revisited: the dynamic programming connexion | https://ifors.ms.unimelb.edu.au/tutorial/dijkstra_new/index.html | University of Melbourne / IFORS
Added: RFC 2328: OSPF Version 2 | https://www.rfc-editor.org/rfc/rfc2328 | Internet Engineering Task Force | 1998-04

Categories

Removed:  
Added: Algorithms

Other names

Removed:  
Added: Dijkstra algorithm
Added: Shortest path first algorithm
Added: SPF algorithm