A Fast Max Flow Algorithm

James B. Orlin, Xiao-Yue GongarXiv 2019

Authors: James B. Orlin and Xiao-Yue Gong (MIT)

Abstract

In 2013, Orlin proved that the max flow problem could be solved in $O(nm)$ time. His algorithm ran in $O(nm + m^{1.94})$ time, which was the fastest for graphs with fewer than $n^{1.06}$ arcs. If the graph was not sufficiently sparse, the fastest running time was an algorithm due to King, Rao, and Tarjan. We describe a new variant of the excess scaling algorithm for the max flow problem whose running time strictly dominates the running time of the algorithm by King et al. Moreover, for graphs in which $m = O(n \log n)$, the running time of our algorithm dominates that of King et al. by a factor of $O(\log\log n)$.

Introduction

The Maximum Flow problem is a cornerstone of computer science and operations research: given a directed graph where each edge has a capacity, what is the maximum amount of "flow" that can be sent from a source node to a sink node? While this problem has been studied since the 1950s, researchers continue to seek the "ultimate" algorithm that provides optimal efficiency across all graph densities.

In 2013, James Orlin established an $O(nm)$ bound, which is exceptionally fast for sparse graphs (where the number of arcs $m$ is close to the number of nodes $n$). However, for denser graphs, the state-of-the-art deterministic algorithm remained a 1994 contribution by King, Rao, and Tarjan. This research closes that gap, introducing a deterministic algorithm that sets a new speed record for a wide range of network types.

Methodology

The algorithm builds upon the Excess Scaling paradigm. Unlike standard algorithms that maintain a "legal" flow throughout, scaling algorithms allow nodes to have an "excess" (inflow exceeding outflow). This excess is systematically pushed toward the sink or back to the source across multiple scaling phases. The authors introduce several key innovations to refine this process:

1. Large-Medium Excess-Scaling (LMES)

The authors first propose LMES, a simplified version of previous "stack-scaling" algorithms. It categorizes nodes based on their excess levels (Large vs. Medium) to prioritize which nodes are processed, ensuring that flow is moved efficiently without redundant computations.

2. The Buffer Strategy and Negative Excess

In traditional scaling algorithms, excesses must remain non-negative to ensure convergence. A primary breakthrough in this paper is the Enhanced LMES, which allows for negative excesses. By permitting "special" nodes to have a buffered negative excess, the algorithm avoids "useless" scaling phases that consume computation time without significantly moving flow.

3. The Flow-Return Forest (FRF)

To manage these negative excesses, the authors designed the Flow-Return Forest. When a node's excess drops below a certain threshold, it is added to the FRF. This data structure ensures that flow is eventually returned to these nodes in a controlled manner without violating the algorithm's internal distance labels (the map of node distances to the sink).

4. Arc Contraction

Following a technique pioneered by Tardos, the algorithm identifies "abundant" arcs—those with such high capacity that they are guaranteed not to be bottlenecks. The algorithm contracts cycles of these arcs into single nodes, simplifying the graph and reducing the complexity of subsequent phases.

Key Insights

  • Density-Adaptive Scaling: The algorithm utilizes a parameter $k$ that is tuned based on the graph's density. By setting $k = \frac{\log n}{\log \log n + m/n}$, the algorithm balances the computational cost of updating node distances against the cost of pushing flow.
  • Algorithmic Simplicity: Many high-speed max flow algorithms rely on "dynamic trees," a notoriously complex data structure. The authors achieve their speedup without dynamic trees, making the algorithm theoretically more straightforward while maintaining high performance.

Results and Complexity

The algorithm achieves a running time of $O\left(\frac{nm \log n}{\log \log n + \log (m/n)}\right)$.

As a theoretical contribution to computational complexity, the paper's results are proven mathematically rather than through empirical benchmarks. The findings demonstrate that for all values of $n$ and $m$, this algorithm's running time strictly dominates the 1994 King et al. algorithm. Specifically, when $m \le n \log n$, the new algorithm provides a speedup of $O(\log \log n)$. While $\log \log n$ is a slow-growing function, in the context of theoretical complexity, it represents a significant mathematical advancement in a well-studied field.

Conclusion

This research provides a new benchmark for deterministic max flow algorithms. While the authors avoided dynamic trees to maintain simplicity, they suggest that incorporating such structures might lead to even faster running times in the future. Furthermore, the flow-return forest is presented as a versatile tool that may be applicable to other network optimization challenges, such as the minimum cost flow problem.

Summary updated

BibTeX
@misc{orlin2019fast,
  author = {James B. Orlin and Xiao-Yue Gong},
  title = {{A Fast Max Flow Algorithm}},
  year = {2019},
  eprint = {1910.04848},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.04848},
}
Figure