{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

08 - The Ford-Fulkerson algorithm for maximum flow

# 08 - The Ford-Fulkerson algorithm for maximum flow - And...

This preview shows pages 1–5. Sign up to view the full content.

2/25/08 - The Ford-Fulkerson algorith... reminders from Fri. Flow network is G = (V, E) directed with s, t V, c e 0 e Flow is f: E -> |R+ such that f(e) ce, fin(v) = fout(v) (v s, t) Value of flow is v(f) = fout(s) Cut is a partition V = A A ̅ with s A, t A ̅ . Capacity Cap(A) = ce where E(A,B) = {(u, v) E|u A, v B} e E(A,A ̅ ) Def. An “augmenting path” is a path from s to t in G f bottleneck(P, F): minimum residual capacity of an edge in P. augment(f,p): Let f’ = f. Let b = bottleneck(P, f). For e P if e forward f’(e) <- f(e) + b if e backward f’(e) <- f(e) - b endfor return f’ 18-1 18

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Ford-Fulkerson Initialize f(e) = 0 e, G f = G 1 while an s-t path P in G f f’ = augment(f, P) update G f to G f’ , update f to f’. endwhile return f. Correctness 18-2
(1) F.-F. terminates. Note that v(f) increases by 1 every iteration.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: And it’s bounded above by Cap({s}). So # iterations is bounded. (2) F.-F. computes a feasible ±ow. Induction on # of iterations. Flow values remain between 0 and c e because bottleneck(P,f) was de²ned so that f’(e) is between 0 and c e . Flow convervation 18-3 (3) f is a maximum Fow. If we can ±nd (A, A ̅ ) such that Cap(A) = v(f) we are done, because for every other Fow f ̃ v(f ̃ ) ≤ Cap(A) = v(f) 18-4 Let A = {vertices reachable from s in G f } Notice that s ∈ A, t ∉ A. Every edge in E(A, A ̅ ) is saturated, f(e) = c e . Recall: For every ±ow f, v(f) = ∑ f(e) - ∑ f(e) e ∈ Out(A) e ∈ In(A) = ∑ f(e) + ∑ (f(e) - f(e)) - ∑ f(e) e ∈ E(A,A ̅ ) e ∈ E(A,A) e ∈ E(A ̅ ,A) = ∑ c e- ∑ f(e) = Cap(A) e ∈ E(A,A ̅ ) e ∈ E(A ̅ ,A) 18-5...
View Full Document

{[ snackBarMessage ]}