14 research outputs found

    An O(n^{2.75}) algorithm for online topological ordering

    Full text link
    We present a simple algorithm which maintains the topological order of a directed acyclic graph with n nodes under an online edge insertion sequence in O(n^{2.75}) time, independent of the number of edges m inserted. For dense DAGs, this is an improvement over the previous best result of O(min(m^{3/2} log(n), m^{3/2} + n^2 log(n)) by Katriel and Bodlaender. We also provide an empirical comparison of our algorithm with other algorithms for online topological sorting. Our implementation outperforms them on certain hard instances while it is still competitive on random edge insertion sequences leading to complete DAGs.Comment: 20 pages, long version of SWAT'06 pape

    Traversing large graphs in realistic settings

    Get PDF
    The notion of graph traversal is of fundamental importance to solving many computational problems. In many modern applications involving graph traversal such as those arising in the domain of social networks, Internet based services, fraud detection in telephone calls etc., the underlying graph is very large and dynamically evolving. This thesis deals with the design and engineering of First Search (BFS) algorithms for massive sparse undirected graphs. Our pipelined implementations with low constant factors, together with some heuristics preserving the worst-case guarantees makes BFS viable on massive graphs. We perform an extensive set of experiments to study the effect of various graph properties such as diameter, inititraversal algorithms for such graphs. We engineer various I/O-efficient Breadth al disk layouts, tuning parameters, disk parallelism, cache-obliviousness etc. on the relative performance of these algorithms. We characterize the performance of NAND flash based storage devices, including many solid state disks. We show that despite the similarities between flash memory and RAM (fast random reads) and between flash disk and hard disk (both are block based devices), the algorithms designed in the RAM model or the external memory model do not realize the full potential of the flash memory devices. We also analyze the effect of misalignments, aging, past I/O patterns, etc. on the performance obtained on these devices. We also consider I/O-efficient BFS algorithms for the case when a hard disk and a solid state disk are used together. We present a simple algorithm which maintains the topological order of a directed acyclic graph with n nodes under an online edge insertion sequence in O(n2.75)time, independent of the number m of edges inserted. For dense DAGs, this is an improvement over the previous best result of O (min{m3/2 logn,m3/2 +n2 logn}). While our analysis holds only for the incremental setting, our algorithm itself is fully dynamic. We also present the first average-case analysis of online topological ordering algorithms. We prove an expected runtime of O (n2 polylog(n)) under insertion of the edges of a complete DAG in a random order for various incremental topological ordering algorithms.Die Traversierung von Graphen ist von fundamentaler Bedeutung fĂŒr das Lösen vieler Berechnungsprobleme. Moderne Anwendungen, die auf Graphtraversierung beruhen, findet man unter anderem in sozialen Netzwerken, internetbasierten Dienstleistungen, Betrugserkennung bei Telefonanrufen. In vielen dieser lAnwendungen ist der zugrunde iegende Graph sehr gross und Ă€ndert sich kontinuierlich. Wir entwickelnmehrere I/O-effiziente Breitensuch-Algorithmen fĂŒr massive, dĂŒnnbesiedelte, ungerichtete Graphen. Im Zusammenspiel mit Heuristiken zur Einhaltung von Worst-Case-Garantien, ermöglichen unsere pipeline-basierten Implementierungen die PraktikabilitĂ€t von Breitensuche auf massiven Graphen. Wir fĂŒhren eine Vielfalt an Experimente durch, um die Wirkung unterschiedlicher Grapheigenschaften zu untersuchen, wie z.B. Graph-Durchmesser, anfĂ€ngliche Belegung der Festplatte, Tuning-Parameter, Plattenparallelismus. Wir charakterisieren die Leistung von NAND-Flash basierten Speichermedien, einschliesslich vieler solid-state Disks. Wir zeigen, dass trotz der Ähnlichkeiten von Flash-Speicher und RAM (schnelle wahlfreie Lese-Zugriffe) und von Flash-Platten und Festplatten (beide sind blockbasiert) Algorithmen, die fĂŒr das RAMModell oder das Externspeicher-Modell entworfenen wurden, nicht das volle Potential der Flash-Speicher-Medien ausschöpfen. ZusĂ€tzlich analysieren wir die Wirkung von Ausrichtungsfehlern, Alterung, vorausgehenden I/O-Mustern, usw., auf die Leistung dieser Medien. Wir berĂŒcksichtigen auch I/O-effiziente Breitensuch-Algorithmen fĂŒr die gleichzeitige Nutzung von Festplatten und solid-state Disks. Wir stellen einen einfachen Algorithmus vor, der beim Online-EinfĂŒgen von Kanten die topologische Ordnung von einem gerichteten, azyklischen Graphen (DAG) mit n Knoten beibehĂ€lt. Dieser Algorithmus hat eine LaufzeitkomplexitĂ€t von O(n2.75) unabhĂ€ngig von der Anzahl m der eingefĂŒgten Kanten. FĂŒr dichte DAGs ist dies eine Verbesserung des besten, vorherigen Ergebnisses von O(min{m3/2 logn,m3/2 +n2 logn}). WĂ€hrend die Analyse nur im inkrementellen Szenario gĂŒtlig ist, ist unser Algorithmus vollstĂ€ndig dynamisch. Ferner stellen wir die erste Average-Case-Analyse von Online-Algorithmen zur Unterhaltung einer topologischen Ordnung vor. FĂŒr mehrere inkrementelle Algorithmen, welche die Kanten eines kompletten DAGs in zufĂ€lliger Reihenfolge einfĂŒgen, beweisen wir eine erwartete Laufzeit von O(n2 polylog(n))

    Incremental SCC Maintenance in Sparse Graphs

    Get PDF

    Incremental Cycle Detection, Topological Ordering, and Strong Component Maintenance

    Full text link
    We present two on-line algorithms for maintaining a topological order of a directed nn-vertex acyclic graph as arcs are added, and detecting a cycle when one is created. Our first algorithm handles mm arc additions in O(m3/2)O(m^{3/2}) time. For sparse graphs (m/n=O(1)m/n = O(1)), this bound improves the best previous bound by a logarithmic factor, and is tight to within a constant factor among algorithms satisfying a natural {\em locality} property. Our second algorithm handles an arbitrary sequence of arc additions in O(n5/2)O(n^{5/2}) time. For sufficiently dense graphs, this bound improves the best previous bound by a polynomial factor. Our bound may be far from tight: we show that the algorithm can take Ω(n222lg⁥n)\Omega(n^2 2^{\sqrt{2\lg n}}) time by relating its performance to a generalization of the kk-levels problem of combinatorial geometry. A completely different algorithm running in Θ(n2log⁥n)\Theta(n^2 \log n) time was given recently by Bender, Fineman, and Gilbert. We extend both of our algorithms to the maintenance of strong components, without affecting the asymptotic time bounds.Comment: 31 page

    An improved algorithm for incremental cycle detection and topological ordering in sparse graphs

    Get PDF
    We consider the problem of incremental cycle detection and topological ordering in a directed graph G = (V, E) with |V| = n nodes. In this setting, initially the edge-set E of the graph is empty. Subsequently, at each time-step an edge gets inserted into G. After every edge-insertion, we have to report if the current graph contains a cycle, and as long as the graph remains acyclic, we have to maintain a topological ordering of the node-set V. Let m be the total number of edges that get inserted into G. We present a randomized algorithm for this problem with Õ(m4/3) total expected update time. Our result improves the Õ(m ‱ min(m1/2, n2/3)) total update time bound of [5, 9, 10, 7]. In particular, for m = O(n), our result breaks the longstanding barrier on the total update time. Furthermore, whenever m = o(n3/2), our result improves upon the recently obtained total update time bound of [6]. We note that if m = Ω(n3/2), then the algorithm of [5, 4, 7], which has Õ(n2) total update time, beats the performance of the time algorithm of [6]. It follows that we improve upon the total update time of the algorithm of [6] in the “interesting” range of sparsity where m = o(n3/2). Our result also happens to be the first one that breaks the lower bound of [9] on the total update time of any local algorithm for a nontrivial range of sparsity. Specifically, the total update time of our algorithm is whenever . From a technical perspective, we obtain our result by combining the algorithm of [6] with the balanced search framework of [10]
    corecore