20,872 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

    A Sidetrack-Based Algorithm for Finding the k Shortest Simple Paths in a Directed Graph

    Get PDF
    We present an algorithm for the k shortest simple path problem on weighted directed graphs (kSSP) that is based on Eppstein's algorithm for a similar problem in which paths are allowed to contain cycles. In contrast to most other algorithms for kSSP, ours is not based on Yen's algorithm and does not solve replacement path problems. Its worst-case running time is on par with state-of-the-art algorithms for kSSP. Using our algorithm, one may find O(m) simple paths with a single shortest path tree computation and O(n + m) additional time per path in well-behaved cases, where n is the number of nodes and m is the number of edges. Our computational results show that on random graphs and large road networks, these well-behaved cases are quite common and our algorithm is faster than existing algorithms by an order of magnitude. Further, the running time is far better predictable due to very small dispersion

    Improved Approximation Bounds for Minimum Weight Cycle in the CONGEST Model

    Full text link
    Minimum Weight Cycle (MWC) is the problem of finding a simple cycle of minimum weight in a graph G=(V,E)G=(V,E). This is a fundamental graph problem with classical sequential algorithms that run in O~(n3)\tilde{O}(n^3) and O~(mn)\tilde{O}(mn) time where n=Vn=|V| and m=Em=|E|. In recent years this problem has received significant attention in the context of hardness through fine grained sequential complexity as well as in design of faster sequential approximation algorithms. For computing minimum weight cycle in the distributed CONGEST model, near-linear in nn lower and upper bounds on round complexity are known for directed graphs (weighted and unweighted), and for undirected weighted graphs; these lower bounds also apply to any (2ϵ)(2-\epsilon)-approximation algorithm. This paper focuses on round complexity bounds for approximating MWC in the CONGEST model: For coarse approximations we show that for any constant α>1\alpha >1, computing an α\alpha-approximation of MWC requires Ω(nlogn)\Omega (\frac{\sqrt n}{\log n}) rounds on weighted undirected graphs and on directed graphs, even if unweighted. We complement these lower bounds with sublinear O~(n2/3+D)\tilde{O}(n^{2/3}+D)-round algorithms for approximating MWC close to a factor of 2 in these classes of graphs. A key ingredient of our approximation algorithms is an efficient algorithm for computing (1+ϵ)(1+\epsilon)-approximate shortest paths from kk sources in directed and weighted graphs, which may be of independent interest for other CONGEST problems. We present an algorithm that runs in O~(nk+D)\tilde{O}(\sqrt{nk} + D) rounds if kn1/3k \ge n^{1/3} and O~(nk+k2/5n2/5+o(1)D2/5+D)\tilde{O}(\sqrt{nk} + k^{2/5}n^{2/5+o(1)}D^{2/5} + D) rounds if k<n1/3k<n^{1/3}, and this round complexity smoothly interpolates between the best known upper bounds for approximate (or exact) SSSP when k=1k=1 and APSP when k=nk=n

    Efficiently listing bounded length st-paths

    Full text link
    The problem of listing the KK shortest simple (loopless) stst-paths in a graph has been studied since the early 1960s. For a non-negatively weighted graph with nn vertices and mm edges, the most efficient solution is an O(K(mn+n2logn))O(K(mn + n^2 \log n)) algorithm for directed graphs by Yen and Lawler [Management Science, 1971 and 1972], and an O(K(m+nlogn))O(K(m+n \log n)) algorithm for the undirected version by Katoh et al. [Networks, 1982], both using O(Kn+m)O(Kn + m) space. In this work, we consider a different parameterization for this problem: instead of bounding the number of stst-paths output, we bound their length. For the bounded length parameterization, we propose new non-trivial algorithms matching the time complexity of the classic algorithms but using only O(m+n)O(m+n) space. Moreover, we provide a unified framework such that the solutions to both parameterizations -- the classic KK-shortest and the new length-bounded paths -- can be seen as two different traversals of a same tree, a Dijkstra-like and a DFS-like traversal, respectively.Comment: 12 pages, accepted to IWOCA 201

    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
    corecore