Computing All-Pairs Shortest Paths by Leveraging Low Treewidth

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 + n2 log 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.

[1]  Ronald L. Graham,et al.  Concrete Mathematics, a Foundation for Computer Science , 1991, The Mathematical Gazette.

[2]  Dieter Kratsch,et al.  On treewidth approximations , 2004, Discret. Appl. Math..

[3]  Mathijs de Weerdt,et al.  P3C: A New Algorithm for the Simple Temporal Problem , 2008, ICAPS.

[4]  Juan Fernández-Olivares,et al.  Efficiently Handling Temporal Knowledge in an HTN Planner , 2006, ICAPS.

[5]  Antonio G. C. Gonzalez,et al.  A temporal constraint network based temporal planner ? , 2002 .

[6]  Mathijs de Weerdt,et al.  Incrementally Solving STNs by Enforcing Partial Path Consistency , 2010, ICAPS.

[7]  C. Pandu Rangan,et al.  All-pairs-shortest-length on Strongly Chordal Graphs , 1996, Discret. Appl. Math..

[8]  Clifford Stein,et al.  Introduction to Algorithms, 2nd edition. , 2001 .

[9]  H. Bodlaender Classes of graphs with bounded tree-width , 1986 .

[10]  Mikkel Thorup,et al.  Fully-Dynamic All-Pairs Shortest Paths: Faster and Allowing Negative Cycles , 2004, SWAT.

[11]  Edsger W. Dijkstra,et al.  A note on two problems in connexion with graphs , 1959, Numerische Mathematik.

[12]  Sridhar Radhakrishnan,et al.  Unified All-pairs Shortest Path Algorithms in the Chordal Hierarchy , 1997, Discret. Appl. Math..

[13]  Peter Sanders,et al.  Contraction Hierarchies: Faster and Simpler Hierarchical Routing in Road Networks , 2008, WEA.

[14]  Donald B. Johnson,et al.  Efficient Algorithms for Shortest Paths in Sparse Networks , 1977, J. ACM.

[15]  Shimon Even,et al.  Updating distances in dynamic graphs , 1985 .

[16]  Robert E. Tarjan,et al.  Simple Linear-Time Algorithms to Test Chordality of Graphs, Test Acyclicity of Hypergraphs, and Selectively Reduce Acyclic Hypergraphs , 1984, SIAM J. Comput..

[17]  C. Tinelli,et al.  The SMT-LIB Format: An Initial Proposal , 2003 .

[18]  R. Möhring Algorithmic graph theory and perfect graphs , 1986 .

[19]  J. H. Lint Concrete mathematics : a foundation for computer science / R.L. Graham, D.E. Knuth, O. Patashnik , 1990 .

[20]  Ronald L. Rivest,et al.  Introduction to Algorithms , 1990 .

[21]  Andrew V. Goldberg,et al.  Negative-cycle detection algorithms , 1996, Math. Program..

[22]  Derek G. Corneil,et al.  Complexity of finding embeddings in a k -tree , 1987 .

[23]  Neil Yorke-Smith,et al.  Uncertainty in Soft Temporal Constraint Problems:A General Framework and Controllability Algorithms forThe Fuzzy Case , 2006, J. Artif. Intell. Res..

[24]  Philip N. Klein,et al.  Shortest paths in directed planar graphs with negative lengths: A linear-space O(n log2 n)-time algorithm , 2010, TALG.

[25]  Julie A. Shah,et al.  Fast Dynamic Scheduling of Disjunctive Temporal Constraint Networks through Incremental Compilation , 2008, ICAPS.

[26]  M E J Newman,et al.  Community structure in social and biological networks , 2001, Proceedings of the National Academy of Sciences of the United States of America.

[27]  Manolis Koubarakis,et al.  Backtracking algorithms for disjunctions of temporal constraints , 1998, Artif. Intell..

[28]  Nicolas Chleq Efficient Algorithms for Networks of Quantitative Temporal Constraints , 1995 .

[29]  Yijie Han A note of an O(n3/logn) time algorithm for all pairs shortest paths , 2008, Inf. Process. Lett..

[30]  MozesShay,et al.  Shortest paths in directed planar graphs with negative lengths , 2010 .

[31]  M. Golumbic Algorithmic Graph Theory and Perfect Graphs (Annals of Discrete Mathematics, Vol 57) , 2004 .

[32]  Peter Sanders,et al.  Combining hierarchical and goal-directed speed-up techniques for dijkstra's algorithm , 2008, JEAL.

[33]  Neil Yorke-Smith,et al.  Efficient variable elimination for semi-structured simple temporal networks with continuous domains , 2010, The Knowledge Engineering Review.

[34]  Seth Pettie,et al.  A new approach to all-pairs shortest paths on real-weighted graphs , 2004, Theor. Comput. Sci..

[35]  T. K. Satish Kumar,et al.  On the Tractability of Restricted Disjunctive Temporal Problems , 2005, ICAPS.

[36]  D. Rose A GRAPH-THEORETIC STUDY OF THE NUMERICAL SOLUTION OF SPARSE POSITIVE DEFINITE SYSTEMS OF LINEAR EQUATIONS , 1972 .

[37]  Albert-László Barabási,et al.  Statistical mechanics of complex networks , 2001, ArXiv.

[38]  Giuseppe F. Italiano,et al.  Fully dynamic all pairs shortest paths with real edge weights , 2001, Proceedings 2001 IEEE International Conference on Cluster Computing.

[39]  Julie A. Shah,et al.  Flexible Execution of Plans with Choice , 2009, ICAPS.

[40]  Ari K. Jónsson,et al.  Activity Planning for the Mars Exploration Rovers , 2005, ICAPS.

[41]  Robert E. Tarjan,et al.  Fibonacci heaps and their uses in improved network optimization algorithms , 1984, JACM.

[42]  Stephen Warshall,et al.  A Theorem on Boolean Matrices , 1962, JACM.

[43]  Ofer Strichman,et al.  Deciding Separation Formulas with SAT , 2002, CAV.

[44]  Andrew V. Goldberg,et al.  Shortest paths algorithms: Theory and experimental evaluation , 1994, SODA '94.

[45]  Christos D. Zaroliagis,et al.  Shortest Paths in Digraphs of Small Treewidth. Part I: Sequential Algorithms , 2000, Algorithmica.

[46]  Timothy M. Chan All-Pairs Shortest Paths with Real Weights in O(n3/log n) Time , 2008, Algorithmica.

[47]  Teodor Gabriel Crainic,et al.  Shortest path algorithms: A computational study with the C programming language , 1991, Comput. Oper. Res..

[48]  Pinar Heggernes,et al.  Minimal triangulations of graphs: A survey , 2006, Discret. Math..

[49]  Hans L. Bodlaender A linear time algorithm for finding tree-decompositions of small treewidth , 1993, STOC '93.

[50]  Rina Dechter,et al.  Temporal Constraint Networks , 1989, Artif. Intell..

[51]  Uue Kjjrull Triangulation of Graphs { Algorithms Giving Small Total State Space Triangulation of Graphs { Algorithms Giving Small Total State Space , 1990 .

[52]  Feodor F. Dragan Estimating all pairs shortest paths in restricted graph families: a unified approach , 2005, J. Algorithms.