Computing Shortest Paths and Distances in Planar Graphs

We provide here efficient sequential and parallel solutions to the following problem: given a planar digraph G (with real edge weights but no negative cycles) for preprocessing, answer on-line queries requesting the shortest distance (or path) between any two vertices in G. Our algorithms for preprocessing need O(n log n + q2) space and O(n log n + q2) sequential time. (Here q is the cardinality of a set of faces of a planar embedding of G that cover all vertices.)A parallel implementation on a CREW PRAM needs also O(n log n + q2) space and runs in O(log2n) time using O(n + M(q)) processors (where M(q) is the number of processors required to multiply two q × q matrices in O(log q) time), provided that the q faces are given by the input.This enables us to achieve O(log n) time using a single processor for a “distance” query, or O(L + log n) time for a “path” query (where L is the length of the path). Note that this is a considerable improvement over previous results in the case where q = o(n). Our techniques are based on the hammock decomposition of a planar digraph and the use of separators for computing quickly internal distances in the graph. Several other results are achieved. For outerplanar graphs, our algorithms preprocess the graph in O(n logn) space and run either in O(n log n) sequential time, or in O(log2n) time using O(n) processors on a CREW PRAM. A “distance” query can be answered in O(log n) time using a single processor. A “path” query is answered in O(L + log n) time. An optimal solution is given in the case of trees. We achieve O(1) time per “distance” query andwe need O(n) sequential time, or O(log n) time and O(n/log n) processors (on an EREW PRAM) for preprocessing. A “path” query is answered in O(L) time.

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

[2]  Andrzej Lingas,et al.  Efficient Parallel Algorithms for Path Problems in Planar Directed Graphs , 1990, SIGAL International Symposium on Algorithms.

[3]  Uzi Vishkin,et al.  On Finding Lowest Common Ancestors: Simplification and Parallelization , 1988, AWOC.

[4]  Greg N. Frederickson,et al.  A new approach to all pairs shortest paths in planar graphs , 1987, STOC.

[5]  Greg N. Frederickson,et al.  Planar graph decomposition and all pairs shortest paths , 1991, JACM.

[6]  Clyde L. Monma,et al.  On the Complexity of Covering Vertices by Faces in a Planar Graph , 1988, SIAM J. Comput..

[7]  Richard M. Karp,et al.  The complexity of parallel computation , 1986 .

[8]  Paul G. Spirakis,et al.  Efficient Parallel Algorithms for Shortest Paths in Planar Graphs , 1990, SWAT.

[9]  Richard B. Tan,et al.  Computer Networks with Compact Routing Tables , 1986 .

[10]  Grzegorz Rozenberg,et al.  The Book of L , 1986, Springer Berlin Heidelberg.

[11]  James Christopher Wyllie,et al.  The Complexity of Parallel Computations , 1979 .

[12]  Giuseppe F. Italiano,et al.  Incremental algorithms for minimal length paths , 1991, SODA '90.

[13]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[14]  Robert E. Tarjan,et al.  An Efficient Parallel Biconnectivity Algorithm , 2011, SIAM J. Comput..

[15]  Greg N. Frederickson,et al.  Fast Algorithms for Shortest Paths in Planar Graphs, with Applications , 1987, SIAM J. Comput..