The Gomory-Hu tree, or a cut tree, is a classic data structure that stores minimum $s$-$t$ cuts of an undirected weighted graph for all pairs of nodes $(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,v_1,\ldots,v_\ell$, its goal is to compute minimum $\{s,v_1,\ldots,v_{i-1}\}$-$v_i$ cuts for all $i\in[\ell]$. We show that the cut tree can be computed by $\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)$ 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.
翻译:Gomory-Hu树(或称割树)是一种经典数据结构,用于存储无向加权图中所有节点对$(s,t)$的最小$s$-$t$割。本文提出一种基于归约至{\tt OrderedCuts}问题的割树计算新方法。给定节点序列$s,v_1,\ldots,v_\ell$,该方法旨在计算所有$i\in[\ell]$对应的最小$\{s,v_1,\ldots,v_{i-1}\}$-$v_i$割。我们证明通过$\tilde O(1)$次{\tt OrderedCuts}调用即可计算割树。同时针对{\tt OrderedCuts}问题建立了若干具有独立价值的新结论:首先,我们证明所有$\ell$个割可以紧凑地存储于称为{\em {\tt OC}树}的数据结构中,其空间复杂度为$O(n)$;其次,我们提出了支持分治算法计算OC树的理论结果;最后,我们描述了基于{\tt OrderedCuts}的实用实现,并通过实验与两种经典Gomory-Hu树算法的现有实现及我们自行实现的算法进行对比。实验结果表明基于{\tt OrderedCuts}的方法具有最优鲁棒性:在多数问题族上其性能超越其他算法1-2个数量级,且从未出现显著性能下降。我们的实现已公开于https://pub.ist.ac.at/~vnk/software.html。