Resources For Teachers For Tutors For Students & Parents AI New Books Pricing
Year 12 Maths - General (Unit 3 & Unit 4) Flow and matching problems

Maximum flow and the minimum cut

20 practice questions 0 video lessons Theory + worked examples

Find out how much a network can really carry in Year 12 VCE General Mathematics. When tens of thousands of fans stream out of the MCG after a final, or a council plans new water mains for a growing suburb of Bendigo, 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 matching problems and bipartite graphs.

Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

How much can a network really carry? This Year 12 General Mathematics guide for students in Victoria 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 max-flow min-cut theorem says the smallest cut is always reached: the maximum flow is exactly equal to the capacity of the minimum cut.

Key idea. Maximum flow = capacity of the minimum cut. To be sure you have the minimum, list every cut: with \(k\) vertices besides \(S\) and \(T\) there are \(2^k\) cuts (4 cuts for 2 vertices, 8 cuts for 3 vertices).
The minimum cut of a flow networkDirected edges with capacities: S to A 10, S to B 8, B to A 3, A to C 6, B to C 4, A to T 5, C to T 12. The minimum cut, a dashed line between A and B on one side and C and T on the other, crosses A to C (6), B to C (4) and A to T (5), shown in red. S A B C T 10 8 3 6 4 5 12
The minimum cut (dashed) has capacity \(6 + 4 + 5 = 15\). Every other cut of this network is bigger, so the maximum flow from \(S\) to \(T\) is \(15\).
A maximum flow of 15Each edge is labelled flow / capacity: S to A 9/10, S to B 6/8, B to A 2/3, A to C 6/6, B to C 4/4, A to T 5/5, C to T 10/12. The three full edges, in red, are the edges of the minimum cut. S A B C T 9/10 6/8 2/3 6/6 4/4 5/5 10/12
A flow that reaches \(15\): each label is flow/capacity. The red edges of the minimum cut are full, so no more can get through. Flow in equals flow out at \(A\), \(B\) and \(C\).

The max-flow min-cut theorem:

\[\text{maximum flow} = \text{capacity of the minimum cut}\]
maximum flow=capacity of the minimum cut

Capacity of one cut (forward edges only):

\[\text{capacity} = \text{sum of the capacities from the source side to the sink side}\]
capacity=∑forward capacities

Number of cuts when there are \(k\) vertices other than \(S\) and \(T\) (each one goes on the source side or the sink side):

\[\text{number of cuts} = 2^k\]
number of cuts=2k

Time to move a total amount at the maximum flow:

\[\text{time} = \frac{\text{total amount}}{\text{maximum flow}}\]
time=total amountmaximum flow

How to find the maximum flow

  1. List every source side. Start with \(\{S\}\), then add the other vertices (not \(T\)) in every possible combination: \(2^k\) cuts in all.
  2. 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.
  3. Find the smallest capacity. That cut is the minimum cut.
  4. State the maximum flow: it equals the capacity of the minimum cut, with units.

When a capacity changes

  1. Changing an edge that is not in the minimum cut cannot raise the maximum flow.
  2. 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.
Example 1 — Four cuts
Stormwater drains in a Warrnambool suburb carry runoff from \(S\) to the outlet \(T\). Capacities are in litres per second (L/s). Find the maximum flow from \(S\) to \(T\) and the minimum cut.
Solution

There are two vertices besides \(S\) and \(T\), so there are \(2^2 = 4\) cuts. List them all.

Example 1 stormwater drainsDrains with capacities in litres per second: S to A 9, S to B 13, A to B 4, A to T 11, B to T 6. S A B T 9 13 4 11 6
Source sideEdges 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\)
Example 1 minimum cutThe minimum cut has S and B on the source side. It counts S to A (9) and B to T (6), shown in red; A to B points back and is not counted. S A B T 9 13 4 11 6
maximum flow=15L/s

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.

Example 2 — Eight cuts
The network shows roads from Melbourne’s northern suburbs \(S\) to the airport \(T\), with capacities in hundreds of vehicles per hour. Find the maximum flow and name the roads in the minimum cut.
Solution

Three vertices besides \(S\) and \(T\) give \(2^3 = 8\) cuts. Check the direction of every edge that crosses.

Example 2 freeway networkRoads with capacities in hundreds of vehicles per hour: S to A 13, S to B 11, A to B 8, A to C 9, C to B 6, C to T 12, B to T 10. S A B C T 13 11 8 9 6 12 10
Source sideEdges 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\)
Example 2 minimum cutThe minimum cut with source side S, A, B counts A to C (9) and B to T (10), in red. C to B points back and is not counted. S A B C T 13 11 8 9 6 12 10
maximum flow=19

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).

Example 3 — Upgrading a main
Water mains carry water from a treatment plant \(S\) to a suburb \(T\) near Bendigo, with capacities in megalitres per day (ML/day). (i) Find the maximum flow. (ii) The main \(A\to C\) is upgraded from \(8\) to \(14\) ML/day. Find the new maximum flow.
Solution

(i) List the eight cuts.

Example 3 water mainsMains with capacities in megalitres per day: S to A 15, S to B 8, A to C 8, B to A 14, B to C 8, B to T 12, C to T 10. S A B C T 15 8 8 14 8 12 10
Source sideEdges 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 sideEdges 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\)
Example 3 after the upgradeAfter A to C is raised to 14, the minimum cut has source side S, A, C and counts S to B (8) and C to T (10), in red. S A B C T 15 8 14 14 8 12 10
16,18

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.

Example 4 — Clearing a crowd
After a concert at Marvel Stadium, 3600 people leave the forecourt \(S\) for the train station \(T\) along walkways. Capacities are in people per minute. (i) Find the maximum flow. (ii) What is the shortest time for all 3600 people to reach the station?
Solution

(i) List all eight cuts and choose the smallest.

Example 4 walkways from a concertWalkways with capacities in people per minute: S to A 150, S to B 130, A to B 40, A to T 60, A to C 70, B to C 110, C to T 200. S A B C T 150 130 40 60 70 110 200
Source sideEdges 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}\)
time=3600240=15

(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

Not checking every cut. The minimum must be the smallest of all \(2^k\) cuts. Watch out for testing two or three cuts that look likely and stopping there.
Fewest edges is not smallest capacity. A cut through two large pipes can be bigger than a cut through three small ones. Watch out for choosing a cut by the number of edges it crosses.
Upgrades. Raising an edge in the minimum cut by \(6\) does not always raise the maximum flow by \(6\). Watch out for forgetting that another cut may become the new minimum.

Frequently asked questions

What is the max-flow min-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.