General-Weight SSSP (Bellman-Ford)
#
Problem Specification#
Input, an unweighted graph, and a source, . The input graph can either be undirected or directed.
#
OutputOutput: , a mapping where is the shortest path distance from to in and if is unreachable. If the graph contains any negative-weight cycles reachable from , the vertices of these negative-weight cycles and vertices reachable from them must have a distance of .
#
Algorithm ImplementationsThe code for our implemenation is available here. We provide more details about our implementation in [1].
#
Cost BoundsThe algorithm runs in work and depth. Please [1] for details.
#
Compiling and RunningThe benchmark can be compiled by running:
It can then be run on an input graph in the uncompressed format as follows:
It can then be run on an input graph in the compressed format as follows:
#
References[1] Laxman Dhulipala, Guy Blelloch, and Julian Shun
Theoretically Efficient Parallel Graph Algorithms Can Be Fast and Scalable
Proceedings of the ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), pp. 393-404, 2018.