Loading in 5 sec....

Beyond the flow decomposition barrierPowerPoint Presentation

Beyond the flow decomposition barrier

- 77 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about 'Beyond the flow decomposition barrier' - kimball

**An Image/Link below is provided (as is) to download presentation**

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

### Beyond the flow decomposition barrier

### Goldberg-Rao algorithm (cont.)

### Appendix (cont.)

Authors: A. V. Goldberg and Satish Rao (1997)

Presented by Yana Branzburg

Advanced Algorithms Seminar

Instructed by Prof. Haim Kaplan

Tel Aviv University, June 2007

Introduction

- Maximum flow problem
- Use the concept of distance
- Distance is defined by arc length
- Methods so far use unit length function
- Goldberg&Rao use adaptive binary length function: length threshold is set relative to an estimate of residual flow

Ω(mn) barrier

- Ω(mn) - a natural barrier for maximum flow algorithms
- that output explicit flow decomposition (the total path length is Θ(mn) in the worst case)
- that augment flow one path at the time, for each augmenting path, one arc at the time

- Although the barrier does not apply to algorithms that use preflows or data structures like dynamic trees, no one beats it

Ω(mn) barrier (cont.)

Beyond the Ω(mn) barrier

- Dinic’s algorithm for unit-capacity networks
- Goldberg-Rao algorithm for general networks

Background

- flow network:
- G = (V, E)
- source s, sink t
- capacity function u: E {1, …, U}

- flow function f: E {1, …, U}
- f(a) ≤ u(a)
- conservation constraint
- flow value is

Background (cont.)

- residual capacity uf (v,w)= u(v,w) – f(v,w) + f(w,v)
- Arc (v,w) is a residual arc if uf (v,w) > 0
- residual flow is the difference between optimal flow f* and current flow f
- In blocking flow every directed path s-t contains an arc with residual capacity 0
- Without loss of generality assume:
- G has no parallel arcs
- if arc (v,w) is in G, but (w,v) is not, add (w,v) to G, define u(w,v)=0
- either f(v,w) = 0 or f(w,v) = 0

Dinic’s algorithm for unit capacity networks

- A unit capacity network is one in which all arc have unit capacities
- Algorithm of two phases:
- Find augmenting paths, until distance between s and t is
- Augment the found flow to an optimal flow

Dinic’s algorithm for unit capacity networks (cont.)

- Algorithm Dinic
- while ds ≤ α(ds stands for length of the shortest path from s to t)
- Find blocking flow in admissible network
- Compute residual network

- while there is an s-t path in the residual network
- Find an s-t path P
- Augment one unit of flow along P
- Compute residual network

- while ds ≤ α(ds stands for length of the shortest path from s to t)

Dinic’s algorithm for unit capacity networks - Analysis

- Phase I:
- Find a blocking flow:
- Find a s-t path
- Route one unit of flow
- Delete all arcs of the path (all saturated)
- Repeat until there is no s-t path

- Each arc is looked only once, hence O(m)
- Thus the first phase total takes O(αm)

- Find a blocking flow:

Dinic’s algorithm for unit capacity networks – Analysis (cont.)

- Phase II:
- Blocking flow increases the distance between s and t by at least one
- Let the vertices be partitioned into levels
- Thus, at the end of phase I, there are at least α levels

Dinic’s algorithm for unit capacity networks – Analysis (cont.)

- Lemma 1: At the end of phase I, the maximum flow in the residual network is at most α
- Proof. Case 1:α = m½
- At least m½ levels and m arcs there is a pair of adjacent levels Vk and Vk+1 which have at most m½ arcs between them
- The cut has capacity at most m½ maximum residual flow is m½

Dinic’s algorithm for unit capacity networks – Analysis (cont.)

- Proof. Case 2:α = 2n⅔
- There exists a pair of adjacent levels Vk and Vk+1 , each of which has at most n⅓nodes
- Assume the contrary: at least half levels must contain more than n⅓ nodes
- Then the total number of nodes more than
α/2*n⅓≥ n, which is a contradiction

- Thus the cut has capacity at most n⅔≤ α

Dinic’s algorithm for unit capacity networks – Analysis (cont.)

- Each iteration of phase II routes one unit of additional flow
- Since after phase I the maximum flow in the residual network ≤ α, the maximum number of iterations in phase II is bounded by α
- One iteration of phase II is O(m)
- Thus, the second phase takes total O(αm)
- Hence, Dinic’s algorithm for unit capacity networks solves the maximum flow problem in
time

Length Functions (cont.)

- length function ℓ: E R+
- distance labeling d: V R+ with respect to a length function ℓ if:
- d(t) = 0
- for every (v,w) in E : d(v) ≤ d(w) + ℓ(v,w)

- admissible arc (v,w) is a residual arc where
d(v) > d(w) or d(v) = d(w) and ℓ(v,w) = 0

- In case of binary length function, admissible arc satisfies d(v) = d(w) + ℓ(v,w)
- distance function dℓ(v): distance from v to t under ℓ
- dℓ(v) is a distance labeling

Length Functions (cont.) (cont.)

- Claim 2:dℓ is the biggest distance labeling
- Proof (assume the contrary):
- d(v) >dℓ(v) for some v
- w is the last node on a shortest v-t path Γthat satisfies d(w) >dℓ(w)
- x follows w (w ≠t, hence x exists)
- dℓ(w) < d(w) ≤ ℓ(w,x) +d(x) ≤ ℓ(w,x) +dℓ(x)
- v-w concatenated with w-t is shorter than Γ
- Contradiction to selection of Γ

Volume of Network (cont.)

- A residual arc a has
- “width” uf(a)
- length ℓ(a)
- volume volf,ℓ(a)= uf(a) ℓ(a)

- network volume Volf,ℓ = Σauf(a) ℓ(a)
- The residual flow value is upper bounded by Volf,ℓ∕dℓ(s) (since any path from s to t has length at least dℓ(s) > 0)
- To get a tighter bound, keep Volf,ℓ small by choosing a binary length function that is zero for large residual capacity arcs

Binary Blocking Flow Algorithm - Idea (cont.)

- Ensure the algorithms terminates after not too many augmentations by showing that every iteration increases dℓ(s) - but we have zero arcs?!
- Contract strongly connected components (nodes) formed by zero-length arcs
- Bound the augmenting flow in a node by Δ to be able to reroute the flow in a restored node
- Possible not to find a blocking flow can not guarantee increase of dℓ(s)
- Choose Δ that insures small number of non-blocking augmentations

Stopping Condition of the Algorithm (cont.)

- Define F - an upper bound on the residual flow value
- Update F every time our estimate improves
- Stop when F < 1 (integral capacities)
- Initial estimate is F = Σ(s,w)u(s,w) ≤ nU

The Skeleton of Goldberg-Rao algorithm (cont.)

- while F ≥ 1 do
- Compute Δ
- while the residual capacity > F /2
- Compute length function ℓ, distance function dℓ
- Find admissible graph A(f, ℓ, dℓ)
- Contract strongly connected components of A
- Find a flow of value Δ or a blocking flow
- Augment the current flow, extend it to original graph and recompute the residual graph

- Update F

phase

update step

Estimate a residual capacity (cont.)

- A residual capacity uf(S,T) of an s-t cut can serve as an upper bound
- canonical cut (Sk ,Tk) :
- (Sk ,Tk) is an s-t cut
- Initially (S,T) =({s },V \{s })is the current cut
- Find a canonical cut with the smallest residual capacity
- When the capacity of the found cut ≤ F /2, update F to this capacity value

Estimate a residual capacity (cont.) (cont.)

- Claim 3: The minimum capacity canonical cut can be found in O(m) time
- Proof:
- Every arc may cross at most one canonical cut (its length at most 1)
- For k =1,…,dℓ(s), initialize uf(Sk,Tk) =0
- For every arc (v,w) : if dℓ(v) > dℓ(w), increase uf(Sk,Tk) by uf(v,w), k = dℓ(v)
- Find minimum among all uf(Sk,Tk)
- Denote the minimum capacity canonical cut

Binary length function (cont.)

- A first estimate of a length function:
* this length function will have to be modified for reasons that will come up during time analysis

- Given ℓ, next we show how to handle the contraction of zero arcs

Extending the flow inside contracted components (cont.)

- Claim 4: Given a flow of value at most Δ, we can correct it to a flow of the same value in the original graph in O(m) time
- Proof (for one component):
- Choose an arbitrary vertex as a root
- Form an in-tree and an out-tree
- in-tree: a rooted tree with a path from each node to the root
- out-tree: a rooted tree with a path from the root to each node

Extending the flow inside contracted components (cont.) (cont.)

- Proof (cont.):
- For each vertex compute its flow balance: sum of flow entering minus sum of flow leaving the vertex
- Route the positive balances to the root using the in-tree
- Route the resulting flow excess from the room to negative balances via out-tree
- At most Δ flow is routed to and from the root using one arc, which residual capacity is at least 2Δ

in tree (cont.)

out tree

Extending the flow inside contracted components (cont.)- Example:

0.5Δ

+0.5Δ

0.5Δ

+Δ

Δ

+Δ

0.5Δ

0.75Δ

+0.5Δ

-0.75 Δ

Δ

+0.25Δ

Δ

R

-0.25 Δ

Δ

0.25Δ

Time bounds (cont.)

- Reminder: choice of Δ must insure small number of non blocking augmentations
- Denote
- Let
- Thus, number of non blocking augmentations of value Δ is at most α in each phase
- How many blocking augmentations per phase there are? Need to show that O(α)

Bound of number of (cont.)blocking augmentations

- Lemma 5: For a 0-1 length function on the residual graph:
where M is the maximum residual capacity of a length one arc

- Proof:
- Every arc crosses at most one of the canonical cuts, for such an arc, ℓ(a) =1
- Total capacity of length one arcs ≤ mM, there are dℓ(s) canonical cuts
- Thus, minimum capacity canonical cut ≤ mM / dℓ(s)

Bound of number of (cont.)blocking augmentations (cont.)

For dense graphs, the following Lemma gives better bounds

- Lemma 6: For a 0-1 length function on the residual graph:
- Proof:
- Let
- Since , there are at most dℓ(s)/2 values of k where |Vk | > 2n /dℓ(s)
- Thus, at least values of k have |Vk | ≤ 2n /dℓ(s)
- By the pigeonhole principle, there is j such that
|Vj | ≤ 2n /dℓ(s) and |Vj+1 | ≤ 2n /dℓ(s)

- Since all arcs from Vj+1 to Vjhave length 1, Lemma 6 holds

Bound of number of (cont.)blocking augmentations (cont.)

- Lemma 7: In every iteration of a blocking flow, dℓ(s) increases by at least 1 (prove later)
- Lemma 8: There are at most O(α) blocking flow augmentations in a phase
- Proof: Case 1:α = m½
- Using Lemma 7: after 4m½ blocking flow update steps dℓ(s) ≥ 4m½
- M ≤ 2Δ. Thus, together with Lemma 5:

Bound of number of (cont.)blocking augmentations(cont.)

- Proof. Case 2:α = n⅔
- Using Lemma 7: after 4n ⅔blocking flow update steps dℓ(s) ≥ 4n ⅔
- M ≤ 2Δ. Thus, together with Lemma 6:

- Conclusion: Each phase of the algorithm terminates in O(α) update steps

Finding a flow in one update step (cont.)

- We use Goldberg&Tarjan algorithm for computing a blocking flow X in each update step in O(mּlog(n2/m)) time
- If X > Δ, return extra flow to s in O(m) time:
- Place X – Δ units of excess at t
- Process vertices in reverse topological order
- For current vertex reduce flow on the incoming arcs to eliminate its excess

Time Bounds Summary (cont.)

- Theorem 9: The maximum flow problem can be solved in O(αּmּlog(n2/m)ּlogU) time
- Proof:
- Δ>U : all arcs are length one
- Each update step finds a blocking flow and increases dℓ(s) by at least one
- After αsteps dℓ(s) ≥αF ≤αU
- After O(α) steps F =αΔ≤αU Δ≤U
- Total time till Δ =U is O(αּmּlog(n2/m))

F =uf(S,T) ≤ mM /dℓ(s) ≤ mM /α = αM ≤ αU

Time Bounds Summary (cont.) (cont.)

- Proof (cont.):
- 1≤Δ≤U :Number of phases is O(logU), since each phase decreases twice
- Total time for these phases is O(αּmּlog(n2/m)ּlogU)
- When Δ=1, F ≤α, the algorithm ends in O(α) update steps

Proof of Lemma 7 (cont.)

- In every iteration of a blocking flow, dℓ(s) increases by at least 1
- Denote:
- ℓ anddℓ - initial length and distance functions
- ℓ’ anddℓ’ - after finding a blocking flow and recomputing the residual graph
- f and f’ - the flows before and after augmentation respectively

- Need to prove: dℓ(s) < dℓ’ (s)

Proof of Lemma 7 (cont.) (cont.)

- Claim 10:dℓ is a distance labeling with respect to ℓ’
- Proof:
- By definition: dℓ(v) ≤ dℓ(w) + ℓ(v,w)
- Need to show: dℓ(v) ≤ dℓ(w) + ℓ’(v,w)
- If dℓ(v) ≤ dℓ(w) – trivial
- dℓ(v) >dℓ(w) (w,v) is not admissible (for admissible arc dℓ(w)=dℓ(v)+ℓ(w,v))
- uf’ (v,w) ≤ uf(v,w)
- ℓ’(v,w) ≥ ℓ(v,w)

Proof of Lemma 7 (cont.) (cont.)

- Claim 11:dℓ(s)≤dℓ’ (s)
- Proof:
- By Claim 2: for any distance labeling d, d(v) ≤ dℓ(v)
- By Claim 10: dℓ is a distance labeling with respect to ℓ’
- dℓ(s) ≤ dℓ’ (s)

Proof of Lemma 7 (cont.) (cont.)

- We need to show dℓ(s) < dℓ’ (s)
- Let Γ be an s-t path in Gf’
- By Claim 10:
cost(v,w) =dℓ(w) -dℓ(v) +ℓ’(v,w) ≥0

- ℓ’ (Γ) = dℓ(s) –dℓ(v1) +c(s,v1) +
dℓ(v1) –dℓ(v2) +c(v1,v2) +…+

dℓ(vk) –dℓ(t) +c(vk,t) =

dℓ(s) – dℓ(t) +c (Γ) = dℓ(s) +c (Γ)

Proof of Lemma 7 (cont.) (cont.)

- dℓ’ (s) = ℓ’ (Γ) = dℓ(s) + c (Γ)
- Enough to show that along every s-t path Γ in Gf’ there is an arc (v,w) satisfying c(v,w) > 0

Proof of Lemma 7 (cont.) (cont.)

dℓ(v) >dℓ(w):

dℓ(v) ≤ dℓ(w) + ℓ(v,w)

< dℓ(v) + ℓ(v,w)

ℓ(v,w) > 0

dℓ(v) = dℓ(w) + ℓ(v,w)

- We routed a blocking flow Γ contains arc (v,w) that is not in A(f, ℓ, dℓ)
- dℓ(v) ≤ dℓ(w) either because:
- (v,w) in Gf(otherwise (v,w) would be in A(f, ℓ, dℓ)) or
- (v,w) not in Gfbut in Gf’ (means that (w,v) is in A(f, ℓ, dℓ) dℓ(w) = dℓ(v) + ℓ(v,w) dℓ(w) ≥dℓ(v))

Proof of Lemma 7 (cont.) (cont.)

- Assume the contrary that
c(v,w)=dℓ(w) -dℓ(v) +ℓ’(v,w) =0

- dℓ(v) ≤dℓ(w) dℓ(w) =dℓ(v) andℓ’(v,w) =0
- Case 1 -(v,w) in Gf :
- 1=ℓ(v,w) >ℓ’(v,w) =0(w,v) is in A(f, ℓ, dℓ)

- Case 2 - (v,w) not in Gf but in Gf’ :
- (w,v) is in A(f, ℓ, dℓ)

- But dℓ(w) =dℓ(v) ℓ(w,v) = 0

Bad Example (cont.)

- dℓ(w) =dℓ(v), ℓ(w,v) =0 and ℓ’(v,w) =0
- Δ ≤ uf(v,w) < 2Δ
- uf(w,v) > 2Δ
- uf’ (v,w) ≥ uf(v,w) +2Δ – uf(v,w) ≥ 2Δ
- ℓ’(v,w) = 0

w

v

≥2Δ- uf(v,w)

Solution to bad example (cont.)

- Distort the length function, so that such bad arcs get length zero ahead
- Might become an inner arc in a strongly connected component
- The capacity of such arcs must be at least 2Δ in order to be able to route a flow of Δ in flow extension(remember example…)

A correct length function (cont.)ℓ

- Changes due to new ℓ in Lemma 8 (p. 32):
- Case 1 - 6m½ blocking flow update steps instead of 4m½
- Case 2 - 5n ⅔blocking flow update steps instead of 4n ⅔

Length function (cont.)ℓ*

- (v,w) is a special arc if:
- 2Δ ≤ uf(v,w) < 3Δ
- d(v) =d(w)
- uf(w,v) ≥ 3Δ

- Define new length function ℓ* that:
- = zero on special arcs
- = ℓ on all other arcs

- dℓ* = dℓ
- The algorithm determines admissible graph A(f, ℓ*, dℓ) instead of A(f, ℓ, dℓ)

Proof of Lemma 7 using (cont.)ℓ*

- dℓ(w) =dℓ(v), ℓ(w,v) =0 and ℓ’(v,w) =0
- ℓ(w,v) =0 uf(w,v) ≥ 3Δ
- ℓ’(v,w) =0 uf’(v,w) ≥ 3Δ
- (w,v) is in A(f, ℓ*, dℓ) pushing a flow (at most Δ) increased uf’(v,w)
- uf(v,w) ≥ 2Δ
- Either (v,w) is a special arc before augmentation or uf(v,w) ≥ 3Δ
- (v,w) is in A(f, ℓ*, dℓ) - contradiction

12 (cont.)

16

20

9

T

4

S

10

7

4

13

14

Examplewhile F ≥ 1 do

Compute Δ,ℓ, dℓ

while (S,T) > F /2

Compute ℓ*

Find A(f, ℓ*, dℓ)

Contract SCC of A

Find a flow f*

f’ = f + f*

Extend f* to G

Recompute ℓ,dℓ,Gf’

Update F

- n = 6, m = 10
- U = 20
- F = 29
- α = min{m½, n ⅔ } = 4
- Δ = F /α=8

12 (cont.)

1

1

4/12

2

1

2

1

Gf :

Af :

1

1

4/16

1

16

20

4/20

1

1

1

9

0

0

4

3

3

10

7

1

1

4

1

1

4/4

13

4/13

1

1

1

1

2

1

2

1

14

4/14

Example (cont.)while F ≥ 1 do

Compute Δ,ℓ, dℓ

while (S,T) > F /2

Compute ℓ*

Find A(f, ℓ*, dℓ)

Contract SCC of A

Find a flow f*

f’ = f + f*

Extend f* to G

Recompute ℓ,dℓ,Gf’

Update F

F = 29.Δ=8

1 (cont.)

4

1

2

1

1

4

4

Gf ‘:

1

8

1

16

12

1

1

1

9

0

4

3

10

7

1

1

4

1

1

9

10

1

3

2

4

1

4

1

Example (cont.)while F ≥ 1 do

Compute Δ,ℓ, dℓ

while (S,T) > F /2

Compute ℓ*

Find A(f, ℓ*, dℓ)

Contract SCC of A

Find a flow f*

f’ = f + f*

Extend f* to G

Recompute ℓ,dℓ,Gf’

Update F

F = 29.Δ=8

(S,T) = 15

1 (cont.)

4

1

2

1

1

4

4

Gf ‘:

1

8

1

16

12

1

1

1

9

0

4

3

10

7

1

1

4

1

1

9

10

1

3

2

4

1

4

1

Example (cont.)while F ≥ 1 do

Compute Δ,ℓ, dℓ

while (S,T) > F /2

Compute ℓ*

Find A(f, ℓ*, dℓ)

Contract SCC of A

Find a flow f*

f’ = f + f*

Extend f* to G

Recompute ℓ,dℓ,Gf’

Update F

F = 29.Δ=8

1

8/8

2

1

Af’ :

1

8/12

8/16

1

0

3

0/4

0/7

1

1

1

3

2

0/10

1 (cont.)

4

1

1

12

12

Gf ‘:

1

12

1

8

4

1

1

1

9

0

4

4

10

7

1

1

4

1

1

9

10

1

3

2

4

1

4

1

Example (cont.)

while F ≥ 1 do

Compute Δ,ℓ, dℓ

while (S,T) > F /2

Compute ℓ*

Find A(f, ℓ*, dℓ)

Contract SCC of A

Find a flow f*

f’ = f + f*

Extend f* to G

Recompute ℓ,dℓ,Gf’

Update F

F = 29.Δ=8

(S,T) = 7 F = 7,Δ=2

0 (cont.)

0

0

0

12

12

Gf ‘:

0

12

0

8

4

0

0

0

9

0

4

0

10

7

0

1

4

0

0

9

10

0

0

0

4

0

4

0

0

0

0

0

12

12

Af ‘:

0

12

0

2/8

4

0

0

0

9

0

4

0

10

2/7

0

0

0

2/9

2/10

0

0

0

4

0

4

0

Example (cont.)while F ≥ 1 do

Compute Δ,ℓ, dℓ

while (S,T) > F /2

Compute ℓ*

Find A(f, ℓ*, dℓ)

Contract SCC of A

Find a flow f*

f’ = f + f*

Extend f* to G

Recompute ℓ,dℓ,Gf’

Update F

F = 7.Δ=2

0 (cont.)

1

0

0

12

14

Gf ‘:

0

12

0

6

4

0

1

1

0

9

0

4

1

10

5

2

0

1

4

1

1

7

8

0

1

1

6

0

6

0

Example (cont.)while F ≥ 1 do

Compute Δ,ℓ, dℓ

while (S,T) > F /2

Compute ℓ*

Find A(f, ℓ*, dℓ)

Contract SCC of A

Find a flow f*

f’ = f + f*

Extend f* to G

Recompute ℓ,dℓ,Gf’

Update F

F = 7.Δ=2

(S,T) = 5

0 (cont.)

1

0

0

12

14

Gf ‘:

0

12

0

6

4

0

1

0

0

9

0

4

1

10

5

2

0

1

4

1

0

7

8

0

1

1

6

0

6

0

1

0

0

12

12

Af ‘:

0

2/6

4

0

0

0

0

4

1

10

2/5

0

1

0

2/7

2/8

0

1

1

4

0

4

0

Example (cont.)while F ≥ 1 do

Compute Δ,ℓ, dℓ

while (S,T) > F /2

Compute ℓ*

Find A(f, ℓ*, dℓ)

Contract SCC of A

Find a flow f*

f’ = f + f*

Extend f* to G

Recompute ℓ,dℓ,Gf’

Update F

F = 7.Δ=2

0 (cont.)

1

0

0

12

16

Gf ‘:

0

12

0

4

4

0

1

1

0

9

0

4

2

10

3

4

1

1

4

1

1

5

6

0

1

1

8

0

8

Example (cont.)while F ≥ 1 do

Compute Δ,ℓ, dℓ

while (S,T) > F /2

Compute ℓ*

Find A(f, ℓ*, dℓ)

Contract SCC of A

Find a flow f*

f’ = f + f*

Extend f* to G

Recompute ℓ,dℓ,Gf’

Update F

0

F = 7.Δ=2

(S,T) = 3 F = 3,Δ=1

0 (cont.)

0

0

0

12

16

Gf ‘:

0

12

0

4

4

0

0

0

0

9

0

4

0

10

3

4

0

0

4

0

0

5

6

0

0

0

8

0

8

0

0

0

0

12

16

Af ‘:

0

12

0

1/4

4

0

0

0

0

9

0

4

0

10

1/3

4

0

0

4

0

0

1/5

1/6

0

0

0

8

0

Example (cont.)while F ≥ 1 do

Compute Δ,ℓ, dℓ

while (S,T) > F /2

Compute ℓ*

Find A(f, ℓ*, dℓ)

Contract SCC of A

Find a flow f*

f’ = f + f*

Extend f* to G

Recompute ℓ,dℓ,Gf’

Update F

F = 3.Δ=1

8

0 (cont.)

1

0

0

12

17

Gf ‘:

0

12

0

3

4

0

0

0

0

9

0

4

1

10

2

5

0

0

4

1

0

4

5

0

1

1

9

0

0

9

Example (cont.)

while F ≥ 1 do

Compute Δ,ℓ, dℓ

while (S,T) > F /2

Compute ℓ*

Find A(f, ℓ*, dℓ)

Contract SCC of A

Find a flow f*

f’ = f + f*

Extend f* to G

Recompute ℓ,dℓ,Gf’

Update F

F = 3.Δ=1

(S,T) = 2

0 (cont.)

1

0

0

12

17

Gf ‘:

0

12

0

3

4

0

0

0

0

9

0

4

1

10

2

5

0

0

4

1

0

4

5

0

1

1

9

0

0

9

1

0

0

12

17

Af ‘:

0

1/3

4

0

0

0

0

4

1

10

1/2

0

1

0

1/4

1/5

0

1

1

9

0

0

9

Example (cont.)

while F ≥ 1 do

Compute Δ,ℓ, dℓ

while (S,T) > F /2

Compute ℓ*

Find A(f, ℓ*, dℓ)

Contract SCC of A

Find a flow f*

f’ = f + f*

Extend f* to G

Recompute ℓ,dℓ,Gf’

Update F

F = 3.Δ=1

0 (cont.)

2

1

0

12

18

Gf ‘:

1

12

0

2

4

0

0

0

0

9

0

4

2

10

1

6

0

0

4

1

0

3

4

0

2

2

10

0

0

10

Example (cont.)

while F ≥ 1 do

Compute Δ,ℓ, dℓ

while (S,T) > F /2

Compute ℓ*

Find A(f, ℓ*, dℓ)

Contract SCC of A

Find a flow f*

f’ = f + f*

Extend f* to G

Recompute ℓ,dℓ,Gf’

Update F

F = 3.Δ=1

(S,T) = 1 F = 1,Δ=1

0 (cont.)

2

1

0

12

18

Gf ‘:

1

12

0

2

4

0

0

0

0

9

0

4

2

10

1

6

0

0

4

1

0

3

4

0

2

2

10

0

0

10

2

1

0

12

18

Af ‘:

0

1/2

4

0

0

0

0

4

2

10

1/1

0

1

0

1/3

1/4

0

2

2

10

0

0

10

Example (cont.)

while F ≥ 1 do

Compute Δ,ℓ, dℓ

while (S,T) > F /2

Compute ℓ*

Find A(f, ℓ*, dℓ)

Contract SCC of A

Find a flow f*

f’ = f + f*

Extend f* to G

Recompute ℓ,dℓ,Gf’

Update F

F = 1.Δ=1

Concluding Remarks (cont.)

- These results can be extended to a wide class of length functions (not binary) to obtain same time bounds
- Open issues:
- Can the flow decomposition bound be improved upon by a strongly polynomial algorithm? For example, O(αm(logn)O(1))
- Can these results be extended to obtain better bounds for the minimum-cost flow problem?

Unless you had enough

Computing (cont.)dℓin linear time

- We use Dial’s algorithm (1969):
- Init:
- Compute GT
- Mark t as “reached but not scanned”, Dist[t]=0
- Mark rest of the nodes as “not reached”, Dist[v]=INF, v ≠t

- Step 1:
- Choose a “reached but not scanned” node v with minimal Dist
- If no such node – compute G back and FINISH, else go to Step 2

- Init:

Dial’s algorithm (cont.) (cont.)

- Step 2:
- For each (v,w) :
- if Dist(w ) > Dist(v ) + ℓ(v,w), then
- Mark w as “reached but not scanned”
- Dist(w ) = Dist(v ) + ℓ(v,w)
- Add (v,w) to the output
- Remove all arcs (u,w) from the output, u≠ w

- if Dist(w ) > Dist(v ) + ℓ(v,w), then
- Mark v as “reached and scanned”
- Go to Step 1

- For each (v,w) :

a (cont.)

b

t

s

c

d

1

a

b

0

0

1

0

t

s

0

1

1

0

c

d

Dial’s algorithm Example1

G

0

0

1

0

1

0

1

1

0

GT

1

1 (cont.)

a

b

0

0

1

0

t

s

0

1

1

0

c

d

Dial’s algorithm Example (cont.)

1

Dist(b) > Dist(t) + ℓ(t,b)

RnS

0

b

1 (cont.)

a

b

0

0

1

0

t

s

0

1

1

0

c

d

Dial’s algorithm Example (cont.)

RS

1

Dist(d) > Dist(t) + ℓ(t,d)

RnS

1

d

1 (cont.)

1

a

b

0

0

1

0

t

s

0

1

1

0

c

d

Dial’s algorithm Example (cont.)

RnS

1

Dist(a) > Dist(b) + ℓ(b,a)

a

1 (cont.)

1

a

b

0

0

1

0

t

s

0

1

1

0

c

d

Dial’s algorithm Example (cont.)

Dist(d) > Dist(b) + ℓ(b,d)

RS

d

0

1 (cont.)

1

a

b

0

0

1

0

t

s

0

1

1

0

c

d

Dial’s algorithm Example (cont.)

Dist(c) > Dist(d) + ℓ(d,c)

RnS

0

c

RS

1 (cont.)

1

a

b

0

0

1

0

t

s

0

1

1

0

c

d

Dial’s algorithm Example (cont.)

RnS

1

Dist(s) > Dist(c) + ℓ(c,s)

s

1 (cont.)

1

a

b

0

0

1

0

t

s

0

1

1

0

c

d

Dial’s algorithm Example (cont.)

0

Dist(a) > Dist(c) + ℓ(c,a)

RS

a

1 (cont.)

1

a

b

0

0

1

0

t

s

0

1

1

0

c

d

Dial’s algorithm Example (cont.)

0

RS

Dist(s) > Dist(a) + ℓ(a,s)

s

1 (cont.)

1

a

b

0

0

1

0

t

s

0

1

1

0

c

d

Dial’s algorithm Example (cont.)

RS

Dist(s) > Dist(a) + ℓ(a,s)

Dial’s algorithm Running Time (cont.)

- Build GT – O(n+m)
- Each arc is examined once – O(m)
- By keeping bins for possible distances, perform Step 1 in linear time – O(nU)
- Total – O(m + nU)

References (cont.)

- “Beyond the Flow Decomposition Barrier”, A.V. Goldberg, Satish Rao
- “A Brief History Of Max-Flow”, R. Khandekar, K.Talwar
- “The maximum flow problem”, I. Hudson
- “Shortest-path forest with topological ordering”, R.B. Dial

Download Presentation

Connecting to Server..