19,672 research outputs found

    Deterministic Algorithms for Decremental Approximate Shortest Paths: Faster and Simpler

    Full text link
    In the decremental (1+ϵ)(1+\epsilon)-approximate Single-Source Shortest Path (SSSP) problem, we are given a graph G=(V,E)G=(V,E) with n=V,m=En = |V|, m = |E|, undergoing edge deletions, and a distinguished source sVs \in V, and we are asked to process edge deletions efficiently and answer queries for distance estimates dist~G(s,v)\widetilde{\mathbf{dist}}_G(s,v) for each vVv \in V, at any stage, such that distG(s,v)dist~G(s,v)(1+ϵ)distG(s,v)\mathbf{dist}_G(s,v) \leq \widetilde{\mathbf{dist}}_G(s,v) \leq (1+ \epsilon)\mathbf{dist}_G(s,v). In the decremental (1+ϵ)(1+\epsilon)-approximate All-Pairs Shortest Path (APSP) problem, we are asked to answer queries for distance estimates dist~G(u,v)\widetilde{\mathbf{dist}}_G(u,v) for every u,vVu,v \in V. In this article, we consider the problems for undirected, unweighted graphs. We present a new \emph{deterministic} algorithm for the decremental (1+ϵ)(1+\epsilon)-approximate SSSP problem that takes total update time O(mn0.5+o(1))O(mn^{0.5 + o(1)}). Our algorithm improves on the currently best algorithm for dense graphs by Chechik and Bernstein [STOC 2016] with total update time O~(n2)\tilde{O}(n^2) and the best existing algorithm for sparse graphs with running time O~(n1.25m)\tilde{O}(n^{1.25}\sqrt{m}) [SODA 2017] whenever m=O(n1.5o(1))m = O(n^{1.5 - o(1)}). In order to obtain this new algorithm, we develop several new techniques including improved decremental cover data structures for graphs, a more efficient notion of the heavy/light decomposition framework introduced by Chechik and Bernstein and the first clustering technique to maintain a dynamic \emph{sparse} emulator in the deterministic setting. As a by-product, we also obtain a new simple deterministic algorithm for the decremental (1+ϵ)(1+\epsilon)-approximate APSP problem with near-optimal total running time O~(mn/ϵ)\tilde{O}(mn /\epsilon) matching the time complexity of the sophisticated but rather involved algorithm by Henzinger, Forster and Nanongkai [FOCS 2013].Comment: Appeared in SODA'2

    Cache-Oblivious Data Structures and Algorithms for Undirected Breadth-First Search and Shortest Paths

    Get PDF
    We present improved cache-oblivious data structures and algorithms for breadth-first search (BFS) on undirected graphs and the single-source shortest path (SSSP) problem on undirected graphs with non-negative edge weights. For the SSSP problem, our result closes the performance gap between the currently best cache-aware algorithm and the cache-oblivious counterpart. Our cache-oblivious SSSP-algorithm takes nearly full advantage of block transfers for dense graphs. The algorithm relies on a new data structure, called bucket heap, which is the first cache-oblivious priority queue to efficiently support a weak DECREASEKEY operation. For the BFS problem, we reduce the number of I/Os for sparse graphs by a factor of nearly sqrt{B}, where B is the cache-block size, nearly closing the performance gap between the currently best cache-aware and cache-oblivious algorithms

    Geometric shortest path containers [online]

    Get PDF
    In this paper, we consider Dijkstra\u27s algorithm for the single source single target shortest path problem in large sparse graphs. The goal is to reduce the response time for on-line queries by using precomputed information. Due to the size of the graph, preprocessing space requirements can be only linear in the number of nodes. We assume that a layout of the graph is given. In the preprocessing, we determine from this layout a geometric object for each edge containing all nodes that can be reached by a shortest path starting with that edge. Based on these geometric objects, the search space for on-line computation can be reduced significantly. Shortest path queries can then be answered by Dijkstra\u27s algorithm restricted to edges where the corresponding geometric object contains the target. We present an extensive experimental study comparing the impact of different types of objects. The test data we use are real-world traffic networks, the typical field of application for this scenario. Furthermore, we present new algorithms as well as an empirical study for the dynamic case of this problem, where edge weights are subject to change and the geometric containers have to be updated. We evaluate the quality and the time for different update strategies that guarantee correct shortest paths. Finally, we present a software framework in C++ to realize the implementations of all of our variants of Dijkstra\u27s algorithm. A basic implementation of the algorithm is refined for each modification and - even more importantly - these modifications can be combined in any possible way without loss of efficiency

    Algorithms for finding shortest paths in networks with vertex transfer penalties

    Get PDF
    In this paper we review many of the well-known algorithms for solving the shortest path problem in edge-weighted graphs. We then focus on a variant of this problem in which additional penalties are incurred at the vertices. These penalties can be used to model things like waiting times at road junctions and delays due to transfers in public transport. The usual way of handling such penalties is through graph expansion. As an alternative, we propose two variants of Dijkstra’s algorithm that operate on the original, unexpanded graph. Analyses are then presented to gauge the relative advantages and disadvantages of these methods. Asymptotically, compared to using Dijkstra’s algorithm on expanded graphs, our first variant is faster for very sparse graphs but slower with dense graphs. In contrast, the second variant features identical worst-case run times. Keywords: shortest path problems; Dijkstra’s algorithm; transfer penalties; public transpor

    Decremental Single-Source Shortest Paths on Undirected Graphs in Near-Linear Total Update Time

    Full text link
    In the decremental single-source shortest paths (SSSP) problem we want to maintain the distances between a given source node ss and every other node in an nn-node mm-edge graph GG undergoing edge deletions. While its static counterpart can be solved in near-linear time, this decremental problem is much more challenging even in the undirected unweighted case. In this case, the classic O(mn)O(mn) total update time of Even and Shiloach [JACM 1981] has been the fastest known algorithm for three decades. At the cost of a (1+ϵ)(1+\epsilon)-approximation factor, the running time was recently improved to n2+o(1)n^{2+o(1)} by Bernstein and Roditty [SODA 2011]. In this paper, we bring the running time down to near-linear: We give a (1+ϵ)(1+\epsilon)-approximation algorithm with m1+o(1)m^{1+o(1)} expected total update time, thus obtaining near-linear time. Moreover, we obtain m1+o(1)logWm^{1+o(1)} \log W time for the weighted case, where the edge weights are integers from 11 to WW. The only prior work on weighted graphs in o(mn)o(m n) time is the mn0.9+o(1)m n^{0.9 + o(1)}-time algorithm by Henzinger et al. [STOC 2014, ICALP 2015] which works for directed graphs with quasi-polynomial edge weights. The expected running time bound of our algorithm holds against an oblivious adversary. In contrast to the previous results which rely on maintaining a sparse emulator, our algorithm relies on maintaining a so-called sparse (h,ϵ)(h, \epsilon)-hop set introduced by Cohen [JACM 2000] in the PRAM literature. An (h,ϵ)(h, \epsilon)-hop set of a graph G=(V,E)G=(V, E) is a set FF of weighted edges such that the distance between any pair of nodes in GG can be (1+ϵ)(1+\epsilon)-approximated by their hh-hop distance (given by a path containing at most hh edges) on G=(V,EF)G'=(V, E\cup F). Our algorithm can maintain an (no(1),ϵ)(n^{o(1)}, \epsilon)-hop set of near-linear size in near-linear time under edge deletions.Comment: Accepted to Journal of the ACM. A preliminary version of this paper was presented at the 55th IEEE Symposium on Foundations of Computer Science (FOCS 2014). Abstract shortened to respect the arXiv limit of 1920 character

    A Randomized Algorithm for Single-Source Shortest Path on Undirected Real-Weighted Graphs

    Full text link
    In undirected graphs with real non-negative weights, we give a new randomized algorithm for the single-source shortest path (SSSP) problem with running time O(mlognloglogn)O(m\sqrt{\log n \cdot \log\log n}) in the comparison-addition model. This is the first algorithm to break the O(m+nlogn)O(m+n\log n) time bound for real-weighted sparse graphs by Dijkstra's algorithm with Fibonacci heaps. Previous undirected non-negative SSSP algorithms give time bound of O(mα(m,n)+min{nlogn,nloglogr})O(m\alpha(m,n)+\min\{n\log n, n\log\log r\}) in comparison-addition model, where α\alpha is the inverse-Ackermann function and rr is the ratio of the maximum-to-minimum edge weight [Pettie & Ramachandran 2005], and linear time for integer edge weights in RAM model [Thorup 1999]. Note that there is a proposed complexity lower bound of Ω(m+min{nlogn,nloglogr})\Omega(m+\min\{n\log n, n\log\log r\}) for hierarchy-based algorithms for undirected real-weighted SSSP [Pettie & Ramachandran 2005], but our algorithm does not obey the properties required for that lower bound. As a non-hierarchy-based approach, our algorithm shows great advantage with much simpler structure, and is much easier to implement.Comment: 17 page

    Topology Discovery of Sparse Random Graphs With Few Participants

    Get PDF
    We consider the task of topology discovery of sparse random graphs using end-to-end random measurements (e.g., delay) between a subset of nodes, referred to as the participants. The rest of the nodes are hidden, and do not provide any information for topology discovery. We consider topology discovery under two routing models: (a) the participants exchange messages along the shortest paths and obtain end-to-end measurements, and (b) additionally, the participants exchange messages along the second shortest path. For scenario (a), our proposed algorithm results in a sub-linear edit-distance guarantee using a sub-linear number of uniformly selected participants. For scenario (b), we obtain a much stronger result, and show that we can achieve consistent reconstruction when a sub-linear number of uniformly selected nodes participate. This implies that accurate discovery of sparse random graphs is tractable using an extremely small number of participants. We finally obtain a lower bound on the number of participants required by any algorithm to reconstruct the original random graph up to a given edit distance. We also demonstrate that while consistent discovery is tractable for sparse random graphs using a small number of participants, in general, there are graphs which cannot be discovered by any algorithm even with a significant number of participants, and with the availability of end-to-end information along all the paths between the participants.Comment: A shorter version appears in ACM SIGMETRICS 2011. This version is scheduled to appear in J. on Random Structures and Algorithm

    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

    JGraphT -- A Java library for graph data structures and algorithms

    Full text link
    Mathematical software and graph-theoretical algorithmic packages to efficiently model, analyze and query graphs are crucial in an era where large-scale spatial, societal and economic network data are abundantly available. One such package is JGraphT, a programming library which contains very efficient and generic graph data-structures along with a large collection of state-of-the-art algorithms. The library is written in Java with stability, interoperability and performance in mind. A distinctive feature of this library is the ability to model vertices and edges as arbitrary objects, thereby permitting natural representations of many common networks including transportation, social and biological networks. Besides classic graph algorithms such as shortest-paths and spanning-tree algorithms, the library contains numerous advanced algorithms: graph and subgraph isomorphism; matching and flow problems; approximation algorithms for NP-hard problems such as independent set and TSP; and several more exotic algorithms such as Berge graph detection. Due to its versatility and generic design, JGraphT is currently used in large-scale commercial, non-commercial and academic research projects. In this work we describe in detail the design and underlying structure of the library, and discuss its most important features and algorithms. A computational study is conducted to evaluate the performance of JGraphT versus a number of similar libraries. Experiments on a large number of graphs over a variety of popular algorithms show that JGraphT is highly competitive with other established libraries such as NetworkX or the BGL.Comment: Major Revisio
    corecore