23,610 research outputs found

    Near Optimal Algorithm for the Directed Single Source Replacement Paths Problem

    Get PDF
    In the Single Source Replacement Paths (SSRP) problem we are given a graph G=(V,E)G = (V, E), and a shortest paths tree K^\widehat{K} rooted at a node ss, and the goal is to output for every node tVt \in V and for every edge ee in K^\widehat{K} the length of the shortest path from ss to tt avoiding ee. We present an O~(mn+n2)\tilde{O}(m\sqrt{n} + n^2) time randomized combinatorial algorithm for unweighted directed graphs. Previously such a bound was known in the directed case only for the seemingly easier problem of replacement path where both the source and the target nodes are fixed. Our new upper bound for this problem matches the existing conditional combinatorial lower bounds. Hence, (assuming these conditional lower bounds) our result is essentially optimal and completes the picture of the SSRP problem in the combinatorial setting. Our algorithm extends to the case of small, rational edge weights. We strengthen the existing conditional lower bounds in this case by showing that any O(mn1/2ϵ)O(mn^{1/2-\epsilon}) time (combinatorial or algebraic) algorithm for some fixed ϵ>0\epsilon >0 yields a truly subcubic algorithm for the weighted All Pairs Shortest Paths problem (previously such a bound was known only for the combinatorial setting).Comment: 38 pages, 9 figures, to appear in the Proceedings of the 47th International Colloquium on Automata, Languages and Programming (ICALP

    Replacement Paths via Row Minima of Concise Matrices

    Full text link
    Matrix MM is {\em kk-concise} if the finite entries of each column of MM consist of kk or less intervals of identical numbers. We give an O(n+m)O(n+m)-time algorithm to compute the row minima of any O(1)O(1)-concise n×mn\times m matrix. Our algorithm yields the first O(n+m)O(n+m)-time reductions from the replacement-paths problem on an nn-node mm-edge undirected graph (respectively, directed acyclic graph) to the single-source shortest-paths problem on an O(n)O(n)-node O(m)O(m)-edge undirected graph (respectively, directed acyclic graph). That is, we prove that the replacement-paths problem is no harder than the single-source shortest-paths problem on undirected graphs and directed acyclic graphs. Moreover, our linear-time reductions lead to the first O(n+m)O(n+m)-time algorithms for the replacement-paths problem on the following classes of nn-node mm-edge graphs (1) undirected graphs in the word-RAM model of computation, (2) undirected planar graphs, (3) undirected minor-closed graphs, and (4) directed acyclic graphs.Comment: 23 pages, 1 table, 9 figures, accepted to SIAM Journal on Discrete Mathematic

    Sparse Fault-Tolerant BFS Trees

    Full text link
    This paper addresses the problem of designing a sparse {\em fault-tolerant} BFS tree, or {\em FT-BFS tree} for short, namely, a sparse subgraph TT of the given network GG such that subsequent to the failure of a single edge or vertex, the surviving part TT' of TT still contains a BFS spanning tree for (the surviving part of) GG. Our main results are as follows. We present an algorithm that for every nn-vertex graph GG and source node ss constructs a (single edge failure) FT-BFS tree rooted at ss with O(n \cdot \min\{\Depth(s), \sqrt{n}\}) edges, where \Depth(s) is the depth of the BFS tree rooted at ss. This result is complemented by a matching lower bound, showing that there exist nn-vertex graphs with a source node ss for which any edge (or vertex) FT-BFS tree rooted at ss has Ω(n3/2)\Omega(n^{3/2}) edges. We then consider {\em fault-tolerant multi-source BFS trees}, or {\em FT-MBFS trees} for short, aiming to provide (following a failure) a BFS tree rooted at each source sSs\in S for some subset of sources SVS\subseteq V. Again, tight bounds are provided, showing that there exists a poly-time algorithm that for every nn-vertex graph and source set SVS \subseteq V of size σ\sigma constructs a (single failure) FT-MBFS tree T(S)T^*(S) from each source siSs_i \in S, with O(σn3/2)O(\sqrt{\sigma} \cdot n^{3/2}) edges, and on the other hand there exist nn-vertex graphs with source sets SVS \subseteq V of cardinality σ\sigma, on which any FT-MBFS tree from SS has Ω(σn3/2)\Omega(\sqrt{\sigma}\cdot n^{3/2}) edges. Finally, we propose an O(logn)O(\log n) approximation algorithm for constructing FT-BFS and FT-MBFS structures. The latter is complemented by a hardness result stating that there exists no Ω(logn)\Omega(\log n) approximation algorithm for these problems under standard complexity assumptions

    Faster Replacement Paths

    Full text link
    The replacement paths problem for directed graphs is to find for given nodes s and t and every edge e on the shortest path between them, the shortest path between s and t which avoids e. For unweighted directed graphs on n vertices, the best known algorithm runtime was \tilde{O}(n^{2.5}) by Roditty and Zwick. For graphs with integer weights in {-M,...,M}, Weimann and Yuster recently showed that one can use fast matrix multiplication and solve the problem in O(Mn^{2.584}) time, a runtime which would be O(Mn^{2.33}) if the exponent \omega of matrix multiplication is 2. We improve both of these algorithms. Our new algorithm also relies on fast matrix multiplication and runs in O(M n^{\omega} polylog(n)) time if \omega>2 and O(n^{2+\eps}) for any \eps>0 if \omega=2. Our result shows that, at least for small integer weights, the replacement paths problem in directed graphs may be easier than the related all pairs shortest paths problem in directed graphs, as the current best runtime for the latter is \Omega(n^{2.5}) time even if \omega=2.Comment: the current version contains an improved resul
    corecore