Dynamic algorithms for shortest paths in planar graphs (original) (raw)

Fast algorithms for maintaining shortest paths in outerplanar and planar digraphs

Lecture Notes in Computer Science, 1995

We present algorithms for maintaining shortest path information in dynamic outerplanar digraphs with sublogarithmic query time. By choosing appropriate parameters we achieve continuous trade-offs between the preprocessing, query, and update times. Our data structure is based on a recursive separator decomposition of the graph and it encodes the shortest paths between the members of a properly chosen subset of vertices. We apply this result to construct improved shortest path algorithms for dynamic planar digraphs.

Improved Algorithms for Dynamic Shortest Paths

Algorithmica, 2000

We describe algorithms for nding shortest paths and distances in outerplanar and planar digraphs that exploit the particular topology of the input graph. An important feature of our algorithms is that they can work in a dynamic environment, where the cost of any edge can be changed or the edge can be deleted. In the case of outerplanar digraphs, our data structures can be updated after any such change in only logarithmic time and a distance query is answered also in logarithmic time. In the case of planar digraphs, we give an interesting trade-o between preprocessing, query and update times depending on the value of a certain topological parameter of the graph. Our results can be extended to n-vertex digraphs of genus O(n 1?" ) for any " > 0.

Planar Graphs, Negative Weight Edges, Shortest Paths, Near Linear Time

2001

In this paper, we present an O(n log 3 n) time algorithm for finding shortest paths in an n-node planar graph with real weights. This can be compared to the best previous strongly polynomial time algorithm developed by Lipton, Rose, and Tarjan in 1978 which runs in O(n 3/2 ) time, and the best polynomial time algorithm developed by Henzinger, Klein, Subramanian, and Rao in 1994 which runs inÕ(n 4/3 ) time. We also present significantly improved data structures for reporting distances between pairs of nodes and algorithms for updating the data structures when edge weights change.

Maximum flows and parametric shortest paths in planar graphs

We observe that the classical maximum flow problem in any directed planar graph G can be reformulated as a parametric shortest path problem in the oriented dual graph G * . This reformulation immediately suggests an algorithm to compute maximum flows, which runs in O(n log n) time. As we continuously increase the parameter, each change in the shortest path tree can be effected in O(log n) time using standard dynamic tree data structures, and the special structure of the parametrization implies that each directed edge enters the evolving shortest path tree at most once. The resulting maximum-flow algorithm is identical to the recent algorithm of Borradaile and Klein [J. ACM 2009], but our new formulation allows a simpler presentation and analysis. On the other hand, we demonstrate that for a similarly structured parametric shortest path problem on the torus, the shortest path tree can change Ω(n 2 ) times in the worst case, suggesting that a different method may be required to efficiently compute maximum flows in higher-genus graphs.

Shortest Paths in Digraphs of Small Treewidth. Part I: Sequential Algorithms

Algorithmica, 2000

We consider the problem of preprocessing an n-vertex digraph with real edge weights so that subsequent queries for the shortest path or distance between any two vertices can be e ciently answered. We give algorithms that depend on the treewidth of the input graph. When the treewidth is a constant, our algorithms can answer distance queries in O( (n)) time after O(n) preprocessing. This improves upon previously known results for the same problem. We also give a dynamic algorithm which, after a change in an edge weight, updates the data structure in time O(n ), for any constant 0 < < 1. Furthermore, an algorithm of independent interest is given: computing a shortest path tree, or nding a negative cycle in linear time.

An external memory data structure for shortest path queries

Discrete Applied Mathematics, 2003

We present results related to satisfying shortest path queries on a planar graph stored in external memory. Let N denote the number of vertices in the graph and sort(N ) denote the number of input=output (I=O) operations required to sort an array of length N :

On-line and dynamic algorithms for shortest path problems

Lecture Notes in Computer Science, 1995

We describe algorithms for finding shortest paths and distances in a planar digraph which exploit the particular topology of the input graph. An important feature of our algorithms is that they can work in a dynamic environment, where the cost of any edge can be changed or the edge can be deleted. Our data structures can be updated after any such change in only polylogarithmic time, while a single-pair query is answered in sublinear time. We also describe the first parallel algorithms for solving the dynamic version of the shortest path problem.

Shortest path queries in digraphs of small treewidth

Lecture Notes in Computer Science, 1995

We consider the problem of preprocessing an n-vertex digraph with real edge weights so that subsequent queries for the shortest path or distance between any two vertices can be efficiently answered. We give algorithms that depend on the treewidth of the input graph. When the treewidth is a constant, our algorithms can answer distance queries in O(α(n)) time after O(n) preprocessing. This improves upon previously known results for the same problem. We also give a dynamic algorithm which, after a change in an edge weight, updates the data structure in time O(n β ), for any constant 0 < β < 1. The above two algorithms are based on an algorithm of independent interest: computing a shortest path tree, or finding a negative cycle in linear time.

Computing All-Pairs Shortest Paths by Leveraging Low Treewidth (extended abstract)

2011

We present two new and efficient algorithms for computing all-pairs shortest paths. The algorithms operate on directed graphs with real (possibly negative) weights. They make use of directed path consistency along a vertex ordering d. Both algorithms run in O n 2 w d time, where w d is the graph width induced by this vertex ordering. For graphs of constant treewidth, this yields O n 2 time, which is optimal. On chordal graphs, the algorithms run in O (nm) time. In addition, we present a variant that exploits graph separators to arrive at a run time of O nw 2 d + n 2 s d on general graphs, where s d ≤ w d is the size of the largest minimal separator induced by the vertex ordering d. We show empirically that on both constructed and realistic benchmarks, in many cases the algorithms outperform Floyd-Warshall's as well as Johnson's algorithm, which represent the current state of the art with a run time of O n 3 and O nm + n 2 log n , respectively. Our algorithms can be used for spatial and temporal reasoning, such as for the Simple Temporal Problem, which underlines their relevance to the planning and scheduling community.

Fully dynamic algorithms for maintaining shortest paths trees

Journal of Algorithms, 2000

We propose fully dynamic algorithms for maintaining the distances and the shortest paths from a single source in either a directed or an undirected graph with positive real edge weights, handling insertions, deletions, and weight updates of edges. The algorithms require linear space and optimal query time. The cost of the update operations depends on the class of the considered graph and on the number of the output updates, i.e., on the number of vertices that, due to an edge modification, either change the distance from the source or change the parent in the shortest paths tree. We first show that, if we deal only with updates on the Ž . weights of edges, then the update procedures require O log n worst case time per output update for several classes of graphs, as in the case of graphs with bounded genus, bounded arboricity, bounded degree, bounded treewidth, and bounded pagenumber. For general graphs with n vertices and m edges the algorithms

Fully dynamic all pairs shortest paths with real edge weights

2001

Abstract We present the first fully dynamic algorithm for maintaining all pairs shortest paths in directed graphs with real-valued edge weights. Given a dynamic directed graph G such that each edge can assume at most S different real values, we show how to support updates deterministically in O (S· n 2.5 log 3 n) amortized time and queries in optimal worst-case time. No previous fully dynamic algorithm was known for this problem.

A new algorithm to find the shortest paths between all pairs of nodes

Discrete Applied Mathematics, 1982

A new algorithm to find the shortest paths between all pairs of nodes is presented. This algorithm makes use of a dual cost transformation and of a particular data structure. Its worst case time complexity is of the order of the third power of the number of nodes, and its space complexity is linear with the number of arcs. A comparison with existing algorithms is presented.

Fully dynamic shortest paths in digraphs with arbitrary arc weights

Journal of Algorithms, 2003

We propose a new solution for the fully dynamic single source shortest paths problem in a directed graph G = (N, A) with arbitrary arc weights, that works for any digraph and has optimal space requirements and query time. If a negative-length cycle is introduced in the subgraph of G reachable from the source during an update operation, then it is detected by the algorithm. Zero-length cycles are explicitly handled. We evaluate the cost of the update operations as a function of a structural property of G and of the number of the output updates. We show that, if G has a k-bounded accounting function (as in the case of digraphs with genus, arboricity, degree, treewidth or page number bounded by k), then the update procedures require O(min{m, k · n A } · log n) worst case time for weight-decrease operations, and O(min{m · log n, k · (n A + n B ) · log n + n}) worst case time for weight-increase operations. Here, n = |N|, m = |A|, n A is the number of nodes affected by the input update, that is the nodes changing either the distance or the parent in the shortest paths tree, and n B is the number of nonaffected nodes considered by the algorithm that also belong to zero-length cycles. If zero-length cycles are not allowed, then n B is zero and the bound for weight-increase operations is O(min{m · log n, k · n A · log n + n}). Similar amortized bounds hold if we perform also insertions and deletions of arcs.

A new approach to dynamic all pairs shortest paths

2004

Abstract We study novel combinatorial properties of graphs that allow us to devise a completely new approach to dynamic all pairs shortest paths problems. Our approach yields a fully dynamic algorithm for general directed graphs with non-negative real-valued edge weights that supports any sequence of operations in O (n 2 log 3 n) amortized time per update and unit worst-case time per distance query, where n is the number of vertices. We can also report shortest paths in optimal worst-case time.

Efficient parallel algorithms for shortest paths in planar digraphs

BIT, 1992

Efficient parallel algorithms are presented, on the CREW PRAM model, for generating a succinct encoding of all pairs shortest path information in a directed planar graph G with real-valued edge costs but no negative cycles. We assume that a planar embedding of G is given, togetber with a set of q faces that cover all the vertices. Then our algorithm runs in O(log 2 n) time and employs O{nq + M(q)) processors (where M(t) is the number of processors required to multiply two t x t matrices in O(log t) time). Let us note here that whenever q < n then our processor bound is better than the best previous one (M(n)). O(log 2 n) time, n-processor algorithms are presented for various subproblems, including that of generating all pairs shortest path information in a directed outerplanar graph. Our work is based on the fundamental hammock-decomposition technique ofG. Frederickson. We achieve this decomposition in O(log n log* n) parallel time by using O(n) processors. The hammock-decomposition seems to be a fundamental operation that may help in improving efficiency of many parallel (and sequential) graph algorithms.

Data structures for two-edge connectivity in planar graphs

Theoretical Computer Science, 1994

Data structures for two-edge connectivity in planar graphs, Theoretical Computer Science 130 (1994) 139-161. We present a data structure for maintaining 2-edge connectivity information dynamically in an embedded planar graph. The data structure requires linear storage and preprocessing time for its construction, supports online updates (deletion of an edge or insertion of an edge consistent with the embedding) in O(log2n) time, and answers a query (whether two vertices are in the same 2edge-connected component) in O(logn) time. The previous best algorithm for this problem requires O(logs n) time for updates.

Shortest paths in digraphs of small treewidth. Part II: Optimal parallel algorithms

Theoretical Computer Science, 1998

We consider the problem of preprocessing an n-vertex digraph with real edge weights so that subsequent queries for the shortest path or distance between any two vertices can be e ciently answered. We give algorithms that depend on the treewidth of the input graph. When the treewidth is a constant, our algorithms can answer distance queries in O( (n)) time after O(n) preprocessing. This improves upon previously known results for the same problem. We also give a dynamic algorithm which, after a change in an edge weight, updates the data structure in time O(n ), for any constant 0 < < 1. Furthermore, an algorithm of independent interest is given: computing a shortest path tree, or nding a negative cycle in linear time.

Computing all-pairs shortest paths by leveraging low treewidth

2012

We present two new and efficient algorithms for computing all-pairs shortest paths. The algorithms operate on directed graphs with real (possibly negative) weights. They make use of directed path consistency along a vertex ordering d. Both algorithms run in O n 2 w d time, where w d is the graph width induced by this vertex ordering. For graphs of constant treewidth, this yields O n 2 time, which is optimal. On chordal graphs, the algorithms run in O (nm) time. In addition, we present a variant that exploits graph separators to arrive at a run time of O nw 2 d + n 2 s d on general graphs, where s d ≤ w d is the size of the largest minimal separator induced by the vertex ordering d. We show empirically that on both constructed and realistic benchmarks, in many cases the algorithms outperform Floyd-Warshall's as well as Johnson's algorithm, which represent the current state of the art with a run time of O n 3 and O nm + n 2 log n , respectively. Our algorithms can be used for spatial and temporal reasoning, such as for the Simple Temporal Problem, which underlines their relevance to the planning and scheduling community.

Improved bounds and new trade-offs for dynamic all pairs shortest paths

2002

Let G be a directed graph with n vertices, subject to dynamic updates, and such that each edge weight can assume at most S different arbitrary real values throughout the sequence of updates. We present a new algorithm for maintaining all pairs shortest paths in G in O (S 0.5· n 2.5 log 1.5 n) amortized time per update and in O (1) worst-case time per distance query. This improves over previous bounds. We also show how to obtain query/update trade-offs for this problem, by introducing two new families of algorithms.