The Ford-Fulkerson algorithm [00SD]
- November 12, 2026
We can now define the Ford-Fulkerson algorithm, which is similar to the greedy flow algorithm but uses the residual network instead of the original network to find augmenting paths. Every time an augmenting path traverses a "forwards" edge in the residual network, we add flow to the corresponding edge in G; when an augmenting path traverses a "backwards" edge, we subtract flow from the corresponding edge in G.
Algorithm Ford-Fulkerson [00SE]
- November 12, 2026
We take a moment to record a few observations/lemmas about this algorithm.
Lemma Augmenting preserves flow validity [00SF]
- November 12, 2026
Augmenting along an s-t path in the residual network always preserves the flow properties.
Proof.
- November 12, 2026
- If we augment along two consecutive "forwards" edges in G_f, we add the same amount of flow to both incoming and outgoing edges of their common vertex in G.
- If we augment along two consecutive "backwards" edges, we subtract the same amount of flow to both an incoming and outgoing edge in G.
- If we augment along a forwards edge followed by a backwards edge, we add flow to one incoming edge and subtract flow from another incoming edge. Likewise, if we augment along a backwards edge followed by a forwards edge, we add and subtract the same amount of flow from two outgoing edges.
In addition, because of the way weights are defined on edges in the residual network, we can never add flow beyond capacity, or reduce a flow below zero.
Lemma Augmenting increases flow value [00SG]
- November 12, 2026
Augmenting along an s-t path in the residual network always increases the value of the flow in G.
Proof.
- November 12, 2026
Lemma Ford-Fulkerson terminates [00SH]
- November 12, 2026
The Ford-Fulkerson algorithm terminates (the flow can’t keep getting bigger forever).
Proof.
- November 12, 2026
Runtime analysis [00SM]
- November 12, 2026
The Ford-Fulkerson algorithm can be implemented to run in O(CE) time, where C is the total capacity of outgoing edges from the source.
- At every iteration, the flow value must increase by at least 1. Hence C is an upper bound on the number of iterations of the while loop.
- Finding an augmenting path can be done in \Theta (V+E) using something like DFS. In fact, there's not much point running this algorithm on a disconnected graph, so we can assume E is \Omega (V). Hence this is just \Theta (E).
- Augmenting along the path P and updating the residual network appropriately can be carried out in \Theta (E) worst-case time (constant time per edge of P) with careful choices of data structures. (In practice we store the information about flow and about G_f in the same data structure; we also need to keep pointers from each "backwards" edge to the corresponding forwards edge in order to augment efficiently.)