Back to Blogs
Algorithm Research

Dijkstra's Algorithm Just Got Beaten

Neuradyne Team
January 21, 2026
8 min read
Dijkstra's Algorithm Just Got Beaten

For over 60 years, Dijkstra's algorithm has been the gold standard for finding the shortest paths from one source to all other nodes in a graph—used everywhere from GPS navigation to network routing and social network analysis.

Key Insight

The classic version runs in O(m + n log n) time, where m is edges and n is nodes. Most experts believed this 'sorting barrier' was fundamental.

The Breakthrough

In this 2025 paper, researchers from Tsinghua University, Stanford, and Max Planck Institute present the first deterministic algorithm that beats this bound on directed graphs:

O(m log^{2/3} n) time — asymptotically faster on sparse graphs

This is huge: it shatters a long-standing belief in theoretical computer science and opens the door to rethinking many graph problems.

Key Highlights

  • Breaks the sorting barrier: No longer do we need to fully sort all vertices by distance
  • Deterministic & real weights: Works on directed graphs with any non-negative real weights
  • Sparse graph win: Biggest speedup when m = O(n), common in road networks
  • Novel technique: Uses recursive divide-and-conquer + pivot selection
  • Impact: Challenges textbook dogma and may inspire faster algorithms
Graph algorithm visualization
Visualizing the breakthrough in shortest path algorithms

What the Paper Says

"We give a deterministic O(m log^{2/3} n)-time algorithm for single-source shortest paths (SSSP) on directed graphs with real non-negative edge weights in the comparison-addition model. This is the first result to break the O(m + n log n) time bound of Dijkstra's algorithm on sparse graphs."

Research Paper Authors

Code Comparison

dijkstra_classic.py
import heapq

def dijkstra(graph, start):
    distances = {node: float('inf') for node in graph}
    distances[start] = 0
    pq = [(0, start)]
    
    while pq:
        curr_dist, curr_node = heapq.heappop(pq)
        
        if curr_dist > distances[curr_node]:
            continue
            
        for neighbor, weight in graph[curr_node].items():
            distance = curr_dist + weight
            if distance < distances[neighbor]:
                distances[neighbor] = distance
                heapq.heappush(pq, (distance, neighbor))
    
    return distances

Why This Matters

Real-World Impact

Breakthroughs like this often lead to practical improvements years later. Think: faster Google Maps rerouting, more efficient supply-chain optimization, quicker AI reasoning over knowledge graphs.

Even if this exact algorithm has high constants and isn't plug-and-play yet, it's exciting proof that some 'optimal' algorithms we learned in school can still be improved.


Curious? Read the full paper:

Breaking the Sorting Barrier for Directed Single-Source Shortest Paths
AlgorithmsResearchGraph Theory