Minimum Chain Cover in Almost Linear Time

Author Manuel Cáceres

Thumbnail PDF


  • Filesize: 0.74 MB
  • 12 pages

Document Identifiers

Author Details

Manuel Cáceres
  • Department of Computer Science, University of Helsinki, Finland


I am very grateful to Alexandru I. Tomescu and Brendan Mumey for initial discussions on flow decomposition of a minimum flow representing an MPC. I am also very grateful to the anonymous reviewers for their useful suggestions.

Cite AsGet BibTex

Manuel Cáceres. Minimum Chain Cover in Almost Linear Time. In 50th International Colloquium on Automata, Languages, and Programming (ICALP 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 261, pp. 31:1-31:12, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2023)


A minimum chain cover (MCC) of a k-width directed acyclic graph (DAG) G = (V, E) is a set of k chains (paths in the transitive closure) of G such that every vertex appears in at least one chain in the cover. The state-of-the-art solutions for MCC run in time Õ(k(|V|+|E|)) [Mäkinen et at., TALG], O(T_{MF}(|E|) + k|V|), O(k²|V| + |E|) [Cáceres et al., SODA 2022], Õ(|V|^{3/2} + |E|) [Kogan and Parter, ICALP 2022] and Õ(T_{MCF}(|E|) + √k|V|) [Kogan and Parter, SODA 2023], where T_{MF}(|E|) and T_{MCF}(|E|) are the running times for solving maximum flow (MF) and minimum-cost flow (MCF), respectively. In this work we present an algorithm running in time O(T_{MF}(|E|) + (|V|+|E|)log k). By considering the recent result for solving MF [Chen et al., FOCS 2022] our algorithm is the first running in almost linear time. Moreover, our techniques are deterministic and derive a deterministic near-linear time algorithm for MCC if the same is provided for MF. At the core of our solution we use a modified version of the mergeable dictionaries [Farach and Thorup, Algorithmica], [Iacono and Özkan, ICALP 2010] data structure boosted with the SIZE-SPLIT operation and answering queries in amortized logarithmic time, which can be of independent interest.

Subject Classification

ACM Subject Classification
  • Theory of computation → Graph algorithms analysis
  • Theory of computation → Network flows
  • Theory of computation → Sorting and searching
  • Minimum chain cover
  • directed acyclic graph
  • minimum flow
  • flow decomposition
  • mergeable dictionaries
  • amortized running time


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


  1. Amitabha Bagchi, Adam L Buchsbaum, and Michael T Goodrich. Biased skip lists. Algorithmica, 42:31-48, 2005. Google Scholar
  2. Jørgen Bang-Jensen and Gregory Z Gutin. Digraphs: theory, algorithms and applications. Springer Science & Business Media, 2008. Google Scholar
  3. Philip Bille, Mikko Berggren Ettienne, Travis Gagie, Inge Li Gørtz, and Nicola Prezza. Decompressing Lempel-Ziv compressed text. In Proceedings of the 30th Data Compression Conference (DCC 2020), pages 143-152. IEEE, 2020. Google Scholar
  4. Manuel Cáceres, Massimo Cairo, Andreas Grigorjew, Shahbaz Khan, Brendan Mumey, Romeo Rizzi, Alexandru I Tomescu, and Lucia Williams. Width helps and hinders splitting flows. In Proceedings of the 30th Annual European Symposium on Algorithms (ESA 2022), pages 31:1-31:14, 2022. Google Scholar
  5. 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 Proceedings of the 47th International Workshop on Graph-Theoretic Concepts in Computer Science (WG 2021), pages 257-269. Springer, 2021. Google Scholar
  6. 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 33rd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2022), pages 359-376. SIAM, 2022. Google Scholar
  7. Manuel Cáceres, Brendan Mumey, Edin Husić, Romeo Rizzi, Massimo Cairo, Kristoffer Sahlin, and Alexandru I Tomescu. Safety in multi-assembly via paths appearing in all path covers of a DAG. IEEE/ACM Transactions on Computational Biology and Bioinformatics, 19(6):3673-3684, 2021. Google Scholar
  8. Ghanshyam Chandra and Chirag Jain. Sequence to graph alignment using gap-sensitive co-linear chaining. In Proceedings of the 27th Annual International Conference on Research in Computational Molecular Biology (RECOMB 2023), pages 58-73. Springer, 2023. Google Scholar
  9. Li Chen, Rasmus Kyng, Yang P Liu, Richard Peng, Maximilian Probst Gutenberg, and Sushant Sachdeva. Maximum flow and minimum-cost flow in almost-linear time. In Proceedings of the 63rd IEEE Annual Symposium on Foundations of Computer Science (FOCS 2022), pages 612-623. IEEE, 2022. Google Scholar
  10. Yangjun Chen and Yibin Chen. An efficient algorithm for answering graph reachability queries. In Proceedings of the 24th International Conference on Data Engineering (ICDE 2008), pages 893-902. IEEE, 2008. Google Scholar
  11. Yangjun Chen and Yibin Chen. On the graph decomposition. In Proceedings of the 4th IEEE Fourth International Conference on Big Data and Cloud Computing (BDCloud 2014), pages 777-784. IEEE, 2014. Google Scholar
  12. Eleonor Ciurea and Laura Ciupala. Sequential and parallel algorithms for minimum flows. Journal of Applied Mathematics and Computing, 15(1):53-75, 2004. Google Scholar
  13. Nicola Cotumaccio and Nicola Prezza. On indexing and compressing finite automata. In Proceedings of the 32nd ACM-SIAM Symposium on Discrete Algorithms (SODA 2021), pages 2585-2599. SIAM, 2021. Google Scholar
  14. Rene De La Briandais. File searching using variable length keys. In Papers presented at the the March 3-5, 1959, western joint computer conference, pages 295-298, 1959. Google Scholar
  15. Robert P Dilworth. A decomposition theorem for partially ordered sets. Annals of Mathematics, 51(1):161-166, 1950. Google Scholar
  16. Martin Farach and Mikkel Thorup. String matching in Lempel—Ziv compressed strings. Algorithmica, 20(4):388-404, 1998. Google Scholar
  17. Stefan Felsner, Vijay Raghavan, and Jeremy Spinrad. Recognition algorithms for orders of small width and graphs of small Dilworth number. Order, 20(4):351-364, 2003. Google Scholar
  18. Delbert R Fulkerson. Note on Dilworth’s decomposition theorem for partially ordered sets. Proceedings of the American Mathematical Society, 7(4):701-702, 1956. Google Scholar
  19. Loukas Georgiadis, Haim Kaplan, Nira Shafrir, Robert E Tarjan, and Renato F Werneck. Data structures for mergeable trees. ACM Transactions on Algorithms, 7(2):1-30, 2011. Google Scholar
  20. Leo J Guibas and Robert Sedgewick. A dichromatic framework for balanced trees. In Proceedings of the 19th Annual Symposium on Foundations of Computer Science (FOCS 1978), pages 8-21. IEEE, 1978. Google Scholar
  21. John E Hopcroft and Richard M Karp. An n^5/2 algorithm for maximum matchings in bipartite graphs. SIAM Journal on Computing, 2(4):225-231, 1973. Google Scholar
  22. John Iacono and Özgür Özkan. Mergeable dictionaries. In Proceedings of the 37th International Colloquium on Automata, Languages, and Programming (ICALP 2010), pages 164-175. Springer, 2010. Google Scholar
  23. Arthur B Kahn. Topological sorting of large networks. Communications of the ACM, 5(11):558-562, 1962. Google Scholar
  24. Adam Karczmarz. A simple mergeable dictionary. In Proceedings of the 15th Scandinavian Symposium and Workshops on Algorithm Theory (SWAT 2016), pages 7:1-7:13, 2016. Google Scholar
  25. Donald E Knuth. The art of computer programming: Volume 3: Sorting and Searching. Addison-Wesley Professional, 1998. Google Scholar
  26. Shimon Kogan and Merav Parter. Beating matrix multiplication for n^1/3-directed shortcuts. In Proceedings of the 49th International Colloquium on Automata, Languages, and Programming (ICALP 2022). Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2022. Full version available at URL:
  27. Shimon Kogan and Merav Parter. Faster and unified algorithms for diameter reducing shortcuts and minimum chain covers. In Proceedings of the 34th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2023), pages 212-239. SIAM, 2023. Google Scholar
  28. Katherine Jane Lai. Complexity of union-split-find problems. Master’s thesis, Massachusetts Institute of Technology, 2008. Google Scholar
  29. 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, 15(2):1-21, 2019. Google Scholar
  30. Simeon C Ntafos and S Louis Hakimi. On path cover problems in digraphs and applications to program testing. IEEE Transactions on Software Engineering, 5(5):520-529, 1979. Google Scholar
  31. Simon J Puglisi and Massimiliano Rossi. On Lempel-Ziv decompression in small space. In Proceedings of the 29th Data Compression Conference (DCC 2019), pages 221-230. IEEE, 2019. Google Scholar
  32. Nicola Rizzo, Manuel Caceres, and Veli Mäkinen. Chaining of maximal exact matches in graphs. arXiv preprint, 2023. URL:
  33. Robert E Tarjan. Edge-disjoint spanning trees and depth-first search. Acta Informatica, 6(2):171-185, 1976. Google Scholar
  34. Cole Trapnell, Brian A Williams, Geo Pertea, Ali Mortazavi, Gordon Kwan, Marijke J Van Baren, Steven L Salzberg, Barbara J Wold, and Lior Pachter. Transcript assembly and quantification by RNA-Seq reveals unannotated transcripts and isoform switching during cell differentiation. Nature Biotechnology, 28(5):511, 2010. Google Scholar
  35. Jan van den Brand, Yin Tat Lee, Yang P Liu, Thatchaphol Saranurak, Aaron Sidford, Zhao Song, and Di Wang. Minimum cost flows, MDPs, and 𝓁₁-regression in nearly linear time for dense instances. In Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing (STOC 2021), pages 859-869, 2021. Google Scholar