Applications of maximum flow [00SI]
- November 12, 2026
Maximum bipartite matching [00SJ]
- November 12, 2026
Definition Matching [00SK]
- November 12, 2026
Given an undirected graph G, a matching on G is a subset of edges such that no two edges share an endpoint. In other words, a matching on G is a way to match or "pair up" some of vertices.
A maximum matching is a matching which contains as many edges as possible.
Max bipartite matching via max flow [00TP]
- November 25, 2026
Finding maximum matchings for graphs in general is difficult, but it's much easier for bipartite graphs:
- Add a new source vertex s with an edge to each vertex in L.
- Add a new target vertex t with an edge from each vertex in R.
- Give every edge a capacity of 1.
- A valid flow of value k must have k units of flow going from L to R; since the edges all have capacity 1 there must therefore be k edges with flow on them. Moreover, none of them can share an endpoint since then two units of flow would have to enter or exit the same vertex, but this is impossible since the edges from s and the edges to t all have capacity 1 as well.
- Conversely, given any k edges which share no endpoints, simply put one unit of flow along each edge, and continue the flow to s and t. This will be a valid flow for the same reasons.
Hence, a maximum flow must correspond to a maximum matching, and vice versa. So if we had an algorithm to find maximum flows, we could use it to compute maximum matchings in bipartite graphs.
Committee assignment [00TQ]
- November 25, 2026
Consider the following scenario:
- There are a number of committees; each committee has a desired number of people.
- There is a set of people; each person has (1) a list of committees they are willing to be on, and (2) a maximum total number of committees they are willing to be on.
We can solve this by creating a flow network, as follows:
- There is a vertex for each person, a vertex for each committee, and special source and sink vertices s and t.
- We add an edge from s each each person, with capacity equal to the total number of committees that person is willing to be on.
- From each person, we add edges of capacity 1 to each committee they are willing to be on.
- From each committee, we add an edge to the sink t with capacity equal to the desired size of the committee.
Since valid flows correspond to valid assignments, it is possible to fill all the committees if and only if a maximum flow saturates all the edges going into t.
Escape route planning [00TR]
- November 25, 2026
As another example application for finding max flows, imagine trying to plan escape routes for evacuating a city. Formally, we model a city as a directed graph. Each vertex has a weight corresponding to the number of people who start there (for example, we might assign every vertex some number corresponding to population density; or if we are trying to model evacuation from large events we might just assign a few vertices some large number, etc.). Certain vertices are designated as "escapes" (which could correspond to shelters, or simply to vertices on the edge of the graph), each having a capacity corresponding to the number of people it can handle. Each edge also has a capacity corresponding to how many people it can handle. The goal is to see how many people we can get from their starting locations to an escape, and plan which routes they should use.
Once again, we can make this into a flow network as follows:
- Create a source vertex s, and add an edge from s to each vertex v with capacity equal to the number of people that start at v.
- Create a sink vertex t, and add an edge from each escape vertex to t with capacity equal to the capacity of the escape.
Other max flow applications [00TS]
- November 25, 2026
There are many other interesting applications of maximum flows, including:
- Baseball elimination: max flow can be used to compute which baseball teams can still make the playoffs, and which have been definitely eliminated.
- Image segmentation: max flow can be used to separate images into background and foreground.
- Airline scheduling: a generalization of max flow which includes lower bounds on flows can be used to figure out optimal ways to schedule flights and crews for an airline.