Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an open source implementation of shortest path algorithm with distance labeling a la Gavoille et al.?

If you are allowed to precompute linear in |V| amount of data on graph then there are a family of algorithms which have sublinear query times for shortest paths in a graph.

  1. Gavoille et al. Distance labeling in graphs.
  2. Cohen et al. Reachability and distance queries via 2-hop labels
  3. Abraham, Goldberg et al. Hierarchical Hub Labellings for Shortest Paths

Some of them are used in Bing Maps for extremely fast shortest routes calculations.

The basic idea is to precompute for each vertex forward labels L_f(v) and backward labels L_b(v) which poses a cover property. Each label is a pair of a vertex and the distance to it, e.g. L_f(v) = { (u, dist(v, u)) } and L_r(v) = { (u, dist(u, v)) }. And the cover property asserts that for any vertices s and t L_f(s) 'Union' L_r(t) contains at least one vertex on the shortest path from s to t.

Is there an open source implementation of one of those algorithms (C++, C#, F#, D, Go, Java)?

like image 614
Alfa07 Avatar asked Oct 29 '12 20:10

Alfa07


People also ask

Which algorithm is used to find shortest distance?

Bellman-Ford algorithm is used to find all pairs shortest distances in a graph and it is dynamic programming technique.

What are the other algorithms used to find source shortest path?

Dijkstra's algorithm is one of the most popular algorithms for solving many single-source shortest path problems having non-negative edge weight in the graphs i.e., it is to find the shortest distance between two vertices on a graph.

What is single-source shortest path and all pair shortest path?

The single-source shortest-path problem requires that we find the shortest path from a single vertex to all other vertices in a graph. The all-pairs shortest-path problem requires that we find the shortest path between all pairs of vertices in a graph.


1 Answers

I have not found any code that implements those algorithms but you could look at the Karlsruhe homepage where you can find code for Contraction Hierarchies, which form the basis of the (original) Hub Labeling. You could use that to create your own implementation of HL but you should know they filed a patent for it.

like image 150
Origin Avatar answered Sep 23 '22 07:09

Origin