




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: Fundamental Algorithms; Subject: Computer Science; University: University of Illinois - Urbana-Champaign; Term: Spring 2008;
Typology: Study notes
1 / 111
This page cannot be seen from the preview
Don't miss anything!





























































































Mahesh Viswanathan [email protected] 3232 Siebel Center
University of Illinois, Urbana-Champaign
Spring 2008
Maximum Flow AlgorithmsCorrectness and Analysis Polynomial Time Algorithms
Polynomial Time Algorithms Ford-Fulkerson Algorithm
Definition Flow network is an abstraction of a transportation network. It is a directed graph G = (V , E ) with
s
1
2
3
4
5
6
t 15
5
10
30
8
4
9
4 15
6 10
10
15
15 10
Polynomial Time Algorithms Ford-Fulkerson Algorithm
Definition Flow network is an abstraction of a transportation network. It is a directed graph G = (V , E ) with
s
1
2
3
4
5
6
t 15
5
10
30
8
4
9
4 15
6 10
10
15
(^15 10) Each edge e has a capacity c(e) ≥ 0
Polynomial Time Algorithms Ford-Fulkerson Algorithm
Definition Flow network is an abstraction of a transportation network. It is a directed graph G = (V , E ) with
s
1
2
3
4
5
6
t 15
5
10
30
8
4
9
4 15
6 10
10
15
(^15 10) Each edge e has a capacity c(e) ≥ 0 Source s ∈ V with no incoming edges Sink t ∈ V with no outgoing edges
Assumptions: All capacities are integer, and every vertex has at least on edge incident to it.
Polynomial Time Algorithms Ford-Fulkerson Algorithm
Definition A flow in a network G = (V , E ), is a function f : E → R≥^0 such that
Polynomial Time Algorithms Ford-Fulkerson Algorithm
Definition A flow in a network G = (V , E ), is a function f : E → R≥^0 such that
Capacity Constraint: For each edge e, f (e) ≤ c(e) Conservation Constraint: For each vertex v 6 = s, t ∑
e into v
f (e) =
e out of v
f (e)
Polynomial Time Algorithms Ford-Fulkerson Algorithm
Definition A flow in a network G = (V , E ), is a function f : E → R≥^0 such that
s
1
2
3
4
5
6
t 14/
4/
10/
14/
8/
0/
9/
0/4 1/
4/6^ 10/
9/
0/
0/15 9/
Figure: Flow with value 28
Capacity Constraint: For each edge e, f (e) ≤ c(e) Conservation Constraint: For each vertex v 6 = s, t ∑
e into v
f (e) =
e out of v
f (e)
Polynomial Time Algorithms Ford-Fulkerson Algorithm
Notation The inflow into a vertex v is f in(v ) =
e into v f^ (e) and the outflow is f out(v ) =
e out of v f^ (e)
Polynomial Time Algorithms Ford-Fulkerson Algorithm
Notation The inflow into a vertex v is f in(v ) =
e into v f^ (e) and the outflow is f out(v ) =
e out of v f^ (e) For a set of vertices A, f in(A) =
e into A f^ (e). Outflow f out(A) is defined analogously
Polynomial Time Algorithms Ford-Fulkerson Algorithm
Problem
Polynomial Time Algorithms Ford-Fulkerson Algorithm
Problem Input A network G with capacity c and source s and sink t
Polynomial Time Algorithms Ford-Fulkerson Algorithm
s
v
u
t 10
20
20
10
30
(^1) Begin with f (e) = 0 for each edge (^2) Find a s-t path P with f (e) < c(e) for every edge e ∈ P (^3) Augment flow along this path (^4) Repeat augmentation for as long as possible.
Polynomial Time Algorithms Ford-Fulkerson Algorithm
s
v
u
t 10/
20
10/
10
30
(^1) Begin with f (e) = 0 for each edge (^2) Find a s-t path P with f (e) < c(e) for every edge e ∈ P (^3) Augment flow along this path (^4) Repeat augmentation for as long as possible.