A Formal Analysis of Capacity Scaling Algorithms for Minimum-Cost Flows
Mohammad Abdulaziz, Thomas Ammer
TL;DR
This work delivers a comprehensive formalisation of minimum-cost flow algorithms in Isabelle/HOL, delivering executable implementations and rigorous proofs for SSP, capacity scaling, and Orlin's algorithm. It introduces a principled ADT/locale framework that supports stepwise refinement and code extraction, incorporating a Bellman-Ford-based path search and a reduction to infinite-capacity instances to handle general flow problems. A key contribution is the first complete combinatorial correctness proof for Orlin's algorithm, along with detailed running-time analyses and a cohesive methodology that harmonises mathematical rigor with executable artefacts. The results advance the reliability of scaling-based flow algorithms for both theory and practice, enabling verified, reusable graph algorithm components and clarifying the boundaries of applicability via the finite/infinite capacity reductions.
Abstract
We present formalisations of the correctness of executable algorithms to solve minimum-cost flow problems in Isabelle/HOL. Two of the algorithms are based on the technique of scaling, most notably Orlin's algorithm, which has the fastest known running time for solving the problem of minimum-cost flow. We also include a formalisation of the worst-case running time argument for Orlin's algorithm. Our verified implementation of this algorithm, which is derived by the technique of stepwise refinement, is fully executable and was integrated into a reusable formal library on graph algorithms. Because the problems for which Orlin's algorithm works are restricted, we also verified an executable reduction from the general minimum-cost flow problem. We believe we are the first to formally consider the problem of minimum-cost flows and, more generally, any scaling algorithms. Our work has also led to a number of mathematical insights and improvements to proofs as well as theorem statements, compared to all existing expositions.
