Computing All-Pairs Shortest Paths by Leveraging Low Treewidth

Authors

  • Léon Planken Delft University of Technology
  • Mathijs de Weerdt Delft University of Technology
  • Roman van der Krogt Cork Constraint Computation Centre

DOI:

https://doi.org/10.1609/icaps.v21i1.13465

Abstract

Considering directed graphs on n vertices and m edges with real (possibly negative) weights, we present two new, efficient algorithms for computing all-pairs shortest paths (APSP). These algorithms make use of directed path consistency (DPC) along a vertex ordering d. The algorithms run in O(n2wd) time, where wd is the graph width induced by this vertex ordering. For graphs of constant treewidth, this yields O(n2) time, which is optimal. On chordal graphs, the algorithms run in O(nm) time. We show empirically that also in many general cases, both constructed and from realistic benchmarks, the algorithms often outperform Johnson's algorithm, which represents the current state of the art with a run time of O(nm + n2log n). These algorithms can be used for temporal and spatial reasoning, e.g. for the Simple Temporal Problem (STP), which underlines its relevance to the planning and scheduling community.

Downloads

Published

2011-03-22

How to Cite

Planken, L., de Weerdt, M., & van der Krogt, R. (2011). Computing All-Pairs Shortest Paths by Leveraging Low Treewidth. Proceedings of the International Conference on Automated Planning and Scheduling, 21(1), 170-177. https://doi.org/10.1609/icaps.v21i1.13465