Thorup's algorithm

suggest change

Thorup’s algorithm for single-source shortest paths in an undirected graph has time complexity O(m), which is lower than Dijkstra’s algorithm for this case.

The ideas below are a reconstruction from secondary sources, because the original paper is paywalled, so minor details may be missing.

It is based on the fact that, there isn’t an edge with length less than l between two connected components of the spanning forest with length limitation l, so, starting at distance x, you could focus only on one connected component until you reach the distance x + l. You’ll visit some vertices before vertices with shorter distance are all visited, but that doesn’t matter because it is known there won’t be a shorter path to here from those vertices. Other parts work like the bucket sort / MSD radix sort, and of course, it requires the O(m) spanning tree.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents