Any more? Out of s: s→a has 4−4=0 left, s→b has 2−2=0 left. Source is fully saturated, so no residual edge leaves s. Max flow =6. Matching min cut: S={s}, c(S,T)=c(s,a)+c(s,b)=4+2=6 ✔.
Recall Solution L2.2
BFS measures path length in edges. From s, shortest s−t paths have length 2: s→a→t and s→b→t. BFS picks one such length-2 path first — say s→a→t, bottleneck 1, push 1.
Residual: s→a gone, a→t gone; still open s→b, b→t.
Next BFS shortest path: s→b→t, length 2, bottleneck 1, push 1. ∣f∣=2.
No residual path remains (s fully saturated). Max flow =2.
Note Edmonds–Karp's shortest-path rule avoided the length-3 detour s→a→b→t that plain Ford–Fulkerson might grab first.
Recall Solution L2.3
If the path chooser is adversarial and always routes through the unit middle edge, each augmentation pushes only bottleneck 1 (the a→b edge), so it needs 2M=2000 augmentations to reach the true max flow 2M=2000. This is the value-dependent O(E⋅∣f∗∣) blow-up.
Edmonds–Karp ignores the middle edge because s→a→t and s→b→t are shorter (length 2 vs 3). It pushes M then M: just 2 augmentations. Max flow =2M=2000 in both cases — same answer, wildly different work.
Reason about cuts, residuals, and why the algorithm is right.
Recall Solution L3.1
Take S={s}, T={a,b,c,t}. Forward edges: s→a (4), s→b (2). c(S,T)=4+2=6.
By weak duality (Step 2 of the parent proof), every flow ≤ every cut, so ∣f∣≤6. We achieved ∣f∣=6. Equality means both are optimal — the max-flow min-cut theorem. The saturated source edges are the bottleneck.
Recall Solution L3.2
At max flow, s→a and s→b are both saturated (residual 0), so no forward residual edge leaves s. Are there backward residual edges into s? Backward edges point a→s, b→s — those go towards, not away, so they don't help reach new nodes. Hence S={s} and T={a,b,c,t}.
This is exactly the cut of L3.1, capacity 6. The construction (“reachable set in residual graph”) is precisely Step 3 of the theorem's proof.
Recall Solution L3.3
Push 1 along s→a→b→t. Now s→a, a→b, b→t are all saturated. Remaining forward edges: s→b (open), a→t (open) — but there is no forward path connecting them (s→b→? dead-ends since b→t is full; a→t is unreachable since s→a is full). Greedy stops at ∣f∣=1.
With backward edges, the residual graph has b→a (cap 1, the undo of a→b). New path: s→b→a→t using s→b(1), backward b→a(1), a→t(1). Push 1. Now ∣f∣=2, which equals the min cut S={s}: c(s,a)+c(s,b)=1+1=2. The backward edge re-routed the mistaken commitment.
Standard Bipartite Matching reduction: add source s→wi (cap 1 each), edge wi→jk (cap 1) for each allowed pair, and jk→t (cap 1 each). Max flow = max matching (each unit of flow is one matched pair; capacity-1 source/sink edges force distinctness).
Trace: s→w1→j1→t (1), s→w2→j2→t (1), s→w3→j3→t (1). All three source edges saturated. Max matching =3 — a perfect matching.
Certificate: cut S={s} has capacity =3 (three unit source edges), matching the flow.
Recall Solution L4.2
With all capacities 1, max flow counts edge-disjoint paths (each path uses each edge at most its capacity 1). Push:
s→a→t (1)
s→b→c→t (1)
Now s→a used, a→t used; s→b, b→c, c→t used. Remaining: a→c (1) but s→a is full so a is unreachable. Max flow =2, so 2 edge-disjoint paths.
By Menger's Theorem (the edge form = max-flow min-cut with unit capacities), the minimum number of edges whose removal disconnects s from t is also 2. Min cut: S={s,a} gives forward edges s→b, a→c, a→t = capacity 3... but the tight cut is S={s}: edges s→a, s→b = 2 ✔.
Recall Solution L4.3
Primal (max flow): variables f(u,v)≥0, maximize ∣f∣ subject to f≤c and conservation. Its dual assigns a variable to each edge (interpretable as a 0/1 “is this edge cut?” indicator in the integral optimum) and minimizes total cut capacity. Strong Linear Programming Duality gives primal optimum = dual optimum, i.e. max∣f∣=minc(S,T) — the max-flow min-cut theorem is exactly LP duality specialised to this totally-unimodular problem (so the LP optimum is integral). No numeric answer; the point is the structural identity.
Full end-to-end reasoning, including degenerate cases.
Recall Solution L5.1
Edmonds–Karp: VE2=50⋅4002=50⋅160000=8000000 — capacity-independent.
Ford–Fulkerson (worst path choice): E⋅∣f∗∣=400⋅106=4×108 — 50× larger and it depends on the capacity magnitude. The capacity-independentVE2 bound is the safe one to quote. (If you needed even better, Dinic's Algorithm gives O(V2E), and O(EV) on unit-capacity/matching graphs.)
Recall Solution L5.2
(a) s=t: value ∣f∣=∑f(s,v)−∑f(v,s) is defined as net flow out of the source, but source is the sink — the problem is degenerate; conventionally max flow =0 (nothing to transport). Most implementations reject s=t.
(b) No s→t path: no augmenting path ever exists, so max flow =0. The min cut is c=0: put every s-reachable node in S; since t is unreachable, no forward edge crosses. ✔ theorem holds trivially.
(c) Capacity-0 edge:c(u,v)=0 forces f(u,v)=0 by the capacity constraint; the edge is as good as absent and contributes 0 to any cut. Max flow unchanged.
(d) Self-loop a→a (cap 5): conservation at a counts it as both in-flow and out-flow, so it cancels; it can carry any f≤5 but never changes ∣f∣. Safe to delete before running. Max flow unchanged.
Recall Solution L5.3
Each augmentation pushes along a shortest residual path, so it only adds residual edges that are the reverse of edges on that shortest path. A reverse edge (v,u) appears only when (u,v) lay on a shortest path, meaning δ(s,v)=δ(s,u)+1; using the new reverse edge later would require δ(s,u)=δ(s,v)+1, i.e. δ(s,u) grew by ≥2. So between two saturations of the same edge, a distance increases by at least 2. Distances are bounded by V, so each of the E edges is saturated O(V) times, giving O(VE) augmentations; each BFS costs O(E), hence O(VE2) total. ■
Recall One-line self-test (fold, then recall)
Max flow of Network A ::: 6
Max flow of Network B ::: 2
Edge-disjoint s→t paths in unit-capacity Network A ::: 2
Edmonds–Karp bound for V=50,E=400 ::: 8000000