🔍 Research any topic with AI-powered citations — Try Researchly freeStart Researching
Home/Research/how does Dijkstra's shortest path algorithm work t…
AI Research Answer

how does Dijkstra's shortest path algorithm work time complexity

Rahul PalRahul Pal·researched on Researchly·June 18, 2026Try free
ShareWhatsAppShare on X

Core Mechanism

Dijkstra's algorithm solves the Single-Source Shortest Path (SSSP) problem: given a positively weighted graph $G$ with a source vertex $s$, find the shortest path from $s$ to all other vertices in the graph.1
1
Undirected single-source shortest paths with positive integer weights in linear timeMikkel Thorup1999Journal of the ACM
View
The fundamental operating principle, as directly stated by Thorup (1999)1

, is:

Dijkstra's algorithm visits the vertices in order of increasing distance from $s$.

That is, at each step the algorithm selects the unvisited vertex with the smallest known distance $d(v)$ from the source:

$$d(v) = \min_{u \in \text{visited}} \bigl( d(u) + w(u, v) \bigr)$$

where $w(u, v)$ is the edge weight between vertices $u$ and $v$.


Historical Significance

Since 1959, all theoretical developments in SSSP for general directed and undirected graphs have been based on Dijkstra's algorithm.1

The Sorting Bottleneck and Complexity

Every implementation of Dijkstra's algorithm must sort vertices according to their distances from $s$. This sorting step is the algorithm's core computational bottleneck, and as Thorup (1999)1

notes:

"We do not know how to sort in linear time."

This directly implies that the time complexity of Dijkstra's algorithm is super-linear, bound by the cost of the vertex-ordering (priority queue) operations.1

The evidence does not state explicit big-O bounds (e.g., with a binary heap or Fibonacci heap), so I cannot cite those figures from the retrieved papers.


An Alternative: Avoiding the Sorting Bottleneck

Thorup (1999)1

presented a deterministic linear time and linear space algorithm for the undirected SSSP problem with positive integer weights, which avoids the sorting bottleneck entirely:

"The algorithm avoids the sorting bottleneck by building a hierarchical bucketing structure, identifying vertex pairs that may be visited in any order."
1
This is notable because it achieves $O(n + m)$ complexity (linear in vertices and edges) — something Dijkstra's classical approach cannot achieve due to its reliance on sorted vertex ordering.1

Application to Multi-Criteria Problems

Dijkstra's algorithm can be extended beyond single-weight graphs. Tarapata (2007)2demonstrates a comparison between mathematical programming (using CPLEX 7.0) and modified Dijkstra's algorithm applied to multi-weighted graph problems, including experimental results for multicriteria path selection in terrain-based grid networks.2
2
Selected Multicriteria Shortest Path Problems: An Analysis of Complexity, Models and Adaptation of Standard AlgorithmsZbigniew Tarapata2007International Journal of Applied Mathematics and Computer Science
View

Summary of What the Evidence Supports

Table
AspectEvidence
Core principleVisit vertices in increasing distance order from $s$
BottleneckSorting of vertices by distance
Since1959
Linear-time alternativeHierarchical bucketing (Thorup, undirected, integer weights)
Multi-weight extensionModified Dijkstra's for MOSP problems

Honest scope note: The retrieved evidence does not explicitly state standard complexity expressions such as $O((V + E)\log V)$. Those bounds are not cited above because the grounding rules prohibit stating claims not directly supported by the evidence blocks.

More research like thisResearch your own
give me a pdf of charak samhita written by ravidatta tripathi in hindi2 views·18 JunFor Indian undergraduate students preparing for high-stakes exams (such as JEE, NEET, or university finals), what does empirical research since 2015 say about the effectiveness of active recall and spaced repetition compared to rereading and highlighting on long-term retention and exam performance? Please: Give a concise overview of the main findings. Summarize at least 5 specific peer-reviewed studies, including sample size and key results. Explain limitations or conflicting results between studies. End with 5–7 practical, evidence-based study recommendations tailored to such students. Include inline citations in the answer and a short reference list with titles, years, and DOIs or journal names.12 views·15 JunBERT vs GPT architecture differences8 views·15 JunWhat is BERT and how does it work6 views·25 Maysteps of the Krebs cycle citric acid cycle and ATP yield4 views·17 JunUniAd4 views·27 May

Research smarter with AI-powered citations

Researchly finds and cites academic papers for any research topic in seconds. Used by students across India.