Flow networks, maximum flow problem
Edmonds-Karp algorithm (EK)
Edmonds-Karp algorithm is a special case of the Ford-Fulkerson algorithm.
The only change is that instead of choosing a random augmenting path, we will choose the shortest one by the number of edges, found, for example, by BFS. Correctness is already proved, as it is a special case of the Ford-Fulkerson algorithm.
The only thing there is to prove is the runtime complexity, which we will prove to be
Minimum distance from source in the residual network lemma
Minimum distance to sink in the residual network lemma
Existence of an augmenting path in the pre-augmented residual network lemma
Saturation of an edge in the residual network lemma
A corollary of this lemma is that there can be at most
Dinic’s algorithm
Dinic’s algorithm operates with layers/levels, where during the
The layer graph definition
Building a layer graph requires running a BFS from
Updating the layer graph lemma
During one phase, edge can become saturated, and thus should be removed from the layer graph. Vertices, as a result, can become dead-ends (either no incoming edges or no outgoing edges) and should also be removed. We can efficiently perform deletions by storing two counters for each vertex, for
Hopcroft-Karp
Suppose there is also a vertex capacity function
This new problem can be reduced to the regular edge-only capacity max flow problem with the following:
Assume now,
Upper bound on the flow value in unit vertex-capacities networks lemma
Running the Dinic algorithm on such a flow network yields the same (for now) runtime.
Note however, once an edge