-
Notifications
You must be signed in to change notification settings - Fork 229
Open
Description
The Sage Math graph module uses Boost Graph. This quick exploration comes from kind feedback from its maintainer David Coudert:
The BGL currently implements traditional (~1990) algorithms for shortest paths:
dijkstra_shortest_paths: 1959 single source, single shortest path tree, but constrained to positive weightsbellman_ford_shortest_paths: 1958 extends to negative weights with negative cycle detectionjohnson_all_pairs_shortest_paths: 1977 combines bellman for reweighting with dijkstra running for each vertexfloyd_warshall_all_pairs_shortest_paths: 1962 better than johnson for dense graphs, uses dynamic programmingastar_search: 1968 single source to single target path, heuristically
But it lacks more modern algorithms:
- Yen's algorithm (Yen 1971, cited ~500x) : k-shortest simple (loopless) paths between two vertices. At each iteration, finds the next shortest path by deviating from previously found paths. Baseline must-have
- k-Shortest Simple Paths, Postponed Node Classification algorithm variant, (Al Zoobi et al 2023, cited ~13x) : best speed/memory tradeoff for finding k alternative paths, most performant
- k-Shortest Simple Paths, SB* variant, (Al Zoobi et al 2023, cited ~13x) : fastest for small k, higher memory
- Contraction Hierarchies (Geisberger et al., 2008, cited ~1200x) : amazing for road networks, 1000x+ speedup over Dijkstra
- Hub labelling ( Abraham et al., 2011, cited ~400x) : sub-milliseconds shorttest path length oracle: avoids running dijsktra millions of times
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels