33 research outputs found

    A forward-backward single-source shortest paths algorithm

    Full text link
    We describe a new forward-backward variant of Dijkstra's and Spira's Single-Source Shortest Paths (SSSP) algorithms. While essentially all SSSP algorithm only scan edges forward, the new algorithm scans some edges backward. The new algorithm assumes that edges in the outgoing and incoming adjacency lists of the vertices appear in non-decreasing order of weight. (Spira's algorithm makes the same assumption about the outgoing adjacency lists, but does not use incoming adjacency lists.) The running time of the algorithm on a complete directed graph on nn vertices with independent exponential edge weights is O(n)O(n), with very high probability. This improves on the previously best result of O(nlog⁡n)O(n\log n), which is best possible if only forward scans are allowed, exhibiting an interesting separation between forward-only and forward-backward SSSP algorithms. As a consequence, we also get a new all-pairs shortest paths algorithm. The expected running time of the algorithm on complete graphs with independent exponential edge weights is O(n2)O(n^2), matching a recent algorithm of Demetrescu and Italiano as analyzed by Peres et al. Furthermore, the probability that the new algorithm requires more than O(n2)O(n^2) time is exponentially small, improving on the O(n−1/26)O(n^{-1/26}) probability bound obtained by Peres et al

    Average-case complexity of shortest-paths problems

    Get PDF
    We study both upper and lower bounds on the average-case complexity of shortestpaths algorithms. It is proved that the all-pairs shortest-paths problem on n-vertex networks can be solved in time O(n^2 log n) with high probability with respect to various probability distributions on the set of inputs. Our results include the first theoretical analysis of the average behavior of shortest-paths algorithms with respect to the vertex-potential model, a family of probability distributions on complete networks with arbitrary real arc costs but without negative cycles. We also generalize earlier work with respect to the common uniform model, and we correct the analysis of an algorithm with respect to the endpoint-independent model. For the algorithm that solves the all-pairs shortest-paths problem on networks generated according to the vertex-potential model, a key ingredient is an algorithm that solves the single-source shortest-paths problem on such networks in time O(n^2) with high probability. All algorithms mentioned exploit that with high probability, the single-source shortest-paths problem can be solved correctly by considering only a rather sparse subset of the arc set. We prove a lower bound indicating the limitations of this approach. In a fairly general probabilistic model, any algorithm solving the single-source shortest-paths problem has to inspect OMEGA(n log n) arcs with high probability.In dieser Arbeit werden sowohl obere als auch untere Schranken fĂŒr die average-case-KomplexitĂ€t von KĂŒrzeste-Wege-Algorithmen untersucht. Wir beweisen fĂŒr verschiedene Wahrscheinlichkeitsverteilungen auf Netzwerken mit n Knoten, dass das all-pairs shortest-paths problem mit hoher Wahrscheinlichkeit in Zeit O(n^2 log n) gelöst werden kann. Insbesondere können wir dieses Laufzeit fĂŒr einen Algorithmus beweisen, dessen Eingaben gemĂ€ĂŸ des vertex-potential model erzeugt werden, einer Familie von Wahrscheinlichkeitsverteilungen auf vollstĂ€ndigen Netzwerke mit reellen Kantenkosten, die jedoch keine negative Kreise besitzen. Theoretische Ergebnisse fĂŒr dieses Eingabemodell waren bislang nicht bekannt. Wir verallgemeinern außerdem frĂŒhere Arbeit bezĂŒglich des uniform model und korrigieren die Laufzeit-Analyse eines Algorithmus bezĂŒglich des endpoint-independent model. Der Algorithmus, der das all-pairs shortest-paths problem auf Netzwerken löst, die gemĂ€ĂŸ des vertex-potential model erzeugt werden, baut entscheidend darauf auf, dass wir auch einen Algorithmus entwickeln, der das single-source shortest-paths problem auf solchen Netzwerken mit hoher Wahrscheinlichkeit in Zeit O(n^2) löst. Alle bislang erwĂ€hnten Algorithmen nutzen aus, dass das single-source shortest-paths problem auch dann mit hoher Wahrscheinlichkeit korrekt gelöst werden kann, wenn wir nur einen Teil der Kantenmenge betrachten. Wir beweisen eine untere Schranke, die die Grenzen dieses Reduktionsansatzes belegt. Auf einer Klasse von Netzwerken mit ganzzahligen Kantenkosten muss jeder Algorithmus mit hoher Wahrscheinlichkeit OMEGA(n log n) Kanten inspizieren, um das single-source shortest-paths problem zu lösen

    New Algorithm and Data Structures for the All Pairs Shortest Path Problem

    Get PDF
    In 1985, Moffat-Takaoka (MT) algorithm was developed to solve the all pairs shortest path (APSP) problem. This algorithm manages to get time complexity of O(nÂČ log n) expected time when the end-point independent model of probabilistic assumption is used. However, the use of a critical point introduced in this algorithm has made the implementation of this algorithm quite complicated and the running time of this algorithm is difficult to analyze. Therefore, this study introduces a new deterministic algorithm for the APSP that provides an alternative to the existing MT algorithm. The major advantages of this approach compared to the MT algorithm are its simplicity, intuitive appeal and ease of analysis. Moreover, the algorithm was shown to be efficient as the expected running time is the same O(nÂČ log n). Performance of a good algorithm depends on the data structure used to speed up the operations needed by the algorithm such as insert, delete-min and decrease-key operations. In this study, two new data structures have been implemented, namely quaternary and dimensional heaps. In the experiment carried out, the quaternary heap that employed similar concept with the trinomial heap with a special insertion cache function performed better than the trinomial heap when the number of n vertices was small. Likewise, the dimensional heap data structure executed the decrease-key operation efficiently by maintaining the thinnest structure possible through the use of thin and thick edges, far surpassing the existing binary, Fibonacci and 2-3 heaps data structures when a special acyclic graph was used. Taken together all these promising findings, a new improved algorithm running on a good data structure can be implemented to enhance the computing accuracy and speed of todays computing machines

    Combining Shortest Paths, Bottleneck Paths and Matrix Multiplication

    Get PDF
    We provide a formal mathematical definition of the Shortest Paths for All Flows (SP-AF) problem and provide many efficient algorithms. The SP-AF problem combines the well known Shortest Paths (SP) and Bottleneck Paths (BP) problems, and can be solved by utilising matrix multiplication. Thus in our research of the SP-AF problem, we also make a series of contributions to the underlying topics of the SP problem, the BP problem, and matrix multiplication. For the topic of matrix multiplication we show that on an n-by-n two dimensional (2D) square mesh array, two n-by-n matrices can be multiplied in exactly 1.5n ‒ 1 communication steps. This halves the number of communication steps required by the well known Cannon’s algorithm that runs on the same sized mesh array. We provide two contributions for the SP problem. Firstly, we enhance the breakthrough algorithm by Alon, Galil and Margalit (AGM), which was the first algorithm to achieve a deeply sub-cubic time bound for solving the All Pairs Shortest Paths (APSP) problem on dense directed graphs. Our enhancement allows the algorithm by AGM to remain sub-cubic for larger upper bounds on integer edge costs. Secondly, we show that for graphs with n vertices, the APSP problem can be solved in exactly 3n ‒ 2 communication steps on an n-by-n 2D square mesh array. This improves on the previous result of 3.5n communication steps achieved by Takaoka and Umehara. For the BP problem, we show that we can compute the bottleneck of the entire graph without solving the All Pairs Bottleneck Paths (APBP) problem, resulting in a much more efficient time bound. Finally we define an algebraic structure called the distance/flow semi-ring to formally introduce the SP-AF problem, and we provide many algorithms for solving the Single Source SP-AF (SSSP-AF) problem and the All Pairs SP-AF (APSP-AF) problem. For the APSP-AF problem, algebraic algorithms are given that utilise faster matrix multiplication over a ring

    Design and analysis of sequential and parallel single-source shortest-paths algorithms

    Get PDF
    We study the performance of algorithms for the Single-Source Shortest-Paths (SSSP) problem on graphs with n nodes and m edges with nonnegative random weights. All previously known SSSP algorithms for directed graphs required superlinear time. Wie give the first SSSP algorithms that provably achieve linear O(n-m)average-case execution time on arbitrary directed graphs with random edge weights. For independent edge weights, the linear-time bound holds with high probability, too. Additionally, our result implies improved average-case bounds for the All-Pairs Shortest-Paths (APSP) problem on sparse graphs, and it yields the first theoretical average-case analysis for the "Approximate Bucket Implementation" of Dijkstra\u27s SSSP algorithm (ABI-Dijkstra). Futhermore, we give constructive proofs for the existence of graph classes with random edge weights on which ABI-Dijkstra and several other well-known SSSP algorithms require superlinear average-case time. Besides the classical sequential (single processor) model of computation we also consider parallel computing: we give the currently fastest average-case linear-work parallel SSSP algorithms for large graph classes with random edge weights, e.g., sparse rondom graphs and graphs modeling the WWW, telephone calls or social networks.In dieser Arbeit untersuchen wir die Laufzeiten von Algorithmen fĂŒr das KĂŒrzeste-Wege Problem (Single-Source Shortest-Paths, SSSP) auf Graphen mit n Knoten, M Kanten und nichtnegativen zufĂ€lligen Kantengewichten. Alle bisherigen SSSP Algorithmen benötigen auf gerichteten Graphen superlineare Zeit. Wir stellen den ersten SSSP Algorithmus vor, der auf beliebigen gerichteten Graphen mit zufĂ€lligen Kantengewichten eine beweisbar lineare average-case-KomplexitĂ€t O(n+m)aufweist. Sind die Kantengewichte unabhĂ€ngig, so wird die lineare Zeitschranke auch mit hoher Wahrscheinlichkeit eingehalten. Außerdem impliziert unser Ergebnis verbesserte average-case-Schranken fĂŒr das All-Pairs Shortest-Paths (APSP) Problem auf dĂŒnnen Graphen und liefert die erste theoretische average-case-Analyse fĂŒr die "Approximate Bucket Implementierung" von Dijkstras SSSP Algorithmus (ABI-Dijkstra). Weiterhin fĂŒhren wir konstruktive Existenzbeweise fĂŒr Graphklassen mit zufĂ€lligen Kantengewichten, auf denen ABI-Dijkstra und mehrere andere bekannte SSSP Algorithmen durchschnittlich superlineare Zeit benötigen. Neben dem klassischen seriellen (Ein-Prozessor) Berechnungsmodell betrachten wir auch Parallelverarbeitung; fĂŒr umfangreiche Graphklassen mit zufĂ€lligen Kantengewichten wie z.B. dĂŒnne Zufallsgraphen oder Modelle fĂŒr das WWW, Telefonanrufe oder soziale Netzwerke stellen wir die derzeit schnellsten parallelen SSSP Algorithmen mit durchschnittlich linearer Arbeit vor

    Compression methods for graph algorithms

    Get PDF
    Two compression methods for representing graphs are presented, in conjunction with algorithms applying these methods. A decomposition technique for networks that can be generated in O(m) time is presented. The components of the decomposition and the shortest path matrix of the compressed network can be used to find the shortest path between any pair of vertices in the original network in linear time. A compression method for boolean matrices and a method for applying the compression to boolean matrix multiplication is developed. The algorithms have an expected running time of O(nÂČ*log ₂n). From this compression method a simple heuristic that may be applied to any algorithm for boolean matrix multiplication has been developed. This heuristic will improve the average running time of boolean matrix multiplication algorithms. An order of magnitude analysis of the results published by Loukakis and Tsouris [1981], on the efficiency of algorithms for finding all maximal independent sets of a graph has been performed. This analysis showed that their conclusions, which are based on a direct comparison of the running times of the algorithms, do not take into account implementation factors. An average constant factor improvement is developed for the algorithm of Tsukiyama, Ide, Ariyoshi and Shirakawa [1977] for finding all maximal independent sets of a graph. Analysis of the running time results from the algorithm comparisons presented in this thesis show that the Bron-Kerbosch algorithm has the smallest rate of increase in running time as the size of the graphs increase

    Efficient computation of Harmonic Centrality on large networks: theory and practice

    Get PDF
    Progettazione ed implementazione di algoritmi efficienti per il calcolo esatto ed approssimato della Harmonic Centrality su grandi ret

    -

    Get PDF
    We study the performance of algorithms for the Single-Source Shortest-Paths (SSSP) problem on graphs with n nodes and m edges with nonnegative random weights. All previously known SSSP algorithms for directed graphs required superlinear time. Wie give the first SSSP algorithms that provably achieve linear O(n-m)average-case execution time on arbitrary directed graphs with random edge weights. For independent edge weights, the linear-time bound holds with high probability, too. Additionally, our result implies improved average-case bounds for the All-Pairs Shortest-Paths (APSP) problem on sparse graphs, and it yields the first theoretical average-case analysis for the "Approximate Bucket Implementation" of Dijkstra's SSSP algorithm (ABI-Dijkstra). Futhermore, we give constructive proofs for the existence of graph classes with random edge weights on which ABI-Dijkstra and several other well-known SSSP algorithms require superlinear average-case time. Besides the classical sequential (single processor) model of computation we also consider parallel computing: we give the currently fastest average-case linear-work parallel SSSP algorithms for large graph classes with random edge weights, e.g., sparse rondom graphs and graphs modeling the WWW, telephone calls or social networks.In dieser Arbeit untersuchen wir die Laufzeiten von Algorithmen fĂŒr das KĂŒrzeste-Wege Problem (Single-Source Shortest-Paths, SSSP) auf Graphen mit n Knoten, M Kanten und nichtnegativen zufĂ€lligen Kantengewichten. Alle bisherigen SSSP Algorithmen benötigen auf gerichteten Graphen superlineare Zeit. Wir stellen den ersten SSSP Algorithmus vor, der auf beliebigen gerichteten Graphen mit zufĂ€lligen Kantengewichten eine beweisbar lineare average-case-KomplexitĂ€t O(n+m)aufweist. Sind die Kantengewichte unabhĂ€ngig, so wird die lineare Zeitschranke auch mit hoher Wahrscheinlichkeit eingehalten. Außerdem impliziert unser Ergebnis verbesserte average-case-Schranken fĂŒr das All-Pairs Shortest-Paths (APSP) Problem auf dĂŒnnen Graphen und liefert die erste theoretische average-case-Analyse fĂŒr die "Approximate Bucket Implementierung" von Dijkstras SSSP Algorithmus (ABI-Dijkstra). Weiterhin fĂŒhren wir konstruktive Existenzbeweise fĂŒr Graphklassen mit zufĂ€lligen Kantengewichten, auf denen ABI-Dijkstra und mehrere andere bekannte SSSP Algorithmen durchschnittlich superlineare Zeit benötigen. Neben dem klassischen seriellen (Ein-Prozessor) Berechnungsmodell betrachten wir auch Parallelverarbeitung; fĂŒr umfangreiche Graphklassen mit zufĂ€lligen Kantengewichten wie z.B. dĂŒnne Zufallsgraphen oder Modelle fĂŒr das WWW, Telefonanrufe oder soziale Netzwerke stellen wir die derzeit schnellsten parallelen SSSP Algorithmen mit durchschnittlich linearer Arbeit vor
    corecore