28.11.2014 Views

Lecture Notes Discrete Optimization - Applied Mathematics

Lecture Notes Discrete Optimization - Applied Mathematics

Lecture Notes Discrete Optimization - Applied Mathematics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Similarly, we can show that<br />

|h|= ∑ h(s,v)= ∑ f(s,v)+ ∑ g(s,v)=| f|+|g|.<br />

v∈V<br />

v∈V<br />

v∈V<br />

An augmenting path is a simple s,t-path P in the residual graph G f . Let P be an augmenting<br />

path in G f . All edges of P are residual edges. Thus, there exists some x>0 such<br />

that we can send x flow units additionally along P without exceeding the capacity of any<br />

edge. In fact, we can choose x to be as large as the residual capacity r f (P) of P which is<br />

defined as<br />

r f (P)=min{r f (u,v) | e∈P}.<br />

Note that if we increase the flow of an edge (u,v) ∈ P by x = r f (P), then we also have<br />

to decrease the flow value on(v,u) by x because of the skew symmetry property. We will<br />

also say that we augment the flow f along path P. See Figure 6 for an example.<br />

Lemma 5.2. Let f be a flow in G and let P be an augmenting path in G f . Then f ′ :<br />

V ×V →Rwith ⎧<br />

⎪⎨ f(u,v)+r f (P) if (u,v)∈P<br />

f ′ (u,v)= f(u,v)−r f (P) if (v,u)∈P<br />

⎪⎩<br />

f(u,v) otherwise<br />

is a flow in G of value| f ′ |=| f|+r f (P).<br />

Proof. Observe that f ′ can be decomposed into the original flow f and a flow f P that<br />

sends r f (P) units of flow along P and−r f (P) flow units along the reversed path of P, i.e.,<br />

the path that we obtain from P if we reverse the direction of every edge e∈P. Clearly, f P<br />

is a flow in G f of value r f (P). By Lemma 5.1, the combined flow f ′ = f + f P is a flow in<br />

G of value| f ′ |=| f|+r f (P).<br />

5.3 Ford-Fulkerson Algorithm<br />

The observations above already suggest a first algorithm for the max-flow problem: Initialize<br />

f to be the zero flow, i.e., f(u,v)=0 for all u,v∈ V. Let G f be the residual graph<br />

with respect to f . If there exists an augmenting path P in the residual graph G f , then<br />

augment f along P and repeat; otherwise terminate. This algorithm is also known as the<br />

Ford-Fulkerson algorithm and is summarized in Algorithm 7.<br />

Note that it is not clear that the algorithm terminates nor that the computed flow is of<br />

maximum value. The correctness of the algorithm will follow from the max-cut min-flow<br />

theorem (Theorem 5.3) discussed in the next section.<br />

The running time of the algorithm depends on the number of iterations that we need<br />

to perform. Every single iteration can be implemented to run in time O(m). If all edge<br />

capacities are integral, then it is easy to see that after each iteration the flow value increases<br />

by at least one. The total number of iterations is therefore at most | f ∗ |, where f ∗ is a<br />

30

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!