641 research outputs found

    Finding kk Simple Shortest Paths and Cycles

    Get PDF
    The problem of finding multiple simple shortest paths in a weighted directed graph G=(V,E)G=(V,E) has many applications, and is considerably more difficult than the corresponding problem when cycles are allowed in the paths. Even for a single source-sink pair, it is known that two simple shortest paths cannot be found in time polynomially smaller than n3n^3 (where n=Vn=|V|) unless the All-Pairs Shortest Paths problem can be solved in a similar time bound. The latter is a well-known open problem in algorithm design. We consider the all-pairs version of the problem, and we give a new algorithm to find kk simple shortest paths for all pairs of vertices. For k=2k=2, our algorithm runs in O(mn+n2logn)O(mn + n^2 \log n) time (where m=Em=|E|), which is almost the same bound as for the single pair case, and for k=3k=3 we improve earlier bounds. Our approach is based on forming suitable path extensions to find simple shortest paths; this method is different from the `detour finding' technique used in most of the prior work on simple shortest paths, replacement paths, and distance sensitivity oracles. Enumerating simple cycles is a well-studied classical problem. We present new algorithms for generating simple cycles and simple paths in GG in non-decreasing order of their weights; the algorithm for generating simple paths is much faster, and uses another variant of path extensions. We also give hardness results for sparse graphs, relative to the complexity of computing a minimum weight cycle in a graph, for several variants of problems related to finding kk simple paths and cycles.Comment: The current version includes new results for undirected graphs. In Section 4, the notion of an (m,n) reduction is generalized to an f(m,n) reductio

    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

    Space-Efficient Fault-Tolerant Diameter Oracles

    Get PDF
    We design ff-edge fault-tolerant diameter oracles (ff-FDOs). We preprocess a given graph GG on nn vertices and mm edges, and a positive integer ff, to construct a data structure that, when queried with a set FF of Ff|F| \leq f edges, returns the diameter of GFG-F. For a single failure (f=1f=1) in an unweighted directed graph of diameter DD, there exists an approximate FDO by Henzinger et al. [ITCS 2017] with stretch (1+ε)(1+\varepsilon), constant query time, space O(m)O(m), and a combinatorial preprocessing time of O~(mn+n1.5Dm/ε)\widetilde{O}(mn + n^{1.5} \sqrt{Dm/\varepsilon}).We present an FDO for directed graphs with the same stretch, query time, and space. It has a preprocessing time of O~(mn+n2/ε)\widetilde{O}(mn + n^2/\varepsilon). The preprocessing time nearly matches a conditional lower bound for combinatorial algorithms, also by Henzinger et al. With fast matrix multiplication, we achieve a preprocessing time of O~(n2.5794+n2/ε)\widetilde{O}(n^{2.5794} + n^2/\varepsilon). We further prove an information-theoretic lower bound showing that any FDO with stretch better than 3/23/2 requires Ω(m)\Omega(m) bits of space. For multiple failures (f>1f>1) in undirected graphs with non-negative edge weights, we give an ff-FDO with stretch (f+2)(f+2), query time O(f2log2n)O(f^2\log^2{n}), O~(fn)\widetilde{O}(fn) space, and preprocessing time O~(fm)\widetilde{O}(fm). We complement this with a lower bound excluding any finite stretch in o(fn)o(fn) space. We show that for unweighted graphs with polylogarithmic diameter and up to f=o(logn/loglogn)f = o(\log n/ \log\log n) failures, one can swap approximation for query time and space. We present an exact combinatorial ff-FDO with preprocessing time mn1+o(1)mn^{1+o(1)}, query time no(1)n^{o(1)}, and space n2+o(1)n^{2+o(1)}. When using fast matrix multiplication instead, the preprocessing time can be improved to nω+o(1)n^{\omega+o(1)}, where ω<2.373\omega < 2.373 is the matrix multiplication exponent.Comment: Full version of a paper to appear at MFCS'21. Abstract shortened to meet ArXiv requirement

    Near-Optimal Deterministic Single-Source Distance Sensitivity Oracles

    Get PDF
    Given a graph with a source vertex ss, the Single Source Replacement Paths (SSRP) problem is to compute, for every vertex tt and edge ee, the length d(s,t,e)d(s,t,e) of a shortest path from ss to tt that avoids ee. A Single-Source Distance Sensitivity Oracle (Single-Source DSO) is a data structure that answers queries of the form (t,e)(t,e) by returning the distance d(s,t,e)d(s,t,e). We show how to deterministically compress the output of the SSRP problem on nn-vertex, mm-edge graphs with integer edge weights in the range [1,M][1,M] into a Single-Source DSO of size O(M1/2n3/2)O(M^{1/2}n^{3/2}) with query time O~(1)\widetilde{O}(1). The space requirement is optimal (up to the word size) and our techniques can also handle vertex failures. Chechik and Cohen [SODA 2019] presented a combinatorial, randomized O~(mn+n2)\widetilde{O}(m\sqrt{n}+n^2) time SSRP algorithm for undirected and unweighted graphs. Grandoni and Vassilevska Williams [FOCS 2012, TALG 2020] gave an algebraic, randomized O~(Mnω)\widetilde{O}(Mn^\omega) time SSRP algorithm for graphs with integer edge weights in the range [1,M][1,M], where ω<2.373\omega<2.373 is the matrix multiplication exponent. We derandomize both algorithms for undirected graphs in the same asymptotic running time and apply our compression to obtain deterministic Single-Source DSOs. The O~(mn+n2)\widetilde{O}(m\sqrt{n}+n^2) and O~(Mnω)\widetilde{O}(Mn^\omega) preprocessing times are polynomial improvements over previous o(n2)o(n^2)-space oracles. On sparse graphs with m=O(n5/4ε/M7/4)m=O(n^{5/4-\varepsilon}/M^{7/4}) edges, for any constant ε>0\varepsilon > 0, we reduce the preprocessing to randomized O~(M7/8m1/2n11/8)=O(n2ε/2)\widetilde{O}(M^{7/8}m^{1/2}n^{11/8})=O(n^{2-\varepsilon/2}) time. This is the first truly subquadratic time algorithm for building Single-Source DSOs on sparse graphs.Comment: Full version of a paper to appear at ESA 2021. Abstract shortened to meet ArXiv requirement

    Deterministic Combinatorial Replacement Paths and Distance Sensitivity Oracles

    Get PDF
    In this work we derandomize two central results in graph algorithms, replacement paths and distance sensitivity oracles (DSOs) matching in both cases the running time of the randomized algorithms. For the replacement paths problem, let G = (V,E) be a directed unweighted graph with n vertices and m edges and let P be a shortest path from s to t in G. The replacement paths problem is to find for every edge e in P the shortest path from s to t avoiding e. Roditty and Zwick [ICALP 2005] obtained a randomized algorithm with running time of O~(m sqrt{n}). Here we provide the first deterministic algorithm for this problem, with the same O~(m sqrt{n}) time. Due to matching conditional lower bounds of Williams et al. [FOCS 2010], our deterministic combinatorial algorithm for the replacement paths problem is optimal up to polylogarithmic factors (unless the long standing bound of O~(mn) for the combinatorial boolean matrix multiplication can be improved). This also implies a deterministic algorithm for the second simple shortest path problem in O~(m sqrt{n}) time, and a deterministic algorithm for the k-simple shortest paths problem in O~(k m sqrt{n}) time (for any integer constant k > 0). For the problem of distance sensitivity oracles, let G = (V,E) be a directed graph with real-edge weights. An f-Sensitivity Distance Oracle (f-DSO) gets as input the graph G=(V,E) and a parameter f, preprocesses it into a data-structure, such that given a query (s,t,F) with s,t in V and F subseteq E cup V, |F| <=f being a set of at most f edges or vertices (failures), the query algorithm efficiently computes the distance from s to t in the graph G F (i.e., the distance from s to t in the graph G after removing from it the failing edges and vertices F). For weighted graphs with real edge weights, Weimann and Yuster [FOCS 2010] presented several randomized f-DSOs. In particular, they presented a combinatorial f-DSO with O~(mn^{4-alpha}) preprocessing time and subquadratic O~(n^{2-2(1-alpha)/f}) query time, giving a tradeoff between preprocessing and query time for every value of 0 < alpha < 1. We derandomize this result and present a combinatorial deterministic f-DSO with the same asymptotic preprocessing and query time

    Deep Distance Sensitivity Oracles

    Full text link
    One of the most fundamental graph problems is finding a shortest path from a source to a target node. While in its basic forms the problem has been studied extensively and efficient algorithms are known, it becomes significantly harder as soon as parts of the graph are susceptible to failure. Although one can recompute a shortest replacement path after every outage, this is rather inefficient both in time and/or storage. One way to overcome this problem is to shift computational burden from the queries into a pre-processing step, where a data structure is computed that allows for fast querying of replacement paths, typically referred to as a Distance Sensitivity Oracle (DSO). While DSOs have been extensively studied in the theoretical computer science community, to the best of our knowledge this is the first work to construct DSOs using deep learning techniques. We show how to use deep learning to utilize a combinatorial structure of replacement paths. More specifically, we utilize the combinatorial structure of replacement paths as a concatenation of shortest paths and use deep learning to find the pivot nodes for stitching shortest paths into replacement paths.Comment: arXiv admin note: text overlap with arXiv:2007.11495 by other author

    Conditional Hardness for Sensitivity Problems

    Get PDF
    In recent years it has become popular to study dynamic problems in a sensitivity setting: Instead of allowing for an arbitrary sequence of updates, the sensitivity model only allows to apply batch updates of small size to the original input data. The sensitivity model is particularly appealing since recent strong conditional lower bounds ruled out fast algorithms for many dynamic problems, such as shortest paths, reachability, or subgraph connectivity. In this paper we prove conditional lower bounds for these and additional problems in a sensitivity setting. For example, we show that under the Boolean Matrix Multiplication (BMM) conjecture combinatorial algorithms cannot compute the (4/3-varepsilon)-approximate diameter of an undirected unweighted dense graph with truly subcubic preprocessing time and truly subquadratic update/query time. This result is surprising since in the static setting it is not clear whether a reduction from BMM to diameter is possible. We further show under the BMM conjecture that many problems, such as reachability or approximate shortest paths, cannot be solved faster than by recomputation from scratch even after only one or two edge insertions. We extend our reduction from BMM to Diameter to give a reduction from All Pairs Shortest Paths to Diameter under one deletion in weighted graphs. This is intriguing, as in the static setting it is a big open problem whether Diameter is as hard as APSP. We further get a nearly tight lower bound for shortest paths after two edge deletions based on the APSP conjecture. We give more lower bounds under the Strong Exponential Time Hypothesis. Many of our lower bounds also hold for static oracle data structures where no sensitivity is required. Finally, we give the first algorithm for the (1+varepsilon)-approximate radius, diameter, and eccentricity problems in directed or undirected unweighted graphs in case of single edges failures. The algorithm has a truly subcubic running time for graphs with a truly subquadratic number of edges; it is tight w.r.t. the conditional lower bounds we obtain

    Fixed-Parameter Sensitivity Oracles

    Get PDF
    We combine ideas from distance sensitivity oracles (DSOs) and fixed-parameter tractability (FPT) to design sensitivity oracles for FPT graph problems. An oracle with sensitivity ff for an FPT problem Π\Pi on a graph GG with parameter kk preprocesses GG in time O(g(f,k)poly(n))O(g(f,k) \cdot \textsf{poly}(n)). When queried with a set FF of at most ff edges of GG, the oracle reports the answer to the Π\Pi-with the same parameter kk-on the graph GFG-F, i.e., GG deprived of FF. The oracle should answer queries in a time that is significantly faster than merely running the best-known FPT algorithm on GFG-F from scratch. We mainly design sensitivity oracles for the kk-Path and the kk-Vertex Cover problem. Following our line of research connecting fault-tolerant FPT and shortest paths problems, we also introduce parameterization to the computation of distance preservers. We study the problem, given a directed unweighted graph with a fixed source ss and parameters ff and kk, to construct a polynomial-sized oracle that efficiently reports, for any target vertex vv and set FF of at most ff edges, whether the distance from ss to vv increases at most by an additive term of kk in GFG-F.Comment: 19 pages, 1 figure, abstract shortened to meet ArXiv requirements; accepted at ITCS'2
    corecore