Flows and Connectivity · Flows
Lesson 5
How to find the maximum flow? Let's at least try something to start with: begin with zero flow and, as long as possible, find a path from \(s\) to \(t\) and increase the flow along the edges of this path as much as possible. It turns out that even this simple approach finds the optimal flow in networks with integer capacities (though in practice it may run slowly if the capacities are large).
Consider the following toy network as an example.

However, note that new paths can go against the existing flow, thus reducing it. For example, the path \(s\to b \to a \to t\) goes from \(b\) to \(a\), which actually means stopping the flow from \(a\) to \(b\).
In the general case, our algorithm looks for a path from \(s\) to \(t\), composed of edges \((u,v)\) of two types:
- Edge \((u,v)\) exists in the original network but not all its capacity is used.
- The reverse edge \((v,u)\) exists in the original network, and there is nonzero flow along it.