Introduction
The max-flow min-cut theorem is a cornerstone of combinatorial optimization, providing a powerful framework for modeling a wide range of problems. While algorithms like Dinic’s are standard for computing maximum flows, their time complexity—often bounded by $$$\operatorname{O}({|V|}^2|E|)$$$ or $$$\operatorname{O}(|E|\sqrt{|E|})$$$ can become prohibitive for large-scale or specially structured graphs.
This article explores an alternative strategy: instead of applying a generic flow algorithm, we directly analyze the min-cut formulation. The min-cut problem seeks the minimum total capacity of edges whose removal disconnects the source $$$s$$$ from the sink $$$t$$$. Formally, this is expressed as:
By reformulating this combinatorial problem as a mathematical optimization task, we can often exploit the specific structure of the graph to derive highly efficient, custom-tailored solutions. This approach transforms a graph algorithm problem into a mathematical one, which can be significantly faster for certain problem classes.
Examples
ABC332G
At first I'd like to say ABC332G is the task that made me think if I can solve mincut problems in this way.
In the task we make a graph for example $$$1$$$ like this,and similar for others:

we are tasked with a distribution problem that can be modeled as a min-cut. The constraints are too large for a direct application of Dinic’s algorithm, necessitating a more analytical approach.So we try to use maths and get($$$SETA$$$ for the nodes that represents balls and $$$SETB$$$ for boxes,$$$u_i$$$ as node for $$$i$$$-th colour,$$$v_i$$$ for $$$i$$$-th box):
&= \min_k\{\min_{P,\sum_{u_i \in P} i = k}\{\sum_{u_i\in\complement_{V}P \cup SETA}A_i\} + sum_j \min\{B_j,k \cdot j\}\}\\ \end{aligned} $$$
As
can be calculated using prefix sum,and
can be calculated using dynamic planning,so the task is then solved in $$$\operatorname{O}(n^3 + m)$$$.
2.ARC125E
For ARC125E,the graph is constructed like this:

and found the task presents another scenario where a direct max-flow computation is infeasible due to large values of $$$N,M,A_i,B_i,C_i$$$, which we has to calculate the mincut:
&= \min_k\{\min_{P,\sum_{u_i \in P} B_i = k}\{\sum_{u_i\in\complement_{V}P \cup SETA}C_i\} + sum_j \min\{A_j,k\}\}\\ \end{aligned} $$$
There,
can be deem as an convex function that can be calculated using prefix sums and binary search in $$$\operatorname{O}(n) - \operatorname{O}(\log n)$$$,and
is an lower convex function. And for
,it's proven that we can just calculate
just on the turning point of the low convex by adjustment.
At last,the convex can be found by sorting the children in a non-decreasing order of $$$\frac{C_i}{B_i}$$$ and adding up the children one by one and solve the task in $$$\operatorname{O}(n\log n)$$$.
CF903G
In 903G - Yet Another Maxflow Problem, we are asked to compute a max-flow value in a dynamic graph. Again, a direct flow algorithm is too slow, but the min-cut formulation reveals a tractable mathematical structure:
The $$$j$$$ for getting the $$$\min{B_j + \sum_{x_k \le i,y_k \ge j}z_k}$$$ of each $$$i$$$ is non-decreasing,making it solvable using divide and consequer in $$$\operatorname{O}(n\log^2n)$$$,then for furthur things,we use segment tree and solve it easily.
At last
- Author:OtterZ










Auto comment: topic has been updated by OtterZ (previous revision, new revision, compare).
Could anyone put this blog into catalog?