Document Open Access Logo

Fast Reachability Using DAG Decomposition

Authors Giorgos Kritikakis , Ioannis G. Tollis

Thumbnail PDF


  • Filesize: 0.89 MB
  • 17 pages

Document Identifiers

Author Details

Giorgos Kritikakis
  • Univeristy of Crete, Heraklion, Greece
Ioannis G. Tollis
  • Univeristy of Crete, Heraklion, Greece

Cite AsGet BibTex

Giorgos Kritikakis and Ioannis G. Tollis. Fast Reachability Using DAG Decomposition. In 21st International Symposium on Experimental Algorithms (SEA 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 265, pp. 2:1-2:17, Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2023)


We present a fast and practical algorithm to compute the transitive closure (TC) of a directed graph. It is based on computing a reachability indexing scheme of a directed acyclic graph (DAG), G = (V, E). Given any path/chain decomposition of G we show how to compute in parameterized linear time such a reachability scheme that can answer reachability queries in constant time. The experimental results reveal that our method is significantly faster in practice than the theoretical bounds imply, indicating that path/chain decomposition algorithms can be applied to obtain fast and practical solutions to the transitive closure (TC) problem. Furthermore, we show that the number of non-transitive edges of a DAG G is ≤ width*|V| and that we can find a substantially large subset of the transitive edges of G in linear time using a path/chain decomposition. Our extensive experimental results show the interplay between these concepts in various models of DAGs.

Subject Classification

ACM Subject Classification
  • Theory of computation → Theory and algorithms for application domains
  • Theory of computation → Design and analysis of algorithms
  • graph algorithms
  • hierarchy
  • directed acyclic graphs (DAG)
  • path/chain decomposition
  • transitive closure
  • transitive reduction
  • reachability
  • reachability indexing scheme


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Rakesh Agrawal, Alexander Borgida, and Hosagrahar Visvesvaraya Jagadish. Efficient management of transitive relationships in large data and knowledge bases. ACM SIGMOD Record, 18(2):253-262, 1989. Google Scholar
  2. Josh Alman and Virginia Vassilevska Williams. A refined laser method and faster matrix multiplication. In Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 522-539. SIAM, 2021. Google Scholar
  3. Albert-László Barabási and Réka Albert. Emergence of scaling in random networks. science, 286(5439):509-512, 1999. Google Scholar
  4. Manuel Cáceres, Massimo Cairo, Brendan Mumey, Romeo Rizzi, and Alexandru I Tomescu. A linear-time parameterized algorithm for computing the width of a dag. In International Workshop on Graph-Theoretic Concepts in Computer Science, pages 257-269. Springer, 2021. Google Scholar
  5. Manuel Cáceres, Massimo Cairo, Brendan Mumey, Romeo Rizzi, and Alexandru I Tomescu. Sparsifying, shrinking and splicing for minimum path cover in parameterized linear time. In Proceedings of the 2022 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 359-376. SIAM, 2022. Google Scholar
  6. Li Chen, Amarnath Gupta, and M Erdem Kurul. Stack-based algorithms for pattern matching on dags. In Proceedings of the 31st international conference on Very large data bases, pages 493-504. Citeseer, 2005. Google Scholar
  7. Yangjun Chen and Yibin Chen. On the dag decomposition. British Journal of Mathematics and Computer Science, 2014. 10(6): 1-27, 2015, Article no.BJMCS.19380, ISSN: 2231-0851. URL:
  8. R. P. DILWORTH. A decomposition theorem for partially ordered sets. Ann. Math., 52:161-166, 1950. Google Scholar
  9. Fulkerson DR. Note on dilworth’s embedding theorem for partially ordered sets. Proc. Amer. Math. Soc., 52(7):701-702, 1956. Google Scholar
  10. Ran Duan, Hongxun Wu, and Renfei Zhou. Faster matrix multiplication via asymmetric hashing, 2023. URL:
  11. P Erdös and A Rényi. On random graphs I. Publicationes Mathematicae Debrecen, 1959. Google Scholar
  12. Robert W Floyd. Algorithm 97: shortest path. Communications of the ACM, 5(6):345, 1962. Google Scholar
  13. Alla Goralčíková and Václav Koubek. A reduct-and-closure algorithm for graphs. In International Symposium on Mathematical Foundations of Computer Science, pages 301-307. Springer, 1979. Google Scholar
  14. Aric Hagberg, Pieter Swart, and Daniel S Chult. Exploring network structure, dynamics, and function using networkx. Technical report, Los Alamos National Lab.(LANL), Los Alamos, NM (United States), 2008. Google Scholar
  15. Kathrin Hanauer, Monika Henzinger, and Christian Schulz. Faster fully dynamic transitive closure in practice. CoRR, abs/2002.00813, 2020. URL:
  16. H. V. Jagadish. A compression technique to materialize transitive closure. ACM Trans. Database Syst., 15(4):558-598, December 1990. URL:
  17. Ruoming Jin, Yang Xiang, Ning Ruan, and Haixun Wang. Efficiently answering reachability queries on very large directed graphs. In Proceedings of the 2008 ACM SIGMOD international conference on Management of data, pages 595-608, 2008. Google Scholar
  18. Shimon Kogan and Merav Parter. Beating matrix multiplication for n^1/3-directed shortcuts. In 49th International Colloquium on Automata, Languages, and Programming (ICALP 2022). Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2022. Google Scholar
  19. Giorgos Kritikakis and Ioannis G Tollis. Fast and practical dag decomposition with reachability applications. arXiv e-prints, 2022. URL:
  20. Panagiotis Lionakis, Giacomo Ortali, and Ioannis Tollis. Adventures in abstraction: Reachability in hierarchical drawings. In Graph Drawing and Network Visualization: 27th International Symposium, GD 2019, Prague, Czech Republic, September 17-20, 2019, Proceedings, pages 593-595, 2019. Google Scholar
  21. Panagiotis Lionakis, Giacomo Ortali, and Ioannis G Tollis. Constant-time reachability in dags using multidimensional dominance drawings. SN Computer Science, 2(4):1-14, 2021. Google Scholar
  22. Veli Mäkinen, Alexandru I Tomescu, Anna Kuosmanen, Topi Paavilainen, Travis Gagie, and Rayan Chikhi. Sparse dynamic programming on dags with small width. ACM Transactions on Algorithms (TALG), 15(2):1-21, 2019. Google Scholar
  23. K. SIMON. An improved algorithm for transitive closure on acyclic digraphs. Theor. Comput. Sci., 58(1-3):325-346, 1988. Google Scholar
  24. Volker Strassen et al. Gaussian elimination is not optimal. Numerische mathematik, 13(4):354-356, 1969. Google Scholar
  25. Silke Trißl and Ulf Leser. Fast and practical indexing and querying of very large graphs. In Proceedings of the 2007 ACM SIGMOD international conference on Management of data, pages 845-856, 2007. Google Scholar
  26. Jan Van Den Brand, Yin Tat Lee, Yang P Liu, Thatchaphol Saranurak, Aaron Sidford, Zhao Song, and Di Wang. Minimum cost flows, mdps, and ℓ1-regression in nearly linear time for dense instances. In Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing, pages 859-869, 2021. Google Scholar
  27. Haixun Wang, Hao He, Jun Yang, Philip S Yu, and Jeffrey Xu Yu. Dual labeling: Answering graph reachability queries in constant time. In 22nd International Conference on Data Engineering (ICDE'06), pages 75-75. IEEE, 2006. Google Scholar
  28. Duncan J Watts and Steven H Strogatz. Collective dynamics of ’small-world' networks. nature, 393(6684):440-442, 1998. Google Scholar
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail