- Research Article
13
- 10.1016/s0304-3975(02)00613-8
Improved shortest path algorithms for nearly acyclic graphs
- Jan 21, 2003
- Theoretical Computer Science
- Shane Saunders + 1 more +1
Improved shortest path algorithms for nearly acyclic graphs
The single-source shortest paths problem (SSSP) is one of the classic problems in algorithmic graph theory: given a positively weighted graph G with a source vertex s , find the shortest path from s to all other vertices in the graph. Since 1959, all theoretical developments in SSSP for general directed and undirected graphs have been based on Dijkstra's algorithm, visiting the vertices in order of increasing distance from s . Thus, any implementation of Dijkstra's algorithm sorts the vertices according to their distances from s . However, we do not know how to sort in linear time. Here, a deterministic linear time and linear space algorithm is presented for the undirected single source shortest paths problem with positive integer weights. The algorithm avoids the sorting bottleneck by building a hierarchical bucketing structure, identifying vertex pairs that may be visited in any order.
Improved shortest path algorithms for nearly acyclic graphs
Improved shortest path algorithms for nearly acyclic graphs
Shortest Path Problems
The shortest path problem (SPP) constitutes one of the most frequently encountered classes of problems in graph theory. It is certainly the most fundamental of components in the fields of transportation and communication networks. Shortest path problems may be encountered directly, possibly as a result of a clever formulation of a problem not at first sight involving shortest paths, or indirectly as a subproblem in the solution of a more complicated optimization problem. This use of shortest path problems as subroutines motivates the search for algorithms with good theoretical bounds on running time. We also seek computer implementations whose empirical performances are rapid in spite of perhaps weak theoretical bounds for the algorithms they implement. As testimony to the importance of shortest path and related problems, a large number of surveys, annotated bibliographies, and reviews have appeared over the past thirty years. Among them are those by Dreyfus (1969), Pierce (1975), Golden and Magnanti (1977), and Gallo and Pallottino (1988).
Read moreShortest Path Problem for a Graph of DNA String using Adenine and Guanine in Purine Bases as the Vertex
In the field of research on Deoxyribonucleic acid (DNA), graph theory can be applied to model the structure of a DNA molecule. In particular, the shortest path problem in graph theory can be used to identify the shortest path between vertices of a graph. Hence, it is possible to apply the shortest path problem for minimization of a DNA string so that the time taken for computation of genome assembly can be reduced. This paper presents a method to represent a DNA string graphically where the shortest path is calculated for the graph generated from the DNA string, and the shortest path is then used to minimize the DNA string. In this research, a DNA string is presented in graphical form by using base pairs of length two as the vertices where the initial bases used are Adenine (A) and Guanine (G) which are the main bases in purine. The number of base pairs between adjacent vertices in the DNA string is represented by the edges. The graph is then reduced by following a given set of rules where the shortest path is calculated for all start and end vertices of the reduced graph. Next, the simplification of the graph is done based on the shortest paths obtained by removing all the untraversed paths where the Euler path for the simplified graph is used to form a minimized DNA string. The result shows that a minimized DNA string can be obtained by simplifying the graph of the DNA string using the shortest path problem
Read moreEfficient Algorithms for Disjoint Shortest Paths Problem and its Extensions
We study the 2-Disjoint Shortest Paths (2-DSP) problem: given a directed weighted graph and two terminal pairs (s₁,t₁) and (s₂,t₂), decide whether there exist vertex-disjoint shortest paths between each pair. Building on recent advances in disjoint shortest paths for DAGs and undirected graphs (Akmal et al. 2024), we present an O(mn log n)-time algorithm for this problem in weighted directed graphs that do not contain negative or zero weight cycles. This algorithm presents a significant improvement over the previously known O(m⁵n)-time bound (Berczi et al. 2017). Our approach exploits the algebraic structure of polynomials that enumerate shortest paths between terminal pairs. A key insight is that these polynomials admit a recursive decomposition, enabling efficient evaluation via dynamic programming over fields of characteristic two. Furthermore, we demonstrate how to report the corresponding paths in O(mn² log n)-time. In addition, we extend our techniques to a more general setting: given two terminal pairs (s₁, t₁) and (s₂, t₂) in a directed graph, find the minimum possible number of vertex intersections between any shortest path from s₁ to t₁ and s₂ to t₂. We call this the Minimum 2-Disjoint Shortest Paths (Min-2-DSP) problem. We provide in this paper the first efficient algorithm for this problem, including an O(m² n³)-time algorithm for directed graphs with positive edge weights, and an O(m+n)-time algorithm for DAGs and undirected graphs. Moreover, if the number of intersecting vertices is at least one, we show that it is possible to report the paths in the same O(m+n)-time. This is somewhat surprising, as there is no known o(mn) time algorithm for explicitly reporting the paths if they are vertex-disjoint, and is left as an open problem in (Akmal et al. 2024).
Read moreNew Parallel Shortest Path Searching Algorithm based on Dynamically Reconfigurable Processor DAPDNA-2
This paper proposes a parallel shortest path-searching algorithm and implements it on a newly structured parallel reconfigurable processor, DAPDNA-2 (IPFlex Inc). Routing determines the shortest paths from the source to the ultimate destination through intermediate nodes. In open shortest path first (OSPF), Dijkstra's shortest path algorithm, which is the conventional one, finds the shortest paths from the source on a program counter-based processor. The calculation time for Dijkstra's algorithm is O(N <sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> ) when the number of nodes is N. When the network scale is large, calculation time required by Dijkstra's algorithm increases rapidly. It's very difficult to compute Dijkstra's algorithm in parallel because of the need for previous calculation results, so Dijkstra's algorithm is unsuitable for parallel processors. Our proposed scheme finds the shortest paths using a simultaneous multi-path search method. In contrast with Dijkstra's algorithm, several nodes can be determined at one time. Moreover, we partition the network into different groups (network groups) and find the all-node pair's shortest path in each group using a pipeline operation. Networks can be abstracted, and the shortest paths in very large networks can be found easily. The proposed scheme can decrease calculation time from O(N <sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> ) to O(N) using a pipeline operation on DAPDNA-2. Our simulations show that the proposed algorithm uses 99.6% less calculation time than Dijkstra's algorithm. The proposed algorithm can be applied to the very large Internet network designs of the future.
Read moreNear-Optimal Approximate Shortest Paths and Transshipment in Distributed and Streaming Models
We present a method for solving the transshipment problem - also known as uncapacitated minimum cost flow - up to a multiplicative error of $1 + \varepsilon$ in undirected graphs with non-negative edge weights using a tailored gradient descent algorithm. Using $\tilde{O}(\cdot)$ to hide polylogarithmic factors in $n$ (the number of nodes in the graph), our gradient descent algorithm takes $\tilde O(\varepsilon^{-2})$ iterations, and in each iteration it solves an instance of the transshipment problem up to a multiplicative error of $\operatorname{polylog} n$. In particular, this allows us to perform a single iteration by computing a solution on a sparse spanner of logarithmic stretch. Using a randomized rounding scheme, we can further extend the method to finding approximate solutions for the single-source shortest paths (SSSP) problem. As a consequence, we improve upon prior work by obtaining the following results: (1) Broadcast CONGEST model: $(1 + \varepsilon)$-approximate SSSP using $\tilde{O}((\sqrt{n} + D)\varepsilon^{-3})$ rounds, where $ D $ is the (hop) diameter of the network. (2) Broadcast congested clique model: $(1 + \varepsilon)$-approximate transshipment and SSSP using $\tilde{O}(\varepsilon^{-2})$ rounds. (3) Multipass streaming model: $(1 + \varepsilon)$-approximate transshipment and SSSP using $\tilde{O}(n)$ space and $\tilde{O}(\varepsilon^{-2})$ passes. The previously fastest SSSP algorithms for these models leverage sparse hop sets. We bypass the hop set construction; computing a spanner is sufficient with our method. The above bounds assume non-negative edge weights that are polynomially bounded in $n$; for general non-negative weights, running times scale with the logarithm of the maximum ratio between non-zero weights.
Read moreA theorem on the expected complexity of dijkstra's shortest path algorithm
A theorem on the expected complexity of dijkstra's shortest path algorithm
Deterministic decremental single source shortest paths: beyond the o(mn) bound
In this paper we consider the decremental single-source shortest paths (SSSP) problem, where given a graph G and a source node s the goal is to maintain shortest paths between s and all other nodes in G under a sequence of online adversarial edge deletions. In their seminal work, Even and Shiloach [JACM 1981] presented an exact solution to the problem with only O(mn) total update time over all edge deletions. Their classic algorithm was the best known result for the decremental SSSP problem for three decades, even when approximate shortest paths are allowed. The first improvement over the Even-Shiloach algorithm was given by Bernstein and Roditty [SODA 2011], who for the case of an unweighted and undirected graph presented an approximate (1+) algorithm with constant query time and a total update time of O(n2+O(1/√logn)). This work triggered a series of new results, culminating in a recent breakthrough of Henzinger, Krinninger and Nanongkai [FOCS 14], who presented a -approximate algorithm whose total update time is near linear O(m1+ O(1/√logn)). In this paper they posed as a major open problem the question of derandomizing their result. In fact, all known improvements over the Even-Shiloach algorithm are randomized. All these algorithms maintain some truncated shortest path trees from a small subset of nodes. While in the randomized setting it is possible to “hide” these nodes from the adversary, in the deterministic setting this is impossible: the adversary can delete all edges touching these nodes, thus forcing the algorithm to choose a new set of nodes and incur a new computation of shortest paths. In this paper we present the first deterministic decremental SSSP algorithm that breaks the Even-Shiloach bound of O(mn) total update time, for unweighted and undirected graphs. Our algorithm is (1 + є) approximate and achieves a total update time of O(n2). Our algorithm can also achieve the same bounds in the incremental setting. It is worth mentioning that for dense instances where m = Ω(n2 − 1/√log(n)), our algorithm is also faster than all existing randomized algorithms.
Read moreA Hybrid Algorithm for the Shortest-Path Problem in the Graph
Quantum algorithms run on quantum computers are qualitatively different from those that run on classical computers. Quantum computing algorithms can be used for several problems in graph theory. Most of the classical algorithms involve searching over some space for finding the shortest-paths problem between two points in a graph and a minimal weight spanning tree. We modified classical Dijkstra's algorithm and implement quantum search instead of classical search, of which it will lead to more efficient algorithm. Also we proposed the structure for non-classical algorithms and design the various phases of the probabilistic quantum-classical algorithm for classical and quantum parts. Finally, we represent the result of implementing and simulating Dijkstra's algorithm as the probabilistic quantum-classical algorithm.
Read moreCache-Oblivious Buffer Heap and Cache-Efficient Computation of Shortest Paths in Graphs
We present the buffer heap , a cache-oblivious priority queue that supports Delete-Min , Delete , and a hybrid Insert / Decrease-Key operation in O (1/ B log 2 N / M ) amortized block transfers from main memory, where M and B are the (unknown) cache size and block size, respectively, and N is the number of elements in the queue. We introduce the notion of a slim data structure that captures the situation when only a limited portion of the cache, which we call a slim cache , is available to the data structure to retain data between data structural operations. We show that a buffer heap automatically adapts to such an environment and supports all operations in O (1/λ + 1/ B log 2 N /λ) amortized block transfers each when the size of the slim cache is λ. Our results provide substantial improvements over known trivial cache performance bounds for cache-oblivious priority queues with Decrease-Keys . Using the buffer heap, we present cache-oblivious implementations of Dijkstra’s algorithm for undirected and directed single-source shortest path (SSSP) problems for graphs with non-negative real edge-weights. On a graph with n vertices and m edges, our algorithm for the undirected case performs O ( n + m / B log 2 n / M ) block transfers and for the directed case performs O (( n + m / B ) ċ log 2 n / B ) block transfers. These results give the first non-trivial cache-oblivious bounds for the SSSP problem on general graphs. For the all-pairs shortest path (APSP) problem on weighted undirected graphs, we incorporate slim buffer heaps into multi-buffer-buffer-heaps and use these to improve the cache-aware cache complexity. We also present a simple cache-oblivious APSP algorithm for unweighted undirected graphs that performs O ( mn / B log M / B n / B ) block transfers. This matches the cache-aware bound and is a substantial improvement over the previous cache-oblivious bound for the problem.
Read moreDYNAMIC LOCAL TRACING FOR 3D AXON CURVILINEAR STRUCTURE DETECTION FROM MICROSCOPIC IMAGE STACK
To study the morphologic structure of axons can help neuro-scientists understand the neuronal function and development. The modern microscopes provide the fundamental tool for visual inspection of axonal structure. Due to the high volume of generated microscopic axon image data, it is critical to develop an automated technique for robustly and rapidly detecting 3D axonal structure. In this paper, we present a pure 3D approach to extract the curvilinear structure of axonal axes from microscopic image stacks. The method mimics the axon tracing procedure in 3D space as walking along a path with minimized cost value, which corresponds to the shortest path problem (SPP) in graph theory. The global solution for SPP, such as Dijkstra's algorithm, is infeasible for the real axon tracing problem because of the computation cost. We simplify this problem using a dynamic local tracing technique with linear computation complexity. The merits of the proposed method lie in that it can handle the short turn and non-vertical problems and also can separate closely distributed axons from each other
Read moreLabeling methods for partially ordered paths
Labeling methods for partially ordered paths
Single Source Shortest Paths for All Flows with Integer Costs
We consider a shortest path problem for a directed graph with edges labeled with a cost and a capacity. The problem is to push an unsplittable flow $f$ from a specified source to all other vertices with the minimum cost for all f values. Let G = (V, E) with |V| = n and |E| = m. If there are t different capacity values, we can solve the single source shortest path problem t times for all f in O(tm + tn log n) time, which is O(m^2) when t = m. We improve this time to O(min{t, cn}m + cn^2), which is less than O(cmn) if edge costs are non-negative integers bounded by c. Our algorithm performs better for denser graphs.
Read moreEfficient Stepping Algorithms and Implementations for Parallel Shortest Paths
In this paper, we study the single-source shortest-path (SSSP) problem with positive edge weights, which is a notoriously hard problem in the parallel context. In practice, the $\Delta$-stepping algorithm proposed by Meyer and Sanders has been widely adopted. However, $\Delta$-stepping has no known worst-case bounds for general graphs. The performance of $\Delta$-stepping also highly relies on the parameter $\Delta$. There have also been lots of algorithms with theoretical bounds, such as Radius-stepping, but they either have no implementations available or are much slower than $\Delta$-stepping in practice. We propose a stepping algorithm framework that generalizes existing algorithms such as $\Delta$-stepping and Radius-stepping. The framework allows for similar analysis and implementations of all stepping algorithms. We also propose a new ADT, lazy-batched priority queue (LaB-PQ), that abstracts the semantics of the priority queue needed by the stepping algorithms. We provide two data structures for LaB-PQ, focusing on theoretical and practical efficiency, respectively. Based on the new framework and LaB-PQ, we show two new stepping algorithms, $\rho$-stepping and $\Delta^*$-stepping, that are simple, with non-trivial worst-case bounds, and fast in practice. The stepping algorithm framework also provides almost identical implementations for three algorithms: Bellman-Ford, $\Delta^*$-stepping, and $\rho$-stepping. We compare our code with four state-of-the-art implementations. On five social and web graphs, $\rho$-stepping is 1.3--2.5x faster than all the existing implementations. On two road graphs, our $\Delta^*$-stepping is at least 14\% faster than existing implementations, while $\rho$-stepping is also competitive. The almost identical implementations for stepping algorithms also allow for in-depth analyses and comparisons among the stepping algorithms in practice.
Read moreAn Edge-Fencing Strategy for Optimizing SSSP Computations on Large-Scale Graphs
The Single-Source Shortest Path (SSSP) problem is to compute the shortest distances in a weighted graph from a source vertex to every other vertex. This paper focuses on parallel efficiency and scalability of SSSP computations on large-scale graphs. We propose an edge-fencing strategy to customize a SSSP algorithm's schedule for every SSSP computation, and devise a path-centric SSSP algorithm with this strategy. This strategy aims at reducing both the relaxed edges and relaxations repeated on each edge. It exploits a few fence values to select the relaxed edges and schedule edge relaxations according to lengths of the created paths. The path-centric algorithm works on a hierarchical graph model, and exploits the edge-fencing strategy to schedule edge relaxations in parallel settings. The hierarchical graph model quantifies the length distribution of shortest paths in large-scale graphs, provides appropriate fence values for every SSSP computation. The algorithm was evaluated on a wide range of synthetic graphs and real-world graphs. The experimental results suggest that our algorithm is efficient and scalable for graphs with skewed degree distributions, and its performance is relatively insensitive to the hierarchical graph model's accuracy.
Read more