Maximum flow and the minimum cut
Find out how much a network can really carry in Year 12 General Mathematics for Queensland (QCAA). When tens of thousands of fans leave a game at Suncorp Stadium, or a council plans new water mains for a growing suburb, the question is the same: what is the most that can get through, and which links are holding it back?
You will list every cut of a small flow network, find the minimum cut and use it to state the maximum flow, since the two are always equal. You will then test upgrades, check whether a network meets a demand and work out how long a job takes, before moving on to allocation problems and bipartite graphs.
Theory
How much can a network really carry? This Year 12 General Mathematics guide for Queensland students shows how to find the maximum flow from source to sink by listing every cut and choosing the minimum cut, explains why the two are equal, and applies the idea to upgrades, bottlenecks and how long it takes to move a crowd or a volume of water.
In a flow network, a flow sends an amount along each edge from the source \(S\) to the sink \(T\). It must never be more than an edge’s capacity, and at every vertex other than \(S\) and \(T\) the amount coming in equals the amount going out. The maximum flow is the largest total that can travel from \(S\) to \(T\) at once.
A cut splits the vertices into a source side (with \(S\)) and a sink side (with \(T\)). Its capacity is the total of the edges pointing from the source side to the sink side. The minimum cut is the cut with the smallest capacity of all the cuts of the network.
Every unit of flow has to cross every cut, so the flow can never beat the smallest cut. The maximum-flow minimum-cut theorem says the smallest cut is always reached: the maximum flow is exactly equal to the capacity of the minimum cut.
The maximum-flow minimum-cut theorem:
Capacity of one cut (forward edges only):
Number of cuts when there are \(k\) vertices other than \(S\) and \(T\) (each one goes on the source side or the sink side):
Time to move a total amount at the maximum flow:
How to find the maximum flow
- List every source side. Start with \(\{S\}\), then add the other vertices (not \(T\)) in every possible combination: \(2^k\) cuts in all.
- For each cut, list the forward edges (from the source side to the sink side) and add their capacities. Leave out any edge that points back.
- Find the smallest capacity. That cut is the minimum cut.
- State the maximum flow: it equals the capacity of the minimum cut, with units.
When a capacity changes
- Changing an edge that is not in the minimum cut cannot raise the maximum flow.
- Raising an edge in the minimum cut raises that cut, but another cut may now be the smallest. Recalculate every cut that uses the edge and compare with the rest.
There are two vertices besides \(S\) and \(T\), so there are \(2^2 = 4\) cuts. List them all.
| Source side | Edges counted (source side to sink side) | Capacity (L/s) |
|---|---|---|
| \(\{S\}\) | \(S\to A, S\to B\) | \(9 + 13 = 22\) |
| \(\{S, A\}\) | \(S\to B, A\to B, A\to T\) | \(13 + 4 + 11 = 28\) |
| \(\{S, B\}\) | \(S\to A, B\to T\) | \(9 + 6 = 15\) |
| \(\{S, A, B\}\) | \(A\to T, B\to T\) | \(11 + 6 = 17\) |
The minimum cut is \(\{S, B\}\) with capacity \(9 + 6 = 15\). For this cut, \(A\to B\) points from the sink side back to the source side, so it is not counted. The maximum flow is 15 L/s.
Three vertices besides \(S\) and \(T\) give \(2^3 = 8\) cuts. Check the direction of every edge that crosses.
| Source side | Edges counted (source side to sink side) | Capacity (hundreds of vehicles/h) |
|---|---|---|
| \(\{S\}\) | \(S\to A, S\to B\) | \(13 + 11 = 24\) |
| \(\{S, A\}\) | \(S\to B, A\to B, A\to C\) | \(11 + 8 + 9 = 28\) |
| \(\{S, B\}\) | \(S\to A, B\to T\) | \(13 + 10 = 23\) |
| \(\{S, C\}\) | \(S\to A, S\to B, C\to B, C\to T\) | \(13 + 11 + 6 + 12 = 42\) |
| \(\{S, A, B\}\) | \(A\to C, B\to T\) | \(9 + 10 = 19\) |
| \(\{S, A, C\}\) | \(S\to B, A\to B, C\to B, C\to T\) | \(11 + 8 + 6 + 12 = 37\) |
| \(\{S, B, C\}\) | \(S\to A, C\to T, B\to T\) | \(13 + 12 + 10 = 35\) |
| \(\{S, A, B, C\}\) | \(C\to T, B\to T\) | \(12 + 10 = 22\) |
The smallest capacity is \(19\), for the source side \(\{S, A, B\}\). Its forward roads are \(A\to C\) and \(B\to T\). The road \(C\to B\) crosses this cut backwards, so it is left out. The maximum flow is 19 hundred vehicles per hour (1900 vehicles per hour).
(i) List the eight cuts.
| Source side | Edges counted (source side to sink side) | Capacity (ML/day) |
|---|---|---|
| \(\{S\}\) | \(S\to A, S\to B\) | \(15 + 8 = 23\) |
| \(\{S, A\}\) | \(S\to B, A\to C\) | \(8 + 8 = 16\) |
| \(\{S, B\}\) | \(S\to A, B\to A, B\to C, B\to T\) | \(15 + 14 + 8 + 12 = 49\) |
| \(\{S, C\}\) | \(S\to A, S\to B, C\to T\) | \(15 + 8 + 10 = 33\) |
| \(\{S, A, B\}\) | \(A\to C, B\to C, B\to T\) | \(8 + 8 + 12 = 28\) |
| \(\{S, A, C\}\) | \(S\to B, C\to T\) | \(8 + 10 = 18\) |
| \(\{S, B, C\}\) | \(S\to A, B\to A, B\to T, C\to T\) | \(15 + 14 + 12 + 10 = 51\) |
| \(\{S, A, B, C\}\) | \(B\to T, C\to T\) | \(12 + 10 = 22\) |
(i) The minimum cut is \(\{S, A\}\): \(8 + 8 = 16\). (\(B\to A\) points back and is not counted.) The maximum flow is 16 ML/day.
(ii) Only the cuts that count \(A\to C\) go up by \(6\). Recalculate the table:
| Source side | Edges counted (source side to sink side) | Capacity (ML/day) |
|---|---|---|
| \(\{S\}\) | \(S\to A, S\to B\) | \(15 + 8 = 23\) |
| \(\{S, A\}\) | \(S\to B, A\to C\) | \(8 + 14 = 22\) |
| \(\{S, B\}\) | \(S\to A, B\to A, B\to C, B\to T\) | \(15 + 14 + 8 + 12 = 49\) |
| \(\{S, C\}\) | \(S\to A, S\to B, C\to T\) | \(15 + 8 + 10 = 33\) |
| \(\{S, A, B\}\) | \(A\to C, B\to C, B\to T\) | \(14 + 8 + 12 = 34\) |
| \(\{S, A, C\}\) | \(S\to B, C\to T\) | \(8 + 10 = 18\) |
| \(\{S, B, C\}\) | \(S\to A, B\to A, B\to T, C\to T\) | \(15 + 14 + 12 + 10 = 51\) |
| \(\{S, A, B, C\}\) | \(B\to T, C\to T\) | \(12 + 10 = 22\) |
The old minimum cut rises to \(22\), but now \(\{S, A, C\}\) is the smallest at \(8 + 10 = 18\). The new maximum flow is 18 ML/day. It rises by only \(2\), not \(6\), because a different cut becomes the bottleneck.
(i) List all eight cuts and choose the smallest.
| Source side | Edges counted (source side to sink side) | Capacity (people/min) |
|---|---|---|
| \(\{S\}\) | \(S\to A, S\to B\) | \(150 + 130 = 280\) |
| \(\{S, A\}\) | \(S\to B, A\to B, A\to T, A\to C\) | \(130 + 40 + 60 + 70 = 300\) |
| \(\{S, B\}\) | \(S\to A, B\to C\) | \(150 + 110 = 260\) |
| \(\{S, C\}\) | \(S\to A, S\to B, C\to T\) | \(150 + 130 + 200 = 480\) |
| \(\{S, A, B\}\) | \(A\to T, A\to C, B\to C\) | \(60 + 70 + 110 = 240\) |
| \(\{S, A, C\}\) | \(S\to B, A\to B, A\to T, C\to T\) | \(130 + 40 + 60 + 200 = 430\) |
| \(\{S, B, C\}\) | \(S\to A, C\to T\) | \(150 + 200 = 350\) |
| \(\{S, A, B, C\}\) | \(A\to T, C\to T\) | \(60 + 200 = 260\) |
| \(\text{maximum flow}\) | \(=\) | \(240\ \text{people/min}\) |
| \(\text{time}\) | \(=\) | \(\dfrac{3600}{240}\) |
| \(\) | \(=\) | \(15\ \text{minutes}\) |
(i) The minimum cut is \(\{S, A, B\}\), crossing \(A\to T\), \(A\to C\) and \(B\to C\): \(60 + 70 + 110 = 240\). The maximum flow is 240 people per minute. (ii) At best the crowd takes 15 minutes to reach the station.
Common pitfalls
Frequently asked questions
What is the maximum-flow minimum-cut theorem?
It says that in a flow network the largest possible flow from the source to the sink equals the capacity of the smallest cut that separates them.
How do you find the maximum flow of a network?
List every cut, work out the capacity of each by adding the edges from the source side to the sink side, and take the smallest. That smallest capacity is the maximum flow.
How many cuts does a flow network have?
If there are k vertices other than the source and the sink, each one can go on either side, so there are 2 to the power k cuts: 4 cuts for 2 vertices and 8 cuts for 3 vertices.
Is the minimum cut the one with the fewest edges?
No. The minimum cut is the one with the smallest total capacity. A cut through one large pipe can have a bigger capacity than a cut through several small pipes.
Why can't the flow be more than the minimum cut?
Everything that travels from the source to the sink has to cross every cut, and a cut can only pass as much as the capacities of its forward edges allow. So the smallest cut limits the whole network.
Does increasing one capacity always increase the maximum flow?
Only if that edge is in the minimum cut, and even then the increase can be smaller than expected because another cut may become the new minimum.