English

OrderedCuts: A new approach for computing Gomory-Hu tree

Data Structures and Algorithms 2026-02-25 v3

Abstract

The Gomory-Hu tree, or a cut tree, is a classic data structure that stores minimum ss-tt cuts of an undirected weighted graph for all pairs of nodes (s,t)(s,t). We propose a new approach for computing the cut tree based on a reduction to the problem that we call {\tt OrderedCuts}. Given a sequence of nodes s,v1,,vs,v_1,\ldots,v_\ell, its goal is to compute minimum {s,v1,,vi1}\{s,v_1,\ldots,v_{i-1}\}-viv_i cuts for all i[]i\in[\ell]. We show that the cut tree can be computed by O~(1)\tilde O(1) calls to {\tt OrderedCuts}. We also establish new results for {\tt OrderedCuts} that may be of independent interest. First, we prove that all \ell cuts can be stored compactly with O(n)O(n) space in a data structure that we call an {\em {\tt OC} tree}. Second, we prove results that allow divide-and-conquer algorithms for computing OC tree. Finally, we describe a practical implementation based on {\tt OrderedCuts}, and compare it experimentally with two existing implementations of the classical Gomory-Hu tree algorithm as well as with our implementations. The results suggest that the {\tt OrderedCuts}-based approach is the most robust: on many family of problems it outperforms other algorithms by 1-2 orders of magnitude, and is never slower by more than a small factor. Our implementation is publicly available at https://pub.ist.ac.at/~vnk/software.html.

Keywords

Cite

@article{arxiv.2208.02000,
  title  = {OrderedCuts: A new approach for computing Gomory-Hu tree},
  author = {Vladimir Kolmogorov},
  journal= {arXiv preprint arXiv:2208.02000},
  year   = {2026}
}
R2 v1 2026-06-25T01:26:39.519Z