Dijkstra Is NOT Greedy: A Global-to-Local Proof of Correctness
Shengbao Wang
Key points
From the paper's conclusion- The resulting proof highlights optimal substructure, boundary-state reduction, and dynamic-programming structure, and offers a conceptually simple alternative to the usual greedy explanation.
Abstract
Dijkstra's algorithm is almost universally classified as a canonical greedy algorithm. This paper challenges that conventional interpretation and presents a simple, direct proof of correctness from a different viewpoint. Contrary to the widespread intuition that the algorithm repeatedly makes a local choice and thereby reaches a global optimum, we show that the logical direction can be read in exactly the opposite way: at each iteration, the algorithm identifies a globally shortest path among all paths whose destinations remain unsolved, and the endpoint of that globally shortest path is therefore solved as a ``local'' shortest-path problem. In other words, the local shortest path is obtained as an immediate consequence of a global minimum. Based on this observation, we formulate a Three-Step Exclusion Method that interprets Dijkstra's iteration as deterministic contraction of the global path space. The resulting proof highlights optimal substructure, boundary-state reduction, and dynamic-programming structure, and offers a conceptually simple alternative to the usual greedy explanation.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Breaking the Sorting Barrier for Directed Single-Source Shortest PathsJournal of the ACM · 2026
- Local Representatives and Shortest Completions for Next-to-Shortest Paths in Directed GraphsarXiv · 2026
- Instance-Optimality of Single-Pair Personalized PageRankarXiv · 2026
- Instance-Optimality of Bidirectional Dijkstra on Simple GraphsarXiv · 2026
- Almost-Linear Decremental Single-Source Distance Estimates in Directed Graphs via Cut BalancearXiv · 2026
- Faster Directed SSSP on Digraphs with Random Sparse Supports or Few DFS ExceptionsarXiv · 2026