36 research outputs found

    Incremental Low-High Orders of Directed Graphs and Applications

    Get PDF
    A flow graph G = (V, E, s) is a directed graph with a distinguished start vertex s. The dominator tree D of G is a tree rooted at s, such that a vertex v is an ancestor of a vertex w if and only if all paths from s to w include v. The dominator tree is a central tool in program optimization and code generation, and has many applications in other diverse areas including constraint programming, circuit testing, biology, and in algorithms for graph connectivity problems. A low-high order of G is a preorder d of D that certifies the correctness of D, and has further applications in connectivity and path-determination problems. In this paper we consider how to maintain efficiently a low-high order of a flow graph incrementally under edge insertions. We present algorithms that run in O(mn) total time for a sequence of edge insertions in a flow graph with n vertices, where m is the total number of edges after all insertions. These immediately provide the first incremental certifying algorithms for maintaining the dominator tree in O(mn) total time, and also imply incremental algorithms for other problems. Hence, we provide a substantial improvement over the O(m^2) straightforward algorithms, which recompute the solution from scratch after each edge insertion. Furthermore, we provide efficient implementations of our algorithms and conduct an extensive experimental study on real-world graphs taken from a variety of application areas. The experimental results show that our algorithms perform very well in practice

    Dynamic Dominators and Low-High Orders in DAGs

    Get PDF
    We consider practical algorithms for maintaining the dominator tree and a low-high order in directed acyclic graphs (DAGs) subject to dynamic operations. Let G be a directed graph with a distinguished start vertex s. The dominator tree D of G is a tree rooted at s, such that a vertex v is an ancestor of a vertex w if and only if all paths from s to w in G include v. The dominator tree is a central tool in program optimization and code generation, and has many applications in other diverse areas including constraint programming, circuit testing, biology, and in algorithms for graph connectivity problems. A low-high order of G is a preorder of D that certifies the correctness of D, and has further applications in connectivity and path-determination problems. We first provide a practical and carefully engineered version of a recent algorithm [ICALP 2017] for maintaining the dominator tree of a DAG through a sequence of edge deletions. The algorithm runs in O(mn) total time and O(m) space, where n is the number of vertices and m is the number of edges before any deletion. In addition, we present a new algorithm that maintains a low-high order of a DAG under edge deletions within the same bounds. Both results extend to the case of reducible graphs (a class that includes DAGs). Furthermore, we present a fully dynamic algorithm for maintaining the dominator tree of a DAG under an intermixed sequence of edge insertions and deletions. Although it does not maintain the O(mn) worst-case bound of the decremental algorithm, our experiments highlight that the fully dynamic algorithm performs very well in practice. Finally, we study the practical efficiency of all our algorithms by conducting an extensive experimental study on real-world and synthetic graphs

    Strong Connectivity in Directed Graphs under Failures, with Application

    Full text link
    In this paper, we investigate some basic connectivity problems in directed graphs (digraphs). Let GG be a digraph with mm edges and nn vertices, and let GeG\setminus e be the digraph obtained after deleting edge ee from GG. As a first result, we show how to compute in O(m+n)O(m+n) worst-case time: (i)(i) The total number of strongly connected components in GeG\setminus e, for all edges ee in GG. (ii)(ii) The size of the largest and of the smallest strongly connected components in GeG\setminus e, for all edges ee in GG. Let GG be strongly connected. We say that edge ee separates two vertices xx and yy, if xx and yy are no longer strongly connected in GeG\setminus e. As a second set of results, we show how to build in O(m+n)O(m+n) time O(n)O(n)-space data structures that can answer in optimal time the following basic connectivity queries on digraphs: (i)(i) Report in O(n)O(n) worst-case time all the strongly connected components of GeG\setminus e, for a query edge ee. (ii)(ii) Test whether an edge separates two query vertices in O(1)O(1) worst-case time. (iii)(iii) Report all edges that separate two query vertices in optimal worst-case time, i.e., in time O(k)O(k), where kk is the number of separating edges. (For k=0k=0, the time is O(1)O(1)). All of the above results extend to vertex failures. All our bounds are tight and are obtained with a common algorithmic framework, based on a novel compact representation of the decompositions induced by the 11-connectivity (i.e., 11-edge and 11-vertex) cuts in digraphs, which might be of independent interest. With the help of our data structures we can design efficient algorithms for several other connectivity problems on digraphs and we can also obtain in linear time a strongly connected spanning subgraph of GG with O(n)O(n) edges that maintains the 11-connectivity cuts of GG and the decompositions induced by those cuts.Comment: An extended abstract of this work appeared in the SODA 201

    Incremental 22-Edge-Connectivity in Directed Graphs

    Get PDF
    In this paper, we initiate the study of the dynamic maintenance of 22-edge-connectivity relationships in directed graphs. We present an algorithm that can update the 22-edge-connected blocks of a directed graph with nn vertices through a sequence of mm edge insertions in a total of O(mn)O(mn) time. After each insertion, we can answer the following queries in asymptotically optimal time: (i) Test in constant time if two query vertices vv and ww are 22-edge-connected. Moreover, if vv and ww are not 22-edge-connected, we can produce in constant time a "witness" of this property, by exhibiting an edge that is contained in all paths from vv to ww or in all paths from ww to vv. (ii) Report in O(n)O(n) time all the 22-edge-connected blocks of GG. To the best of our knowledge, this is the first dynamic algorithm for 22-connectivity problems on directed graphs, and it matches the best known bounds for simpler problems, such as incremental transitive closure.Comment: Full version of paper presented at ICALP 201

    Strong Connectivity in Directed Graphs under Failures, with Applications *

    Get PDF
    An extended abstract of this work appeared in the SODA '17: Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete AlgorithmsInternational audienceIn this paper, we investigate some basic connectivity problems in directed graphs (digraphs). Let G be a digraph with m edges and n vertices, and let G \ e (resp., G \ v) be the digraph obtained after deleting edge e (resp., vertex v) from G. As a first result, we show how to compute in O(m + n) worst-case time: • The total number of strongly connected components in G \ e (resp., G \ v), for all edges e (resp., for all vertices v) in G. • The size of the largest and of the smallest strongly connected components in G \ e (resp., G \ v), for all edges e (resp., for all vertices v) in G. Let G be strongly connected. We say that edge e (resp., vertex v) separates two vertices x and y, if x and y are no longer strongly connected in G \ e (resp., G \ v). As a second set of results, we show how to build in O(m + n) time O(n)-space data structures that can answer in optimal time the following basic connectivity queries on digraphs: • Report in O(n) worst-case time all the strongly connected components of G \ e (resp., G \ v), for a query edge e (resp., vertex v). • Test whether an edge or a vertex separates two query vertices in O(1) worst-case time. • Report all edges (resp., vertices) that separate two query vertices in optimal worst-case time, i.e., in time O(k), where k is the number of separating edges (resp., separating vertices). (For k = 0, the time is O(1)). All our bounds are tight and are obtained with a common algorithmic framework, based on a novel compact representation of the decompositions induced by the 1-connectivity (i.e., 1-edge and 1-vertex) cuts in digraphs, which might be of independent interest. With the help of our data structures we can design efficient algorithms for several other connectivity problems on digraphs and we can also obtain in linear time a strongly connected spanning subgraph of G with O(n) edges that maintains the 1-connectivity cuts of G and the decompositions induced by those cuts

    22-Fault-Tolerant Strong Connectivity Oracles

    Full text link
    We study the problem of efficiently answering strong connectivity queries under two vertex failures. Given a directed graph GG with nn vertices, we provide a data structure with O(nh)O(nh) space and O(h)O(h) query time, where hh is the height of a decomposition tree of GG into strongly connected subgraphs. This immediately implies data structures with O(nlogn)O(n \log{n}) space and O(logn)O(\log{n}) query time for graphs of constant treewidth, and O(n3/2)O(n^{3/2}) space and O(n)O(\sqrt{n}) query time for planar graphs. For general directed graphs, we give a refined version of our data structure that achieves O(nm)O(n\sqrt{m}) space and O(m)O(\sqrt{m}) query time, where mm is the number of edges of the graph. We also provide some simple BFS-based heuristics that seem to work remarkably well in practice. In the experimental part, we first evaluate various methods to construct a decomposition tree with small height hh in practice. Then we provide efficient implementations of our data structures, and evaluate their empirical performance by conducting an extensive experimental study on graphs taken from real-world applications.Comment: Conference version to appear in the proceedings of ALENEX 202

    Polylogarithmic Approximation Algorithm for k-Connected Directed Steiner Tree on Quasi-Bipartite Graphs

    Get PDF
    In the k-Connected Directed Steiner Tree problem (k-DST), we are given a directed graph G = (V,E) with edge (or vertex) costs, a root vertex r, a set of q terminals T, and a connectivity requirement k > 0; the goal is to find a minimum-cost subgraph H of G such that H has k edge-disjoint paths from the root r to each terminal in T. The k-DST problem is a natural generalization of the classical Directed Steiner Tree problem (DST) in the fault-tolerant setting in which the solution subgraph is required to have an r,t-path, for every terminal t, even after removing k-1 vertices or edges. Despite being a classical problem, there are not many positive results on the problem, especially for the case k ? 3. In this paper, we present an O(log k log q)-approximation algorithm for k-DST when an input graph is quasi-bipartite, i.e., when there is no edge joining two non-terminal vertices. To the best of our knowledge, our algorithm is the only known non-trivial approximation algorithm for k-DST, for k ? 3, that runs in polynomial-time Our algorithm is tight for every constant k, due to the hardness result inherited from the Set Cover problem

    27th Annual European Symposium on Algorithms: ESA 2019, September 9-11, 2019, Munich/Garching, Germany

    Get PDF
    corecore