combinatorial optimization and graph theory orco push ... · orco push-relabel algorithm zoltan...

264
Combinatorial Optimization and Graph Theory ORCO Push-Relabel Algorithm Zolt´ an Szigeti Z. Szigeti OCG-ORCO 1 / 29

Upload: others

Post on 01-Oct-2020

20 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Combinatorial Optimization and Graph TheoryORCO

Push-Relabel Algorithm

Zoltan Szigeti

Z. Szigeti OCG-ORCO 1 / 29

Page 2: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Max Flow Min Cut

Problem

Given

a directed graph D = (V ,A),a non-negative capacity function g on the arcs of D andtwo vertices s, t of D,

How to find

a g -feasible (s, t)-flow of maximum value andan (s, t)-cut of minimum capacity?

Reminder

(s, t)-flow: d−

x (v) = d+x (v) ∀v 6= s, t,

g -feasible: 0 ≤ x(e) ≤ g(e) ∀e ∈ A,

flow value: val(x) = d+x (s),

(s, t)-cut Z : s ∈ Z ⊆ V \ t,

capacity of (s, t)-cut Z : cap(Z ) = d+g (Z ).

Z. Szigeti OCG-ORCO 1 / 29

Page 3: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Algorithm of Edmonds-Karp

Algorithm of Edmonds-Karp

Input : Network (G , g) such that g ≥ 0 et s, t ∈ V : δ−(s) = ∅ = δ+(t).Output : feasible (s, t)-flow x and (s, t)-cut Z such that val(x) = cap(Z ).

❄✻

✲✻

✒✲❘s t

(1, 1)

(1, 1)

(1, 1)

(1, 1)

(1, 1)

(1, 2)

(1, 2)

(1, 2)

(0, 2)(0, 2)

(0, 2)(0, 2)

(1, 2)

Z

Z. Szigeti OCG-ORCO 2 / 29

Page 4: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Algorithm of Edmonds-Karp

Step 0: x0(e) = 0 ∀e ∈ A, i := 0.Step 1: Construct the auxiliary graph Gi := (V ,A1

i ∪ A2i ) where

A1i := {uv : uv ∈ A, xi (uv) < g(uv)} and

A2i := {vu : uv ∈ A, xi (uv) > 0}.

Step 2: Execute algorithm Breadth First Search on Gi and s to get Zi ⊆ Vand an s-arborescence Fi of Gi [Zi ] such that δ+Gi

(Zi) = ∅.Step 3: If t /∈ Zi then stop with x := xi and Z := Zi .Step 4: Otherwise, Pi := Fi [s, t], the unique (s, t)-path in Fi .Step 5: ε1i := min{g(uv)− xi (uv) : uv ∈ A(Pi) ∩ A1

i },ε2i := min{xi (uv) : vu ∈ A(Pi ) ∩ A2

i },εi := min{ε1i , ε

2i }.

Step 6: xi+1(uv) :=

xi(uv) + εi if uv ∈ A(Pi ) ∩ A1i

xi(uv)− εi if vu ∈ A(Pi ) ∩ A2i

xi(uv) otherwise.

Step 7: i := i + 1 and go to Step 1.

Z. Szigeti OCG-ORCO 3 / 29

Page 5: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of Edmonds-Karp algorithm

Example

Execute the algorithm of Edmonds-Karp to find a g -feasible (s, t)-flow ofmaximum value and an (s, t)-cut of minimum capacity in the followingnetworks:

✲ ✲s t3

2 133

✒❘

1

q✯

14

4

25s t

1

1

12

⑦❃

✲❄ ◆

2

3

7 7

4

5

6(a) (b)

Z. Szigeti OCG-ORCO 4 / 29

Page 6: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of Edmonds-Karp algorithm

✯✒

✯❥✲ ✲

✒❘

✯❥✲ ✲

✒❘

(0,4)

(0,4)

(0,1)

(0,1)

(0,1)(0,2)

(0,2)

(0,3)(0,3)

(0,3)

(0,5)4 1

s t s t

✯❥✲ ✲

✒❘

(1,4)

(0,4)

(1,1)

(0,1)

(0,1)(0,2)

(0,2)

(0,3)(0,3)

(0,3)

(0,5)

s t ✯

✲ ✲

✒❘

41

s t✠

✯❥✲ ✲

✒❘

(1,4)

(1,4)

(1,1)

(1,1)

(0,1)(0,2)

(0,2)

(0,3)(0,3)

(0,3)

(0,5)

s t ✯

✒❘s t✠

2

33

✲(x(e),g(e))

✲✲

A1

A2

P

ε = 1

ε = 1

ε = 2

(a)

Z. Szigeti OCG-ORCO 5 / 29

Page 7: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of Edmonds-Karp algorithm

✯❥✲ ✲

✒❘

(1,4)

(3,4)

(1,1)

(1,1)

(0,1)(2,2)

(0,2)

(0,3)(2,3)

(0,3)

(0,5)

s t ✯

✒✯

✒❘s t✠

✮ ❨

3 2

1

✯❥✲ ✲

✒❘

(2,4)

(3,4)

(1,1)

(1,1)

(1,1)(2,2)

(1,2)

(0,3)(2,3)

(0,3)

(0,5)

s t ✯

✒✯

✒s t✠

✮ ❨ ✮

✯❥✲ ✲

✒❘

(2,4)

(3,4)

(1,1)

(1,1)

(1,1)(2,2)

(1,2)

(0,3)(2,3)

(0,3)

(0,5)

s t

Z

ε = 1

Z. Szigeti OCG-ORCO 6 / 29

Page 8: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push-Relabel algorithm

Convention

Given

a directed graph D = (V ,A),a non-negative capacity function g on the arcs of D ,and two vertices s, t of D,

we will use the following convention :

If uv ∈ A and vu /∈ A, then g(vu) = 0 = x(vu).

u v

g(vu) = x(vu) = 0

Z. Szigeti OCG-ORCO 7 / 29

Page 9: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push-Relabel algorithm

Convention

Given

a directed graph D = (V ,A),a non-negative capacity function g on the arcs of D ,and two vertices s, t of D,

we will use the following convention :

If uv ∈ A and vu /∈ A, then g(vu) = 0 = x(vu).(As if the arc vu existed with capacity 0, but we do not add it.)

u v

g(vu) = x(vu) = 0

Z. Szigeti OCG-ORCO 7 / 29

Page 10: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Auxiliary digraph

Definition: auxiliary digraph

Given

a directed graph D = (V ,A),a non-negative capacity function g on the arcs of D ,and two vertices s, t of D,a g -feasible function x on A,

Define

Dx := (V ,Ax ) whereAx := {uv : x(uv) < g(uv) or x(vu) > 0}.

ts

(0, 1)

(2, 2)

(1, 1)

(0, 1)

(2, 2)

ts

Dx

Z. Szigeti OCG-ORCO 8 / 29

Page 11: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Auxiliary digraph

Definition: auxiliary digraph

Given

a directed graph D = (V ,A),a non-negative capacity function g on the arcs of D ,and two vertices s, t of D,a g -feasible function x on A,

Define

Dx := (V ,Ax ) whereAx := {uv : x(uv) < g(uv) or x(vu) > 0}.(As if x was a flow, but we do not add parallel arcs.)

ts

(0, 1)

(2, 2)

(1, 1)

(0, 1)

(2, 2)

ts

Dx

Z. Szigeti OCG-ORCO 8 / 29

Page 12: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Idea: Given a g -feasible function x ,

For uv ∈ Ax , we can push

g(uv)− x(uv) amount on uv and

x(vu) amount on vu;

without violating g -feasibility.

u v

x(vu)

x(uv)

u v

0

g(uv)

Z. Szigeti OCG-ORCO 9 / 29

Page 13: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Idea: Given a g -feasible function x ,

For uv ∈ Ax , we can push

g(uv)− x(uv) amount on uv and

x(vu) amount on vu;

without violating g -feasibility.(One of these arcs may not exist.)

u v

x(vu)

x(uv)

u v

0

g(uv)

Z. Szigeti OCG-ORCO 9 / 29

Page 14: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Idea: Given a g -feasible function x ,

For uv ∈ Ax , we can push

g(uv)− x(uv) amount on uv and

x(vu) amount on vu;

without violating g -feasibility.(One of these arcs may not exist.)

u v

x(vu)

x(uv)

u v

0

g(uv)

Definition

residual capacity: g(uv) := (g(uv)− x(uv)) + x(vu) ∀uv ∈ Ax .

Z. Szigeti OCG-ORCO 9 / 29

Page 15: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Idea: Given a g -feasible function x ,

For uv ∈ Ax , we can push

g(uv)− x(uv) amount on uv and

x(vu) amount on vu;

without violating g -feasibility.(One of these arcs may not exist.)

u v

x(vu)

x(uv)

u v

0

g(uv)

Definition

residual capacity: g(uv) := (g(uv)− x(uv)) + x(vu) ∀uv ∈ Ax .(This strictly positive value can be pushed from u to v.)

Z. Szigeti OCG-ORCO 9 / 29

Page 16: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Idea: Given a g -feasible function x ,

For uv ∈ Ax , we can push

g(uv)− x(uv) amount on uv and

x(vu) amount on vu;

without violating g -feasibility.(One of these arcs may not exist.)

u v

x(vu)

x(uv)

u v

0

g(uv)

Definition

residual capacity: g(uv) := (g(uv)− x(uv)) + x(vu) ∀uv ∈ Ax .(This strictly positive value can be pushed from u to v.)

Remark

Z. Szigeti OCG-ORCO 9 / 29

Page 17: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Idea: Given a g -feasible function x ,

For uv ∈ Ax , we can push

g(uv)− x(uv) amount on uv and

x(vu) amount on vu;

without violating g -feasibility.(One of these arcs may not exist.)

u v

x(vu)

x(uv)

u v

0

g(uv)

Definition

residual capacity: g(uv) := (g(uv)− x(uv)) + x(vu) ∀uv ∈ Ax .(This strictly positive value can be pushed from u to v.)

Remark

Advantage: local operation, not like flow augmentation.

Z. Szigeti OCG-ORCO 9 / 29

Page 18: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Idea: Given a g -feasible function x ,

For uv ∈ Ax , we can push

g(uv)− x(uv) amount on uv and

x(vu) amount on vu;

without violating g -feasibility.(One of these arcs may not exist.)

u v

x(vu)

x(uv)

u v

0

g(uv)

Definition

residual capacity: g(uv) := (g(uv)− x(uv)) + x(vu) ∀uv ∈ Ax .(This strictly positive value can be pushed from u to v.)

Remark

Advantage: local operation, not like flow augmentation.

Disadvantage: does not preserve flow conservation.

Z. Szigeti OCG-ORCO 9 / 29

Page 19: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Idea: Given a g -feasible function x ,

For uv ∈ Ax , we can push

g(uv)− x(uv) amount on uv and

x(vu) amount on vu;

without violating g -feasibility.(One of these arcs may not exist.)

u v

x(vu)

x(uv)

u v

0

g(uv)

Definition

residual capacity: g(uv) := (g(uv)− x(uv)) + x(vu) ∀uv ∈ Ax .(This strictly positive value can be pushed from u to v.)

Remark

Advantage: local operation, not like flow augmentation.

Disadvantage: does not preserve flow conservation.

We thus need the following more general framework.Z. Szigeti OCG-ORCO 9 / 29

Page 20: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Definition: function x on the arcs of D,

01 ts

1

03

4

b

a

Z. Szigeti OCG-ORCO 10 / 29

Page 21: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Definition: function x on the arcs of D,

x-excess at v : fx(v) := d−

x (v)− d+x (v),

01 ts

1

03

4

b

a

fx(a) = 4− 0 = 4

fx(b) = 4− 2 = 2

Z. Szigeti OCG-ORCO 10 / 29

Page 22: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Definition: function x on the arcs of D,

x-excess at v : fx(v) := d−

x (v)− d+x (v),

(s, t)-preflow: fx(v) ≥ 0 ∀v 6= s, t,

01 ts

1

03

4

b

a

fx(a) = 4− 0 = 4

fx(b) = 4− 2 = 2

x is an (s, t)-preflow.

Z. Szigeti OCG-ORCO 10 / 29

Page 23: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Definition: function x on the arcs of D,

x-excess at v : fx(v) := d−

x (v)− d+x (v),

(s, t)-preflow: fx(v) ≥ 0 ∀v 6= s, t,

x-active vertex: v 6= s, t such that fx(v) > 0.

01 ts

1

03

4

b

a

fx(a) = 4− 0 = 4 > 0 =⇒ a is active,

fx(b) = 4− 2 = 2 > 0 =⇒ b is active,

x is an (s, t)-preflow.

Z. Szigeti OCG-ORCO 10 / 29

Page 24: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Definition: function x on the arcs of D,

x-excess at v : fx(v) := d−

x (v)− d+x (v),

(s, t)-preflow: fx(v) ≥ 0 ∀v 6= s, t,

x-active vertex: v 6= s, t such that fx(v) > 0.

01 ts

1

03

4

b

a

fx(a) = 4− 0 = 4 > 0 =⇒ a is active,

fx(b) = 4− 2 = 2 > 0 =⇒ b is active,

x is an (s, t)-preflow.

Remark

An (s, t)-preflow x is an (s, t)-flow if and only if no x -active vertex exists.

Z. Szigeti OCG-ORCO 10 / 29

Page 25: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Operation Push:

Z. Szigeti OCG-ORCO 11 / 29

Page 26: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Operation Push:

Suppose that

x is a g -feasible (s, t)-preflow in D,uv ∈ Ax such that u is x-active.

(0, 1)(1, 4) ts

(1, 2)

(0, 4)(3, 3)

(4, 4)

b

a

fx (a) = d−

x (a)− d+x (a) = 4− 0 > 0

Z. Szigeti OCG-ORCO 11 / 29

Page 27: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Operation Push:

Suppose that

x is a g -feasible (s, t)-preflow in D,uv ∈ Ax such that u is x-active.

Modification of x :

(0, 1)(1, 4) ts

(1, 2)

(0, 4)(3, 3)

(4, 4)

b

a

fx (a) = d−

x (a)− d+x (a) = 4− 0 > 0

Z. Szigeti OCG-ORCO 11 / 29

Page 28: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Operation Push:

Suppose that

x is a g -feasible (s, t)-preflow in D,uv ∈ Ax such that u is x-active.

Modification of x :

ε := min{g(uv), fx (u)},

(0, 1)(1, 4) ts

(1, 2)

(0, 4)(3, 3)

(4, 4)

b

a

fx (a) = d−

x (a)− d+x (a) = 4− 0 > 0

ε = min{g(ab), fx (a)}

Z. Szigeti OCG-ORCO 11 / 29

Page 29: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Operation Push:

Suppose that

x is a g -feasible (s, t)-preflow in D,uv ∈ Ax such that u is x-active.

Modification of x :

ε := min{g(uv), fx (u)},

(0, 1)(1, 4) ts

(1, 2)

(0, 4)(3, 3)

(4, 4)

b

a

fx (a) = d−

x (a)− d+x (a) = 4− 0 > 0

g(ab) = g(ab)− x(ab) + x(ba) = 1− 0 + 1 = 2ε = min{g(ab), fx (a)}

Z. Szigeti OCG-ORCO 11 / 29

Page 30: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Operation Push:

Suppose that

x is a g -feasible (s, t)-preflow in D,uv ∈ Ax such that u is x-active.

Modification of x :

ε := min{g(uv), fx (u)},

(0, 1)(1, 4) ts

(1, 2)

(0, 4)(3, 3)

(4, 4)

b

a

fx (a) = d−

x (a)− d+x (a) = 4− 0 > 0

g(ab) = g(ab)− x(ab) + x(ba) = 1− 0 + 1 = 2ε = min{g(ab), fx (a)} = min{2, 4} = 2

Z. Szigeti OCG-ORCO 11 / 29

Page 31: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Operation Push:

Suppose that

x is a g -feasible (s, t)-preflow in D,uv ∈ Ax such that u is x-active.

Modification of x :

ε := min{g(uv), fx (u)},ε′ := min{x(vu), ε},

(0, 1)(1, 4) ts

(1, 2)

(0, 4)(3, 3)

(4, 4)

b

a

fx (a) = d−

x (a)− d+x (a) = 4− 0 > 0

g(ab) = g(ab)− x(ab) + x(ba) = 1− 0 + 1 = 2ε = min{g(ab), fx (a)} = min{2, 4} = 2

ε′ = min{x(ba), ε} = min{1, 2} = 1

Z. Szigeti OCG-ORCO 11 / 29

Page 32: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Operation Push:

Suppose that

x is a g -feasible (s, t)-preflow in D,uv ∈ Ax such that u is x-active.

Modification of x :

ε := min{g(uv), fx (u)},ε′ := min{x(vu), ε},x ′(vu) := x(vu)− ε′,

(0, 1)(1, 4) ts

(1, 2)

(0, 4)(3, 3)

(4, 4)

b

a

fx (a) = d−

x (a)− d+x (a) = 4− 0 > 0

g(ab) = g(ab)− x(ab) + x(ba) = 1− 0 + 1 = 2ε = min{g(ab), fx (a)} = min{2, 4} = 2

ε′ = min{x(ba), ε} = min{1, 2} = 1

(1, 1)(0, 4) ts

(1, 2)

(0, 4)(3, 3)

(4, 4)

b

a

Z. Szigeti OCG-ORCO 11 / 29

Page 33: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Operation Push:

Suppose that

x is a g -feasible (s, t)-preflow in D,uv ∈ Ax such that u is x-active.

Modification of x :

ε := min{g(uv), fx (u)},ε′ := min{x(vu), ε},x ′(vu) := x(vu)− ε′,x ′(uv) := x(uv) + ε− ε′.

(0, 1)(1, 4) ts

(1, 2)

(0, 4)(3, 3)

(4, 4)

b

a

fx (a) = d−

x (a)− d+x (a) = 4− 0 > 0

g(ab) = g(ab)− x(ab) + x(ba) = 1− 0 + 1 = 2ε = min{g(ab), fx (a)} = min{2, 4} = 2

ε′ = min{x(ba), ε} = min{1, 2} = 1

(1, 1)(0, 4) ts

(1, 2)

(0, 4)(3, 3)

(4, 4)

b

a

Z. Szigeti OCG-ORCO 11 / 29

Page 34: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Operation Push:

Suppose that

x is a g -feasible (s, t)-preflow in D,uv ∈ Ax such that u is x-active.

Modification of x :

ε := min{g(uv), fx (u)},ε′ := min{x(vu), ε},x ′(vu) := x(vu)− ε′,x ′(uv) := x(uv) + ε− ε′.x ′(e) := x(e) ∀e ∈ A \ {uv , vu}.

(0, 1)(1, 4) ts

(1, 2)

(0, 4)(3, 3)

(4, 4)

b

a

fx (a) = d−

x (a)− d+x (a) = 4− 0 > 0

g(ab) = g(ab)− x(ab) + x(ba) = 1− 0 + 1 = 2ε = min{g(ab), fx (a)} = min{2, 4} = 2

ε′ = min{x(ba), ε} = min{1, 2} = 1

(1, 1)(0, 4) ts

(1, 2)

(0, 4)(3, 3)

(4, 4)

b

a

Z. Szigeti OCG-ORCO 11 / 29

Page 35: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Lemma1 ε > 0,

2 ε′ ≥ 0.

3 x ′ is an (s, t)-preflow,

4 x ′ is g -feasible.

Z. Szigeti OCG-ORCO 12 / 29

Page 36: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Lemma1 ε > 0,

2 ε′ ≥ 0.

3 x ′ is an (s, t)-preflow,

4 x ′ is g -feasible.

Proof of (1)

Z. Szigeti OCG-ORCO 12 / 29

Page 37: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Lemma1 ε > 0,

2 ε′ ≥ 0.

3 x ′ is an (s, t)-preflow,

4 x ′ is g -feasible.

Proof of (1)

uv ∈ Ax =⇒ g(uv) > 0.

Z. Szigeti OCG-ORCO 12 / 29

Page 38: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Lemma1 ε > 0,

2 ε′ ≥ 0.

3 x ′ is an (s, t)-preflow,

4 x ′ is g -feasible.

Proof of (1)

uv ∈ Ax =⇒ g(uv) > 0.

u is x-active =⇒ fx(u) > 0.

Z. Szigeti OCG-ORCO 12 / 29

Page 39: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Lemma1 ε > 0,

2 ε′ ≥ 0.

3 x ′ is an (s, t)-preflow,

4 x ′ is g -feasible.

Proof of (1)

uv ∈ Ax =⇒ g(uv) > 0.

u is x-active =⇒ fx(u) > 0.

ε = min{g(uv), fx(u)} > 0.

Z. Szigeti OCG-ORCO 12 / 29

Page 40: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Lemma1 ε > 0,

2 ε′ ≥ 0.

3 x ′ is an (s, t)-preflow,

4 x ′ is g -feasible.

Proof of (1)

uv ∈ Ax =⇒ g(uv) > 0.

u is x-active =⇒ fx(u) > 0.

ε = min{g(uv), fx(u)} > 0.

Proof of (2)

Z. Szigeti OCG-ORCO 12 / 29

Page 41: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Lemma1 ε > 0,

2 ε′ ≥ 0.

3 x ′ is an (s, t)-preflow,

4 x ′ is g -feasible.

Proof of (1)

uv ∈ Ax =⇒ g(uv) > 0.

u is x-active =⇒ fx(u) > 0.

ε = min{g(uv), fx(u)} > 0.

Proof of (2)

x is g -feasible =⇒ x(vu) ≥ 0.

Z. Szigeti OCG-ORCO 12 / 29

Page 42: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Lemma1 ε > 0,

2 ε′ ≥ 0.

3 x ′ is an (s, t)-preflow,

4 x ′ is g -feasible.

Proof of (1)

uv ∈ Ax =⇒ g(uv) > 0.

u is x-active =⇒ fx(u) > 0.

ε = min{g(uv), fx(u)} > 0.

Proof of (2)

x is g -feasible =⇒ x(vu) ≥ 0.

ε′= min{x(vu), ε} ≥ 0.Z. Szigeti OCG-ORCO 12 / 29

Page 43: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (3)

u v

x(vu)

x(uv)

u v

x(vu)− ε′

x(uv) + ε− ε′

Z. Szigeti OCG-ORCO 13 / 29

Page 44: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (3)

For w ∈ V \ {s, t, u, v} :

u v

x(vu)

x(uv)

u v

x(vu)− ε′

x(uv) + ε− ε′

Z. Szigeti OCG-ORCO 13 / 29

Page 45: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (3)

For w ∈ V \ {s, t, u, v} : fx ′(w) = fx(w) ≥ 0,

u v

x(vu)

x(uv)

u v

x(vu)− ε′

x(uv) + ε− ε′

Z. Szigeti OCG-ORCO 13 / 29

Page 46: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (3)

For w ∈ V \ {s, t, u, v} : fx ′(w) = fx(w) ≥ 0,

For u :

u v

x(vu)

x(uv)

u v

x(vu)− ε′

x(uv) + ε− ε′

Z. Szigeti OCG-ORCO 13 / 29

Page 47: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (3)

For w ∈ V \ {s, t, u, v} : fx ′(w) = fx(w) ≥ 0,

For u : By definition, ε = min{g(uv), fx (u)} ≤ fx(u).

u v

x(vu)

x(uv)

u v

x(vu)− ε′

x(uv) + ε− ε′

Z. Szigeti OCG-ORCO 13 / 29

Page 48: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (3)

For w ∈ V \ {s, t, u, v} : fx ′(w) = fx(w) ≥ 0,

For u : By definition, ε = min{g(uv), fx (u)} ≤ fx(u). Thus

fx ′(u) = d−

x ′(u)− d+x ′(u)

u v

x(vu)

x(uv)

u v

x(vu)− ε′

x(uv) + ε− ε′

Z. Szigeti OCG-ORCO 13 / 29

Page 49: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (3)

For w ∈ V \ {s, t, u, v} : fx ′(w) = fx(w) ≥ 0,

For u : By definition, ε = min{g(uv), fx (u)} ≤ fx(u). Thus

fx ′(u) = d−

x ′(u)− d+x ′(u)

= (d−

x (u)− ε′)

u v

x(vu)

x(uv)

u v

x(vu)− ε′

x(uv) + ε− ε′

Z. Szigeti OCG-ORCO 13 / 29

Page 50: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (3)

For w ∈ V \ {s, t, u, v} : fx ′(w) = fx(w) ≥ 0,

For u : By definition, ε = min{g(uv), fx (u)} ≤ fx(u). Thus

fx ′(u) = d−

x ′(u)− d+x ′(u)

= (d−

x (u)− ε′) −(d+x (u) + ε− ε′)

u v

x(vu)

x(uv)

u v

x(vu)− ε′

x(uv) + ε− ε′

Z. Szigeti OCG-ORCO 13 / 29

Page 51: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (3)

For w ∈ V \ {s, t, u, v} : fx ′(w) = fx(w) ≥ 0,

For u : By definition, ε = min{g(uv), fx (u)} ≤ fx(u). Thus

fx ′(u) = d−

x ′(u)− d+x ′(u)

= (d−

x (u)− ε′) −(d+x (u) + ε− ε′)

= fx(u)− ε

u v

x(vu)

x(uv)

u v

x(vu)− ε′

x(uv) + ε− ε′

Z. Szigeti OCG-ORCO 13 / 29

Page 52: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (3)

For w ∈ V \ {s, t, u, v} : fx ′(w) = fx(w) ≥ 0,

For u : By definition, ε = min{g(uv), fx (u)} ≤ fx(u). Thus

fx ′(u) = d−

x ′(u)− d+x ′(u)

= (d−

x (u)− ε′) −(d+x (u) + ε− ε′)

= fx(u)− ε ≥ 0.

u v

x(vu)

x(uv)

u v

x(vu)− ε′

x(uv) + ε− ε′

Z. Szigeti OCG-ORCO 13 / 29

Page 53: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (3)

For w ∈ V \ {s, t, u, v} : fx ′(w) = fx(w) ≥ 0,

For u : By definition, ε = min{g(uv), fx (u)} ≤ fx(u). Thus

fx ′(u) = d−

x ′(u)− d+x ′(u)

= (d−

x (u)− ε′) −(d+x (u) + ε− ε′)

= fx(u)− ε ≥ 0.

For v :

u v

x(vu)

x(uv)

u v

x(vu)− ε′

x(uv) + ε− ε′

Z. Szigeti OCG-ORCO 13 / 29

Page 54: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (3)

For w ∈ V \ {s, t, u, v} : fx ′(w) = fx(w) ≥ 0,

For u : By definition, ε = min{g(uv), fx (u)} ≤ fx(u). Thus

fx ′(u) = d−

x ′(u)− d+x ′(u)

= (d−

x (u)− ε′) −(d+x (u) + ε− ε′)

= fx(u)− ε ≥ 0.

For v :

fx ′(v) = d−

x ′(v)− d+x ′(v)

u v

x(vu)

x(uv)

u v

x(vu)− ε′

x(uv) + ε− ε′

Z. Szigeti OCG-ORCO 13 / 29

Page 55: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (3)

For w ∈ V \ {s, t, u, v} : fx ′(w) = fx(w) ≥ 0,

For u : By definition, ε = min{g(uv), fx (u)} ≤ fx(u). Thus

fx ′(u) = d−

x ′(u)− d+x ′(u)

= (d−

x (u)− ε′) −(d+x (u) + ε− ε′)

= fx(u)− ε ≥ 0.

For v :

fx ′(v) = d−

x ′(v)− d+x ′(v)

= (d−

x (v) + ε− ε′)

u v

x(vu)

x(uv)

u v

x(vu)− ε′

x(uv) + ε− ε′

Z. Szigeti OCG-ORCO 13 / 29

Page 56: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (3)

For w ∈ V \ {s, t, u, v} : fx ′(w) = fx(w) ≥ 0,

For u : By definition, ε = min{g(uv), fx (u)} ≤ fx(u). Thus

fx ′(u) = d−

x ′(u)− d+x ′(u)

= (d−

x (u)− ε′) −(d+x (u) + ε− ε′)

= fx(u)− ε ≥ 0.

For v :

fx ′(v) = d−

x ′(v)− d+x ′(v)

= (d−

x (v) + ε− ε′) −(d+x (v)− ε′)

u v

x(vu)

x(uv)

u v

x(vu)− ε′

x(uv) + ε− ε′

Z. Szigeti OCG-ORCO 13 / 29

Page 57: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (3)

For w ∈ V \ {s, t, u, v} : fx ′(w) = fx(w) ≥ 0,

For u : By definition, ε = min{g(uv), fx (u)} ≤ fx(u). Thus

fx ′(u) = d−

x ′(u)− d+x ′(u)

= (d−

x (u)− ε′) −(d+x (u) + ε− ε′)

= fx(u)− ε ≥ 0.

For v :

fx ′(v) = d−

x ′(v)− d+x ′(v)

= (d−

x (v) + ε− ε′) −(d+x (v)− ε′)

= fx(v) + ε

u v

x(vu)

x(uv)

u v

x(vu)− ε′

x(uv) + ε− ε′

Z. Szigeti OCG-ORCO 13 / 29

Page 58: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (3)

For w ∈ V \ {s, t, u, v} : fx ′(w) = fx(w) ≥ 0,

For u : By definition, ε = min{g(uv), fx (u)} ≤ fx(u). Thus

fx ′(u) = d−

x ′(u)− d+x ′(u)

= (d−

x (u)− ε′) −(d+x (u) + ε− ε′)

= fx(u)− ε ≥ 0.

For v : Since x is an (s, t)-preflow and by (1),

fx ′(v) = d−

x ′(v)− d+x ′(v)

= (d−

x (v) + ε− ε′) −(d+x (v)− ε′)

= fx(v) + ε ≥ 0.

u v

x(vu)

x(uv)

u v

x(vu)− ε′

x(uv) + ε− ε′

Z. Szigeti OCG-ORCO 13 / 29

Page 59: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 60: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} :

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 61: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : x ′(e)

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 62: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : x(e) = x ′(e)

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 63: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e)

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 64: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e)

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 65: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 66: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv :

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 67: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : x ′(uv).

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 68: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : x(uv) + ε− ε′ = x ′(uv).

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 69: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 70: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 71: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) :

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 72: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) :

if ε′ = ε :

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 73: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) : x ′(uv)

if ε′ = ε :

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 74: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) : x ′(uv) = x(uv) + ε− ε′

if ε′ = ε :

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 75: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) : x ′(uv) = x(uv) + ε− ε′ ≤ x(uv)

if ε′ = ε :

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 76: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) : x ′(uv) = x(uv) + ε− ε′ ≤ x(uv) + g(uv)

if ε′ = ε :

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 77: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) : x ′(uv) = x(uv) + ε− ε′ ≤ x(uv) + g(uv) − x(vu)

if ε′ = ε :

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 78: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) : x ′(uv) = x(uv) + ε− ε′ ≤ x(uv) + g(uv) − x(vu) = g(uv).

if ε′ = ε :

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 79: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) : x ′(uv) = x(uv) + ε− ε′ ≤ x(uv) + g(uv) − x(vu) = g(uv).

if ε′ = ε : x ′(uv)

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 80: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) : x ′(uv) = x(uv) + ε− ε′ ≤ x(uv) + g(uv) − x(vu) = g(uv).

if ε′ = ε : x ′(uv) = x(uv) + ε− ε′

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 81: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) : x ′(uv) = x(uv) + ε− ε′ ≤ x(uv) + g(uv) − x(vu) = g(uv).

if ε′ = ε : x ′(uv) = x(uv) + ε− ε′ = x(uv)

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 82: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) : x ′(uv) = x(uv) + ε− ε′ ≤ x(uv) + g(uv) − x(vu) = g(uv).

if ε′ = ε : x ′(uv) = x(uv) + ε− ε′ = x(uv) ≤ g(uv).

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 83: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) : x ′(uv) = x(uv) + ε− ε′ ≤ x(uv) + g(uv) − x(vu) = g(uv).

if ε′ = ε : x ′(uv) = x(uv) + ε− ε′ = x(uv) ≤ g(uv).

For vu :

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 84: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) : x ′(uv) = x(uv) + ε− ε′ ≤ x(uv) + g(uv) − x(vu) = g(uv).

if ε′ = ε : x ′(uv) = x(uv) + ε− ε′ = x(uv) ≤ g(uv).

For vu : x ′(vu)

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 85: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) : x ′(uv) = x(uv) + ε− ε′ ≤ x(uv) + g(uv) − x(vu) = g(uv).

if ε′ = ε : x ′(uv) = x(uv) + ε− ε′ = x(uv) ≤ g(uv).

For vu : x(vu)− ε′ = x ′(vu)

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 86: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) : x ′(uv) = x(uv) + ε− ε′ ≤ x(uv) + g(uv) − x(vu) = g(uv).

if ε′ = ε : x ′(uv) = x(uv) + ε− ε′ = x(uv) ≤ g(uv).

For vu : 0 ≤ x(vu)− ε′ = x ′(vu)

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 87: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) : x ′(uv) = x(uv) + ε− ε′ ≤ x(uv) + g(uv) − x(vu) = g(uv).

if ε′ = ε : x ′(uv) = x(uv) + ε− ε′ = x(uv) ≤ g(uv).

For vu : 0 ≤ x(vu)− ε′ = x ′(vu) = x(vu)− ε′

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 88: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Proof of (4)

For e ∈ A \ {uv , vu} : 0 ≤ x(e) = x ′(e) = x(e) ≤ g(e),

For uv : 0 ≤ x(uv) ≤ x(uv) + ε− ε′ = x ′(uv).

if ε′ = x(vu) : x ′(uv) = x(uv) + ε− ε′ ≤ x(uv) + g(uv) − x(vu) = g(uv).

if ε′ = ε : x ′(uv) = x(uv) + ε− ε′ = x(uv) ≤ g(uv).

For vu : by (1), 0 ≤ x(vu)− ε′ = x ′(vu) = x(vu)− ε′ ≤ g(vu).

Reminder

ε′ = min{x(vu), ε}

ε = min{g(uv), fx(u)}

x ′(uv) = x(uv) + ε− ε′

x ′(vu) = x(vu)− ε′

g(uv) = g(uv)− x(uv) + x(vu)

Z. Szigeti OCG-ORCO 14 / 29

Page 89: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Example

When one can not push forward, only backward.

Z. Szigeti OCG-ORCO 15 / 29

Page 90: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Example

When one can not push forward, only backward.

(D, x , g)

s tu

(2, 2) (1, 1)

Z. Szigeti OCG-ORCO 15 / 29

Page 91: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Example

When one can not push forward, only backward.

(D, x , g)

s tu

(2, 2) (1, 1)

fx(u) = d−

x (u)− d+x (u) = 2− 1 = 1 > 0

Z. Szigeti OCG-ORCO 15 / 29

Page 92: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Example

When one can not push forward, only backward.

(D, x , g) Dx

s tu

(2, 2) (1, 1)s t

u

fx(u) = d−

x (u)− d+x (u) = 2− 1 = 1 > 0

Z. Szigeti OCG-ORCO 15 / 29

Page 93: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Example

When one can not push forward, only backward.

(D, x , g) Dx

s tu

(2, 2) (1, 1)s t

u

fx(u) = d−

x (u)− d+x (u) = 2− 1 = 1 > 0

g(us) = g(us)− x(us) + x(su) = 0− 0 + 2 = 2

Z. Szigeti OCG-ORCO 15 / 29

Page 94: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Example

When one can not push forward, only backward.

(D, x , g) Dx

s tu

(2, 2) (1, 1)s t

u

fx(u) = d−

x (u)− d+x (u) = 2− 1 = 1 > 0

g(us) = g(us)− x(us) + x(su) = 0− 0 + 2 = 2

ε = min{g(us), fx (u)} = min{2, 1} = 1

Z. Szigeti OCG-ORCO 15 / 29

Page 95: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Example

When one can not push forward, only backward.

(D, x , g) Dx

s tu

(2, 2) (1, 1)s t

u

fx(u) = d−

x (u)− d+x (u) = 2− 1 = 1 > 0

g(us) = g(us)− x(us) + x(su) = 0− 0 + 2 = 2

ε = min{g(us), fx (u)} = min{2, 1} = 1

ε′ = min{x(su), ε} = min{2, 1} = 1

Z. Szigeti OCG-ORCO 15 / 29

Page 96: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Example

When one can not push forward, only backward.

(D, x , g) Dx

s tu

(2, 2) (1, 1)s t

u

fx(u) = d−

x (u)− d+x (u) = 2− 1 = 1 > 0

g(us) = g(us)− x(us) + x(su) = 0− 0 + 2 = 2

ε = min{g(us), fx (u)} = min{2, 1} = 1

ε′ = min{x(su), ε} = min{2, 1} = 1

x ′(us) = x(us) + ε− ε′ = 0 + 1− 1 = 0

Z. Szigeti OCG-ORCO 15 / 29

Page 97: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push

Example

When one can not push forward, only backward.

(D, x , g) Dx (D, x ′, g)

s tu

(2, 2) (1, 1)s t

us t

u

(1, 2) (1, 1)

fx(u) = d−

x (u)− d+x (u) = 2− 1 = 1 > 0

g(us) = g(us)− x(us) + x(su) = 0− 0 + 2 = 2

ε = min{g(us), fx (u)} = min{2, 1} = 1

ε′ = min{x(su), ε} = min{2, 1} = 1

x ′(us) = x(us) + ε− ε′ = 0 + 1− 1 = 0

x ′(su) = x(su)− ε′ = 2− 1 = 1

Z. Szigeti OCG-ORCO 15 / 29

Page 98: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Labelling

Question

In the previous example we could not push forward.

What does forward mean ?

Z. Szigeti OCG-ORCO 16 / 29

Page 99: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Labelling

Question

In the previous example we could not push forward.

What does forward mean ?

Definition

For the auxiliary graph Dx = (V ,Ax) of a g -feasible (s, t)-preflow x ,x-valid (s, t)-labelling: ℓ : V → Z+ such that

1 ℓ(s) = |V |,

2 ℓ(t) = 0,

3 ℓ(u) ≤ℓ(v) + 1 ∀uv ∈ Ax .

(0, 1)(2, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a

ts

b

a1

0

2

4

Z. Szigeti OCG-ORCO 16 / 29

Page 100: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Initialization

Given a network (D, g , s, t):

Z. Szigeti OCG-ORCO 17 / 29

Page 101: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Initialization

Given a network (D, g , s, t):1 (s, t)-preflow x :

(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a

Z. Szigeti OCG-ORCO 17 / 29

Page 102: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Initialization

Given a network (D, g , s, t):1 (s, t)-preflow x :

1 x(sv) := g(sv) ∀sv ∈ A,(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a

Z. Szigeti OCG-ORCO 17 / 29

Page 103: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Initialization

Given a network (D, g , s, t):1 (s, t)-preflow x :

1 x(sv) := g(sv) ∀sv ∈ A,2 x(uv) := 0 ∀uv ∈ A, u 6= s. (0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a

Z. Szigeti OCG-ORCO 17 / 29

Page 104: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Initialization

Given a network (D, g , s, t):1 (s, t)-preflow x :

1 x(sv) := g(sv) ∀sv ∈ A,2 x(uv) := 0 ∀uv ∈ A, u 6= s.

2 (s, t)-Labelling ℓ :

(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a

ts

b

a0

0

0

4

Z. Szigeti OCG-ORCO 17 / 29

Page 105: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Initialization

Given a network (D, g , s, t):1 (s, t)-preflow x :

1 x(sv) := g(sv) ∀sv ∈ A,2 x(uv) := 0 ∀uv ∈ A, u 6= s.

2 (s, t)-Labelling ℓ :1 ℓ(s) := |V |,

(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a

ts

b

a0

0

0

4

Z. Szigeti OCG-ORCO 17 / 29

Page 106: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Initialization

Given a network (D, g , s, t):1 (s, t)-preflow x :

1 x(sv) := g(sv) ∀sv ∈ A,2 x(uv) := 0 ∀uv ∈ A, u 6= s.

2 (s, t)-Labelling ℓ :1 ℓ(s) := |V |,2 ℓ(v) := 0 ∀v 6= s.

(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a

ts

b

a0

0

0

4

Z. Szigeti OCG-ORCO 17 / 29

Page 107: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Initialization

Given a network (D, g , s, t):1 (s, t)-preflow x :

1 x(sv) := g(sv) ∀sv ∈ A,2 x(uv) := 0 ∀uv ∈ A, u 6= s.

2 (s, t)-Labelling ℓ :1 ℓ(s) := |V |,2 ℓ(v) := 0 ∀v 6= s.

(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a

ts

b

a0

0

0

4

Lemma

Z. Szigeti OCG-ORCO 17 / 29

Page 108: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Initialization

Given a network (D, g , s, t):1 (s, t)-preflow x :

1 x(sv) := g(sv) ∀sv ∈ A,2 x(uv) := 0 ∀uv ∈ A, u 6= s.

2 (s, t)-Labelling ℓ :1 ℓ(s) := |V |,2 ℓ(v) := 0 ∀v 6= s.

(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a

ts

b

a0

0

0

4

Lemma1 x is a g -feasible (s, t)-preflow,

Z. Szigeti OCG-ORCO 17 / 29

Page 109: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Initialization

Given a network (D, g , s, t):1 (s, t)-preflow x :

1 x(sv) := g(sv) ∀sv ∈ A,2 x(uv) := 0 ∀uv ∈ A, u 6= s.

2 (s, t)-Labelling ℓ :1 ℓ(s) := |V |,2 ℓ(v) := 0 ∀v 6= s.

(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a

ts

b

a0

0

0

4

Lemma1 x is a g -feasible (s, t)-preflow,

2 ℓ is a x-valid (s, t)-labelling.

Z. Szigeti OCG-ORCO 17 / 29

Page 110: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Lemma1 x is a g -feasible (s, t)-preflow,

2 ℓ is a x-valid (s, t)-labelling.

Proof

Z. Szigeti OCG-ORCO 18 / 29

Page 111: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Lemma1 x is a g -feasible (s, t)-preflow,

2 ℓ is a x-valid (s, t)-labelling.

Proof

1 fx(v) = d−

x (v)− d+x (v) ≥ 0− 0 = 0 ∀v ∈ V \ {s, t},

Z. Szigeti OCG-ORCO 18 / 29

Page 112: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Lemma1 x is a g -feasible (s, t)-preflow,

2 ℓ is a x-valid (s, t)-labelling.

Proof

1 fx(v) = d−

x (v)− d+x (v) ≥ 0− 0 = 0 ∀v ∈ V \ {s, t},

thus x is an (s, t)-preflow.

Z. Szigeti OCG-ORCO 18 / 29

Page 113: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Lemma1 x is a g -feasible (s, t)-preflow,

2 ℓ is a x-valid (s, t)-labelling.

Proof1 By g ≥ 0,

1 fx(v) = d−

x (v)− d+x (v) ≥ 0− 0 = 0 ∀v ∈ V \ {s, t},

thus x is an (s, t)-preflow.2 0 ≤ min{0, g(uv)} ≤ x(uv) ≤ max{0, g(uv)} ≤ g(uv),

Z. Szigeti OCG-ORCO 18 / 29

Page 114: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Lemma1 x is a g -feasible (s, t)-preflow,

2 ℓ is a x-valid (s, t)-labelling.

Proof1 By g ≥ 0,

1 fx(v) = d−

x (v)− d+x (v) ≥ 0− 0 = 0 ∀v ∈ V \ {s, t},

thus x is an (s, t)-preflow.2 0 ≤ min{0, g(uv)} ≤ x(uv) ≤ max{0, g(uv)} ≤ g(uv),

thus x is g -feasible.

Z. Szigeti OCG-ORCO 18 / 29

Page 115: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Lemma1 x is a g -feasible (s, t)-preflow,

2 ℓ is a x-valid (s, t)-labelling.

Proof1 By g ≥ 0,

1 fx(v) = d−

x (v)− d+x (v) ≥ 0− 0 = 0 ∀v ∈ V \ {s, t},

thus x is an (s, t)-preflow.2 0 ≤ min{0, g(uv)} ≤ x(uv) ≤ max{0, g(uv)} ≤ g(uv),

thus x is g -feasible.

2 By initialization,

Z. Szigeti OCG-ORCO 18 / 29

Page 116: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Lemma1 x is a g -feasible (s, t)-preflow,

2 ℓ is a x-valid (s, t)-labelling.

Proof1 By g ≥ 0,

1 fx(v) = d−

x (v)− d+x (v) ≥ 0− 0 = 0 ∀v ∈ V \ {s, t},

thus x is an (s, t)-preflow.2 0 ≤ min{0, g(uv)} ≤ x(uv) ≤ max{0, g(uv)} ≤ g(uv),

thus x is g -feasible.

2 By initialization,1 ℓ(s) = |V |,

Z. Szigeti OCG-ORCO 18 / 29

Page 117: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Lemma1 x is a g -feasible (s, t)-preflow,

2 ℓ is a x-valid (s, t)-labelling.

Proof1 By g ≥ 0,

1 fx(v) = d−

x (v)− d+x (v) ≥ 0− 0 = 0 ∀v ∈ V \ {s, t},

thus x is an (s, t)-preflow.2 0 ≤ min{0, g(uv)} ≤ x(uv) ≤ max{0, g(uv)} ≤ g(uv),

thus x is g -feasible.

2 By initialization,1 ℓ(s) = |V |,2 ℓ(t) = 0,

Z. Szigeti OCG-ORCO 18 / 29

Page 118: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Lemma1 x is a g -feasible (s, t)-preflow,

2 ℓ is a x-valid (s, t)-labelling.

Proof1 By g ≥ 0,

1 fx(v) = d−

x (v)− d+x (v) ≥ 0− 0 = 0 ∀v ∈ V \ {s, t},

thus x is an (s, t)-preflow.2 0 ≤ min{0, g(uv)} ≤ x(uv) ≤ max{0, g(uv)} ≤ g(uv),

thus x is g -feasible.

2 By initialization,1 ℓ(s) = |V |,2 ℓ(t) = 0,3 x(sv) = g(sv) and x(us) = 0,

Z. Szigeti OCG-ORCO 18 / 29

Page 119: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Lemma1 x is a g -feasible (s, t)-preflow,

2 ℓ is a x-valid (s, t)-labelling.

Proof1 By g ≥ 0,

1 fx(v) = d−

x (v)− d+x (v) ≥ 0− 0 = 0 ∀v ∈ V \ {s, t},

thus x is an (s, t)-preflow.2 0 ≤ min{0, g(uv)} ≤ x(uv) ≤ max{0, g(uv)} ≤ g(uv),

thus x is g -feasible.

2 By initialization,1 ℓ(s) = |V |,2 ℓ(t) = 0,3 x(sv) = g(sv) and x(us) = 0, hence there exists no sv ∈ Ax .

Z. Szigeti OCG-ORCO 18 / 29

Page 120: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Initialization

Lemma1 x is a g -feasible (s, t)-preflow,

2 ℓ is a x-valid (s, t)-labelling.

Proof1 By g ≥ 0,

1 fx(v) = d−

x (v)− d+x (v) ≥ 0− 0 = 0 ∀v ∈ V \ {s, t},

thus x is an (s, t)-preflow.2 0 ≤ min{0, g(uv)} ≤ x(uv) ≤ max{0, g(uv)} ≤ g(uv),

thus x is g -feasible.

2 By initialization,1 ℓ(s) = |V |,2 ℓ(t) = 0,3 x(sv) = g(sv) and x(us) = 0, hence there exists no sv ∈ Ax . Thus

ℓ(u) = 0 ≤ 1 ≤ ℓ(v) + 1 ∀uv ∈ Ax .

Z. Szigeti OCG-ORCO 18 / 29

Page 121: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Labelling

Example

There exists g -feasible (s, t)-preflows with no x -valid (s, t)-labelling.

Z. Szigeti OCG-ORCO 19 / 29

Page 122: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Labelling

Example

There exists g -feasible (s, t)-preflows with no x -valid (s, t)-labelling.

(D, x , g)

s t(0, 1)

Z. Szigeti OCG-ORCO 19 / 29

Page 123: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Labelling

Example

There exists g -feasible (s, t)-preflows with no x -valid (s, t)-labelling.

(D, x , g) Dx

s t(0, 1)

s t

Z. Szigeti OCG-ORCO 19 / 29

Page 124: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Labelling

Example

There exists g -feasible (s, t)-preflows with no x -valid (s, t)-labelling.

1 Suppose that ℓ is an x -valid (s, t)-labelling.

(D, x , g) Dx

s t(0, 1)

s t

Z. Szigeti OCG-ORCO 19 / 29

Page 125: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Labelling

Example

There exists g -feasible (s, t)-preflows with no x -valid (s, t)-labelling.

1 Suppose that ℓ is an x -valid (s, t)-labelling.

2 2 = |V | = ℓ(s) ≤ ℓ(t) + 1 = 0 + 1 = 1, contradiction.

(D, x , g) Dx

s t(0, 1)

s t

Z. Szigeti OCG-ORCO 19 / 29

Page 126: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Saturated cut

Lemma

Let x be a g -feasible (s, t)-preflow and ℓ an x -valid (s, t)-labelling.

Z. Szigeti OCG-ORCO 20 / 29

Page 127: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Saturated cut

Lemma

Let x be a g -feasible (s, t)-preflow and ℓ an x -valid (s, t)-labelling.

There exists a saturated (s, t)-cut Z :

Z. Szigeti OCG-ORCO 20 / 29

Page 128: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Saturated cut

Lemma

Let x be a g -feasible (s, t)-preflow and ℓ an x -valid (s, t)-labelling.

There exists a saturated (s, t)-cut Z :d+x (Z )− d−

x (Z ) = d+g (Z )− d−

0 (Z ) (= capg (Z )).

Z. Szigeti OCG-ORCO 20 / 29

Page 129: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Saturated cut

Lemma

Let x be a g -feasible (s, t)-preflow and ℓ an x -valid (s, t)-labelling.

There exists a saturated (s, t)-cut Z :d+x (Z )− d−

x (Z ) = d+g (Z )− d−

0 (Z ) (= capg (Z )).

Proof

Z. Szigeti OCG-ORCO 20 / 29

Page 130: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Saturated cut

Lemma

Let x be a g -feasible (s, t)-preflow and ℓ an x -valid (s, t)-labelling.

There exists a saturated (s, t)-cut Z :d+x (Z )− d−

x (Z ) = d+g (Z )− d−

0 (Z ) (= capg (Z )).

Proof1 Since the n vertices of V can not take the n + 1 values between 0

and n, there exists a value 0 < k < n such that ℓ(v) 6= k ∀v ∈ V .

Z. Szigeti OCG-ORCO 20 / 29

Page 131: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Saturated cut

Lemma

Let x be a g -feasible (s, t)-preflow and ℓ an x -valid (s, t)-labelling.

There exists a saturated (s, t)-cut Z :d+x (Z )− d−

x (Z ) = d+g (Z )− d−

0 (Z ) (= capg (Z )).

Proof1 Since the n vertices of V can not take the n + 1 values between 0

and n, there exists a value 0 < k < n such that ℓ(v) 6= k ∀v ∈ V .

2 Let Z := {v ∈ V : ℓ(v) > k}.

Z. Szigeti OCG-ORCO 20 / 29

Page 132: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Saturated cut

Lemma

Let x be a g -feasible (s, t)-preflow and ℓ an x -valid (s, t)-labelling.

There exists a saturated (s, t)-cut Z :d+x (Z )− d−

x (Z ) = d+g (Z )− d−

0 (Z ) (= capg (Z )).

Proof1 Since the n vertices of V can not take the n + 1 values between 0

and n, there exists a value 0 < k < n such that ℓ(v) 6= k ∀v ∈ V .

2 Let Z := {v ∈ V : ℓ(v) > k}.

3 Z is an (s, t)-cut: s ∈ Z , t /∈ Z since ℓ(s) = n > k > 0 = ℓ(t).

Z. Szigeti OCG-ORCO 20 / 29

Page 133: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Saturated cut

Lemma

Let x be a g -feasible (s, t)-preflow and ℓ an x -valid (s, t)-labelling.

There exists a saturated (s, t)-cut Z :d+x (Z )− d−

x (Z ) = d+g (Z )− d−

0 (Z ) (= capg (Z )).

Proof1 Since the n vertices of V can not take the n + 1 values between 0

and n, there exists a value 0 < k < n such that ℓ(v) 6= k ∀v ∈ V .

2 Let Z := {v ∈ V : ℓ(v) > k}.

3 Z is an (s, t)-cut: s ∈ Z , t /∈ Z since ℓ(s) = n > k > 0 = ℓ(t).

4 d+x (Z )− d−

x (Z ) = d+g (Z )− d−

0 (Z );

Z. Szigeti OCG-ORCO 20 / 29

Page 134: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Saturated cut

Lemma

Let x be a g -feasible (s, t)-preflow and ℓ an x -valid (s, t)-labelling.

There exists a saturated (s, t)-cut Z :d+x (Z )− d−

x (Z ) = d+g (Z )− d−

0 (Z ) (= capg (Z )).

Proof1 Since the n vertices of V can not take the n + 1 values between 0

and n, there exists a value 0 < k < n such that ℓ(v) 6= k ∀v ∈ V .

2 Let Z := {v ∈ V : ℓ(v) > k}.

3 Z is an (s, t)-cut: s ∈ Z , t /∈ Z since ℓ(s) = n > k > 0 = ℓ(t).

4 d+x (Z )− d−

x (Z ) = d+g (Z )− d−

0 (Z ); otherwise, ∃uv ∈ δ+Dx(Z ) so,

Z. Szigeti OCG-ORCO 20 / 29

Page 135: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Saturated cut

Lemma

Let x be a g -feasible (s, t)-preflow and ℓ an x -valid (s, t)-labelling.

There exists a saturated (s, t)-cut Z :d+x (Z )− d−

x (Z ) = d+g (Z )− d−

0 (Z ) (= capg (Z )).

Proof1 Since the n vertices of V can not take the n + 1 values between 0

and n, there exists a value 0 < k < n such that ℓ(v) 6= k ∀v ∈ V .

2 Let Z := {v ∈ V : ℓ(v) > k}.

3 Z is an (s, t)-cut: s ∈ Z , t /∈ Z since ℓ(s) = n > k > 0 = ℓ(t).

4 d+x (Z )− d−

x (Z ) = d+g (Z )− d−

0 (Z ); otherwise, ∃uv ∈ δ+Dx(Z ) so, by

u ∈ Z , ℓ is x-valid, v /∈ Z and ℓ(v) 6= k , we have a contradiction:

Z. Szigeti OCG-ORCO 20 / 29

Page 136: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Saturated cut

Lemma

Let x be a g -feasible (s, t)-preflow and ℓ an x -valid (s, t)-labelling.

There exists a saturated (s, t)-cut Z :d+x (Z )− d−

x (Z ) = d+g (Z )− d−

0 (Z ) (= capg (Z )).

Proof1 Since the n vertices of V can not take the n + 1 values between 0

and n, there exists a value 0 < k < n such that ℓ(v) 6= k ∀v ∈ V .

2 Let Z := {v ∈ V : ℓ(v) > k}.

3 Z is an (s, t)-cut: s ∈ Z , t /∈ Z since ℓ(s) = n > k > 0 = ℓ(t).

4 d+x (Z )− d−

x (Z ) = d+g (Z )− d−

0 (Z ); otherwise, ∃uv ∈ δ+Dx(Z ) so, by

u ∈ Z , ℓ is x-valid, v /∈ Z and ℓ(v) 6= k , we have a contradiction:k < ℓ(u) ≤ ℓ(v) + 1 ≤ (k − 1) + 1 = k .

Z. Szigeti OCG-ORCO 20 / 29

Page 137: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Stopping rule

Remark

If x is a g -feasible (s, t)-flow and ℓ is a x-valid (s, t)-labelling,

Z. Szigeti OCG-ORCO 21 / 29

Page 138: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Stopping rule

Remark

If x is a g -feasible (s, t)-flow and ℓ is a x-valid (s, t)-labelling,

then x is of maximum value.

Z. Szigeti OCG-ORCO 21 / 29

Page 139: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Stopping rule

Remark

If x is a g -feasible (s, t)-flow and ℓ is a x-valid (s, t)-labelling,

then x is of maximum value.

Remark

Z. Szigeti OCG-ORCO 21 / 29

Page 140: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Stopping rule

Remark

If x is a g -feasible (s, t)-flow and ℓ is a x-valid (s, t)-labelling,

then x is of maximum value.

Remark1 Edmonds-Karp:

Z. Szigeti OCG-ORCO 21 / 29

Page 141: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Stopping rule

Remark

If x is a g -feasible (s, t)-flow and ℓ is a x-valid (s, t)-labelling,

then x is of maximum value.

Remark1 Edmonds-Karp:

2 Push-Relabel:

Z. Szigeti OCG-ORCO 21 / 29

Page 142: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Stopping rule

Remark

If x is a g -feasible (s, t)-flow and ℓ is a x-valid (s, t)-labelling,

then x is of maximum value.

Remark1 Edmonds-Karp:

1 In each iteration we have a g -feasible (s, t)-flow,

2 Push-Relabel:

Z. Szigeti OCG-ORCO 21 / 29

Page 143: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Stopping rule

Remark

If x is a g -feasible (s, t)-flow and ℓ is a x-valid (s, t)-labelling,

then x is of maximum value.

Remark1 Edmonds-Karp:

1 In each iteration we have a g -feasible (s, t)-flow,2 we stop when an (s, t)-cut becomes saturated.

2 Push-Relabel:

Z. Szigeti OCG-ORCO 21 / 29

Page 144: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Stopping rule

Remark

If x is a g -feasible (s, t)-flow and ℓ is a x-valid (s, t)-labelling,

then x is of maximum value.

Remark1 Edmonds-Karp:

1 In each iteration we have a g -feasible (s, t)-flow,2 we stop when an (s, t)-cut becomes saturated.

2 Push-Relabel:1 In each iteration we have a g -feasible (s, t)-preflow and a saturated

(s, t)-cut,

Z. Szigeti OCG-ORCO 21 / 29

Page 145: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Stopping rule

Remark

If x is a g -feasible (s, t)-flow and ℓ is a x-valid (s, t)-labelling,

then x is of maximum value.

Remark1 Edmonds-Karp:

1 In each iteration we have a g -feasible (s, t)-flow,2 we stop when an (s, t)-cut becomes saturated.

2 Push-Relabel:1 In each iteration we have a g -feasible (s, t)-preflow and a saturated

(s, t)-cut,2 we stop when the (s, t)-preflow becomes an (s, t)-flow.

Z. Szigeti OCG-ORCO 21 / 29

Page 146: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Distance and labelling

Lemma

If x is a g -feasible (s, t)-preflow and ℓ is a x-valid (s, t)-labelling,

then distDx(u, v) ≥ ℓ(u)− ℓ(v) ∀u, v ∈ V .

Z. Szigeti OCG-ORCO 22 / 29

Page 147: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Distance and labelling

Lemma

If x is a g -feasible (s, t)-preflow and ℓ is a x-valid (s, t)-labelling,

then distDx(u, v) ≥ ℓ(u)− ℓ(v) ∀u, v ∈ V .

Proof1 It is true if distDx

(u, v) = ∞.

Z. Szigeti OCG-ORCO 22 / 29

Page 148: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Distance and labelling

Lemma

If x is a g -feasible (s, t)-preflow and ℓ is a x-valid (s, t)-labelling,

then distDx(u, v) ≥ ℓ(u)− ℓ(v) ∀u, v ∈ V .

Proof1 It is true if distDx

(u, v) = ∞.

2 Otherwise, there exists a (u, v)-path w0 = u, . . . , wk = v in Dx suchthat distDx

(u, v) = k .

Z. Szigeti OCG-ORCO 22 / 29

Page 149: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Distance and labelling

Lemma

If x is a g -feasible (s, t)-preflow and ℓ is a x-valid (s, t)-labelling,

then distDx(u, v) ≥ ℓ(u)− ℓ(v) ∀u, v ∈ V .

Proof1 It is true if distDx

(u, v) = ∞.

2 Otherwise, there exists a (u, v)-path w0 = u, . . . , wk = v in Dx suchthat distDx

(u, v) = k .

3 Since ℓ is x-valid,

ℓ(wi )− ℓ(wi+1) ≤ 1

Z. Szigeti OCG-ORCO 22 / 29

Page 150: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Distance and labelling

Lemma

If x is a g -feasible (s, t)-preflow and ℓ is a x-valid (s, t)-labelling,

then distDx(u, v) ≥ ℓ(u)− ℓ(v) ∀u, v ∈ V .

Proof1 It is true if distDx

(u, v) = ∞.

2 Otherwise, there exists a (u, v)-path w0 = u, . . . , wk = v in Dx suchthat distDx

(u, v) = k .

3 Since ℓ is x-valid,

k−1∑

i=0

(ℓ(wi )− ℓ(wi+1)) ≤k−1∑

i=0

1

Z. Szigeti OCG-ORCO 22 / 29

Page 151: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Distance and labelling

Lemma

If x is a g -feasible (s, t)-preflow and ℓ is a x-valid (s, t)-labelling,

then distDx(u, v) ≥ ℓ(u)− ℓ(v) ∀u, v ∈ V .

Proof1 It is true if distDx

(u, v) = ∞.

2 Otherwise, there exists a (u, v)-path w0 = u, . . . , wk = v in Dx suchthat distDx

(u, v) = k .

3 Since ℓ is x-valid,

ℓ(u)− ℓ(v) =

k−1∑

i=0

(ℓ(wi )− ℓ(wi+1)) ≤k−1∑

i=0

1

Z. Szigeti OCG-ORCO 22 / 29

Page 152: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Distance and labelling

Lemma

If x is a g -feasible (s, t)-preflow and ℓ is a x-valid (s, t)-labelling,

then distDx(u, v) ≥ ℓ(u)− ℓ(v) ∀u, v ∈ V .

Proof1 It is true if distDx

(u, v) = ∞.

2 Otherwise, there exists a (u, v)-path w0 = u, . . . , wk = v in Dx suchthat distDx

(u, v) = k .

3 Since ℓ is x-valid,

ℓ(u)− ℓ(v) =

k−1∑

i=0

(ℓ(wi )− ℓ(wi+1)) ≤k−1∑

i=0

1 = k

Z. Szigeti OCG-ORCO 22 / 29

Page 153: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Distance and labelling

Lemma

If x is a g -feasible (s, t)-preflow and ℓ is a x-valid (s, t)-labelling,

then distDx(u, v) ≥ ℓ(u)− ℓ(v) ∀u, v ∈ V .

Proof1 It is true if distDx

(u, v) = ∞.

2 Otherwise, there exists a (u, v)-path w0 = u, . . . , wk = v in Dx suchthat distDx

(u, v) = k .

3 Since ℓ is x-valid,

ℓ(u)− ℓ(v) =

k−1∑

i=0

(ℓ(wi )− ℓ(wi+1)) ≤k−1∑

i=0

1 = k = distDx(u, v).

Z. Szigeti OCG-ORCO 22 / 29

Page 154: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Distance and labelling

Corollary

distDx(u, t) ≥ ℓ(u) ∀u ∈ V .

4

ts

b

a3

0

4

Z. Szigeti OCG-ORCO 23 / 29

Page 155: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Distance and labelling

Corollary

distDx(u, t) ≥ ℓ(u) ∀u ∈ V .

Idea

4

ts

b

a3

0

4

Z. Szigeti OCG-ORCO 23 / 29

Page 156: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Distance and labelling

Corollary

distDx(u, t) ≥ ℓ(u) ∀u ∈ V .

Idea1 Push the preflow on uv ∈ Ax in the direction of t:

4

ts

b

a3

0

4

Z. Szigeti OCG-ORCO 23 / 29

Page 157: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Distance and labelling

Corollary

distDx(u, t) ≥ ℓ(u) ∀u ∈ V .

Idea1 Push the preflow on uv ∈ Ax in the direction of t: if ℓ(v) < ℓ(u).

4

ts

b

a3

0

4

Z. Szigeti OCG-ORCO 23 / 29

Page 158: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Distance and labelling

Corollary

distDx(u, t) ≥ ℓ(u) ∀u ∈ V .

Idea1 Push the preflow on uv ∈ Ax in the direction of t: if ℓ(v) < ℓ(u).

2 But, since ℓ is x -valid, we have ℓ(u) ≤ ℓ(v) + 1.

4

ts

b

a3

0

4

Z. Szigeti OCG-ORCO 23 / 29

Page 159: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Distance and labelling

Corollary

distDx(u, t) ≥ ℓ(u) ∀u ∈ V .

Idea1 Push the preflow on uv ∈ Ax in the direction of t: if ℓ(v) < ℓ(u).

2 But, since ℓ is x -valid, we have ℓ(u) ≤ ℓ(v) + 1.

3 Push the preflow on uv ∈ Ax if it is ℓ-tight: ℓ(u) = ℓ(v) + 1.

4

ts

b

a3

0

4

Z. Szigeti OCG-ORCO 23 / 29

Page 160: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Pushing on tight arcs

Lemma

Suppose that1 x is a g -feasible (s, t)-preflow in D,2 ℓ is a x-valid (s, t)-labelling,3 u is an x-active vertex and4 uv is an ℓ-tight arc in Dx .

After executing Operation Push on uv , for the new (s, t)-preflow x ′,ℓ is x ′-valid.

Z. Szigeti OCG-ORCO 24 / 29

Page 161: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Pushing on tight arcs

Lemma

Suppose that1 x is a g -feasible (s, t)-preflow in D,2 ℓ is a x-valid (s, t)-labelling,3 u is an x-active vertex and4 uv is an ℓ-tight arc in Dx .

After executing Operation Push on uv , for the new (s, t)-preflow x ′,ℓ is x ′-valid.

Proof

Z. Szigeti OCG-ORCO 24 / 29

Page 162: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Pushing on tight arcs

Lemma

Suppose that1 x is a g -feasible (s, t)-preflow in D,2 ℓ is a x-valid (s, t)-labelling,3 u is an x-active vertex and4 uv is an ℓ-tight arc in Dx .

After executing Operation Push on uv , for the new (s, t)-preflow x ′,ℓ is x ′-valid.

Proof1 We have to check the inequality if vu becomes an arc of Dx ′ :

Z. Szigeti OCG-ORCO 24 / 29

Page 163: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Pushing on tight arcs

Lemma

Suppose that1 x is a g -feasible (s, t)-preflow in D,2 ℓ is a x-valid (s, t)-labelling,3 u is an x-active vertex and4 uv is an ℓ-tight arc in Dx .

After executing Operation Push on uv , for the new (s, t)-preflow x ′,ℓ is x ′-valid.

Proof1 We have to check the inequality if vu becomes an arc of Dx ′ :

2 Since uv is ℓ-tight, ℓ(v) = ℓ(u)− 1 < ℓ(u) + 1, thus ℓ is x ′-valid.

Z. Szigeti OCG-ORCO 24 / 29

Page 164: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

No tight arcs

Example

1 Active vertex exists but no tight arc exists.

Z. Szigeti OCG-ORCO 25 / 29

Page 165: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

No tight arcs

Example

1 Active vertex exists but no tight arc exists.

(D, x , g)

s tu

(2, 2) (0, 1)

Z. Szigeti OCG-ORCO 25 / 29

Page 166: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

No tight arcs

Example

1 Active vertex exists but no tight arc exists.

2 fx(u) = d−

x (u)− d+x (u) = 2− 0 = 2 > 0 =⇒ u is x-active.

(D, x , g)

s tu

(2, 2) (0, 1)

Z. Szigeti OCG-ORCO 25 / 29

Page 167: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

No tight arcs

Example

1 Active vertex exists but no tight arc exists.

2 fx(u) = d−

x (u)− d+x (u) = 2− 0 = 2 > 0 =⇒ u is x-active.

(D, x , g) Dx

s tu

(2, 2) (0, 1)s t

u

Z. Szigeti OCG-ORCO 25 / 29

Page 168: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

No tight arcs

Example

1 Active vertex exists but no tight arc exists.

2 fx(u) = d−

x (u)− d+x (u) = 2− 0 = 2 > 0 =⇒ u is x-active.

3 ℓ(s) = 3, ℓ(u) = 0, ℓ(t) = 0

(D, x , g) Dx

s tu

(2, 2) (0, 1)s t

u

Z. Szigeti OCG-ORCO 25 / 29

Page 169: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

No tight arcs

Example

1 Active vertex exists but no tight arc exists.

2 fx(u) = d−

x (u)− d+x (u) = 2− 0 = 2 > 0 =⇒ u is x-active.

3 ℓ(s) = 3, ℓ(u) = 0, ℓ(t) = 0 =⇒

(D, x , g) Dx

s tu

(2, 2) (0, 1)s t

u

Z. Szigeti OCG-ORCO 25 / 29

Page 170: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

No tight arcs

Example

1 Active vertex exists but no tight arc exists.

2 fx(u) = d−

x (u)− d+x (u) = 2− 0 = 2 > 0 =⇒ u is x-active.

3 ℓ(s) = 3, ℓ(u) = 0, ℓ(t) = 0 =⇒ℓ(u) = 0 6= 4 = ℓ(s) + 1

(D, x , g) Dx

s tu

(2, 2) (0, 1)s t

u

Z. Szigeti OCG-ORCO 25 / 29

Page 171: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

No tight arcs

Example

1 Active vertex exists but no tight arc exists.

2 fx(u) = d−

x (u)− d+x (u) = 2− 0 = 2 > 0 =⇒ u is x-active.

3 ℓ(s) = 3, ℓ(u) = 0, ℓ(t) = 0 =⇒ℓ(u) = 0 6= 4 = ℓ(s) + 1ℓ(u) = 0 6= 1 = ℓ(t) + 1

(D, x , g) Dx

s tu

(2, 2) (0, 1)s t

u

Z. Szigeti OCG-ORCO 25 / 29

Page 172: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

No tight arcs

Example

1 Active vertex exists but no tight arc exists.

2 fx(u) = d−

x (u)− d+x (u) = 2− 0 = 2 > 0 =⇒ u is x-active.

3 ℓ(s) = 3, ℓ(u) = 0, ℓ(t) = 0 =⇒ℓ(u) = 0 6= 4 = ℓ(s) + 1ℓ(u) = 0 6= 1 = ℓ(t) + 1us, ut are not ℓ-tight.

(D, x , g) Dx

s tu

(2, 2) (0, 1)s t

u

Z. Szigeti OCG-ORCO 25 / 29

Page 173: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Relabel

Operation Relabel

1 Suppose that1 x is a g -feasible (s, t)-preflow in D,2 ℓ is a x-valid (s, t)-labelling,3 u is an x-active vertex and4 no ℓ-tight arc leaves u.

(D, x , g) Dx

s tu

(2, 2) (0, 1)s t

u

ℓ(s) = 3, ℓ(u) = 0, ℓ(t) = 0

Z. Szigeti OCG-ORCO 26 / 29

Page 174: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Relabel

Operation Relabel

1 Suppose that1 x is a g -feasible (s, t)-preflow in D,2 ℓ is a x-valid (s, t)-labelling,3 u is an x-active vertex and4 no ℓ-tight arc leaves u.

2 Modification of ℓ:

(D, x , g) Dx

s tu

(2, 2) (0, 1)s t

u

ℓ(s) = 3, ℓ(u) = 0, ℓ(t) = 0

Z. Szigeti OCG-ORCO 26 / 29

Page 175: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Relabel

Operation Relabel

1 Suppose that1 x is a g -feasible (s, t)-preflow in D,2 ℓ is a x-valid (s, t)-labelling,3 u is an x-active vertex and4 no ℓ-tight arc leaves u.

2 Modification of ℓ:1 ℓ′(u) := min{ℓ(v) + 1 : uv ∈ Ax},

(D, x , g) Dx

s tu

(2, 2) (0, 1)s t

u

ℓ(s) = 3, ℓ(u) = 0, ℓ(t) = 0ℓ′(u) = 1,

Z. Szigeti OCG-ORCO 26 / 29

Page 176: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Relabel

Operation Relabel

1 Suppose that1 x is a g -feasible (s, t)-preflow in D,2 ℓ is a x-valid (s, t)-labelling,3 u is an x-active vertex and4 no ℓ-tight arc leaves u.

2 Modification of ℓ:1 ℓ′(u) := min{ℓ(v) + 1 : uv ∈ Ax},2 ℓ′(w) := ℓ(w) ∀w 6= u.

(D, x , g) Dx

s tu

(2, 2) (0, 1)s t

u

ℓ(s) = 3, ℓ(u) = 0, ℓ(t) = 0ℓ′(s) = 3, ℓ′(u) = 1, ℓ′(t) = 0

Z. Szigeti OCG-ORCO 26 / 29

Page 177: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Relabel

Operation Relabel

1 Suppose that1 x is a g -feasible (s, t)-preflow in D,2 ℓ is a x-valid (s, t)-labelling,3 u is an x-active vertex and4 no ℓ-tight arc leaves u.

2 Modification of ℓ:1 ℓ′(u) := min{ℓ(v) + 1 : uv ∈ Ax},2 ℓ′(w) := ℓ(w) ∀w 6= u.

3 An arc uv becomes ℓ′-tight !

(D, x , g) Dx

s tu

(2, 2) (0, 1)s t

u

ℓ(s) = 3, ℓ(u) = 0, ℓ(t) = 0ℓ′(s) = 3, ℓ′(u) = 1, ℓ′(t) = 0

Z. Szigeti OCG-ORCO 26 / 29

Page 178: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Relabel

Lemma

After executing Operation Relabel at u, the new labelling ℓ′ is x -valid.

Z. Szigeti OCG-ORCO 27 / 29

Page 179: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Relabel

Lemma

After executing Operation Relabel at u, the new labelling ℓ′ is x -valid.

Proof

Z. Szigeti OCG-ORCO 27 / 29

Page 180: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Relabel

Lemma

After executing Operation Relabel at u, the new labelling ℓ′ is x -valid.

Proof1 We have to check ℓ′(a) ≤ ℓ′(b) + 1 ∀ab ∈ Ax .

Z. Szigeti OCG-ORCO 27 / 29

Page 181: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Relabel

Lemma

After executing Operation Relabel at u, the new labelling ℓ′ is x -valid.

Proof1 We have to check ℓ′(a) ≤ ℓ′(b) + 1 ∀ab ∈ Ax .

2 ℓ′(v) = ℓ(v) ∀v 6= u and,

Z. Szigeti OCG-ORCO 27 / 29

Page 182: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Relabel

Lemma

After executing Operation Relabel at u, the new labelling ℓ′ is x -valid.

Proof1 We have to check ℓ′(a) ≤ ℓ′(b) + 1 ∀ab ∈ Ax .

2 ℓ′(v) = ℓ(v) ∀v 6= u and, by ℓ is x-valid,ℓ′(u) = min{ℓ(v) + 1 : uv ∈ Ax} = ℓ(w) + 1 ≥ ℓ(u).

Z. Szigeti OCG-ORCO 27 / 29

Page 183: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Relabel

Lemma

After executing Operation Relabel at u, the new labelling ℓ′ is x -valid.

Proof1 We have to check ℓ′(a) ≤ ℓ′(b) + 1 ∀ab ∈ Ax .

2 ℓ′(v) = ℓ(v) ∀v 6= u and, by ℓ is x-valid,ℓ′(u) = min{ℓ(v) + 1 : uv ∈ Ax} = ℓ(w) + 1 ≥ ℓ(u).

3 If a = u,

Z. Szigeti OCG-ORCO 27 / 29

Page 184: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Relabel

Lemma

After executing Operation Relabel at u, the new labelling ℓ′ is x -valid.

Proof1 We have to check ℓ′(a) ≤ ℓ′(b) + 1 ∀ab ∈ Ax .

2 ℓ′(v) = ℓ(v) ∀v 6= u and, by ℓ is x-valid,ℓ′(u) = min{ℓ(v) + 1 : uv ∈ Ax} = ℓ(w) + 1 ≥ ℓ(u).

3 If a = u,

4 If a 6= u,

Z. Szigeti OCG-ORCO 27 / 29

Page 185: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Relabel

Lemma

After executing Operation Relabel at u, the new labelling ℓ′ is x -valid.

Proof1 We have to check ℓ′(a) ≤ ℓ′(b) + 1 ∀ab ∈ Ax .

2 ℓ′(v) = ℓ(v) ∀v 6= u and, by ℓ is x-valid,ℓ′(u) = min{ℓ(v) + 1 : uv ∈ Ax} = ℓ(w) + 1 ≥ ℓ(u).

3 If a = u, then ℓ′(u) ≤ ℓ(b) + 1 = ℓ′(b) + 1,

4 If a 6= u,

Z. Szigeti OCG-ORCO 27 / 29

Page 186: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Relabel

Lemma

After executing Operation Relabel at u, the new labelling ℓ′ is x -valid.

Proof1 We have to check ℓ′(a) ≤ ℓ′(b) + 1 ∀ab ∈ Ax .

2 ℓ′(v) = ℓ(v) ∀v 6= u and, by ℓ is x-valid,ℓ′(u) = min{ℓ(v) + 1 : uv ∈ Ax} = ℓ(w) + 1 ≥ ℓ(u).

3 If a = u, then ℓ′(u) ≤ ℓ(b) + 1 = ℓ′(b) + 1,

4 If a 6= u, then, by ℓ is x-valid, ℓ′(a) = ℓ(a) ≤ ℓ(b) + 1 ≤ ℓ′(b) + 1.

Z. Szigeti OCG-ORCO 27 / 29

Page 187: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Relabel

Lemma

After executing Operation Relabel at u, the new labelling ℓ′ is x -valid.

Proof1 We have to check ℓ′(a) ≤ ℓ′(b) + 1 ∀ab ∈ Ax .

2 ℓ′(v) = ℓ(v) ∀v 6= u and, by ℓ is x-valid,ℓ′(u) = min{ℓ(v) + 1 : uv ∈ Ax} = ℓ(w) + 1 ≥ ℓ(u).

3 If a = u, then ℓ′(u) ≤ ℓ(b) + 1 = ℓ′(b) + 1,

4 If a 6= u, then, by ℓ is x-valid, ℓ′(a) = ℓ(a) ≤ ℓ(b) + 1 ≤ ℓ′(b) + 1.

5 Thus ℓ′ is indeed x-valid.

Z. Szigeti OCG-ORCO 27 / 29

Page 188: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push-Relabel

Algorithm of Goldberg

Input : A network (D, g ≥ 0, s, t).Output: A g -feasible (s, t)-flow x of maximum value.

Z. Szigeti OCG-ORCO 28 / 29

Page 189: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push-Relabel

Algorithm of Goldberg

Input : A network (D, g ≥ 0, s, t).Output: A g -feasible (s, t)-flow x of maximum value.

Step 0: Initialize x and ℓ.

Z. Szigeti OCG-ORCO 28 / 29

Page 190: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push-Relabel

Algorithm of Goldberg

Input : A network (D, g ≥ 0, s, t).Output: A g -feasible (s, t)-flow x of maximum value.

Step 0: Initialize x and ℓ.Step 1: If x is a (s, t)-flow, then Stop with x .

Z. Szigeti OCG-ORCO 28 / 29

Page 191: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push-Relabel

Algorithm of Goldberg

Input : A network (D, g ≥ 0, s, t).Output: A g -feasible (s, t)-flow x of maximum value.

Step 0: Initialize x and ℓ.Step 1: If x is a (s, t)-flow, then Stop with x .Step 2: Otherwise, let u be an x -active vertex.

Z. Szigeti OCG-ORCO 28 / 29

Page 192: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push-Relabel

Algorithm of Goldberg

Input : A network (D, g ≥ 0, s, t).Output: A g -feasible (s, t)-flow x of maximum value.

Step 0: Initialize x and ℓ.Step 1: If x is a (s, t)-flow, then Stop with x .Step 2: Otherwise, let u be an x -active vertex.Step 3: While u is x-active and ℓ-tight uv ∈ Ax exists, Push on uv .

Z. Szigeti OCG-ORCO 28 / 29

Page 193: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push-Relabel

Algorithm of Goldberg

Input : A network (D, g ≥ 0, s, t).Output: A g -feasible (s, t)-flow x of maximum value.

Step 0: Initialize x and ℓ.Step 1: If x is a (s, t)-flow, then Stop with x .Step 2: Otherwise, let u be an x -active vertex.Step 3: While u is x-active and ℓ-tight uv ∈ Ax exists, Push on uv .Step 4: If u is not x-active then go to Step 1.

Z. Szigeti OCG-ORCO 28 / 29

Page 194: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push-Relabel

Algorithm of Goldberg

Input : A network (D, g ≥ 0, s, t).Output: A g -feasible (s, t)-flow x of maximum value.

Step 0: Initialize x and ℓ.Step 1: If x is a (s, t)-flow, then Stop with x .Step 2: Otherwise, let u be an x -active vertex.Step 3: While u is x-active and ℓ-tight uv ∈ Ax exists, Push on uv .Step 4: If u is not x-active then go to Step 1.Step 5: Otherwise Relabel u and go to Step 3.

Z. Szigeti OCG-ORCO 28 / 29

Page 195: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Push-Relabel

Algorithm of Goldberg

Input : A network (D, g ≥ 0, s, t).Output: A g -feasible (s, t)-flow x of maximum value.

Step 0: Initialize x and ℓ.Step 1: If x is a (s, t)-flow, then Stop with x .Step 2: Otherwise, let u be an x -active vertex.Step 3: While u is x-active and ℓ-tight uv ∈ Ax exists, Push on uv .Step 4: If u is not x-active then go to Step 1.Step 5: Otherwise Relabel u and go to Step 3.

Remark

Complexity (without proof): Faster than Edmonds - Karp:

1 Goldberg: O(n2m),

2 Edmonds - Karp: O(nm2).

Z. Szigeti OCG-ORCO 28 / 29

Page 196: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

14 ts

2

43

4

b

a

Problem

Find in the network (D, g) a g -feasible(s, t)-flow of maximum value and an(s, t)-cut of minimum capacity!

Z. Szigeti OCG-ORCO 29 / 29

Page 197: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a

Initialization

Preflow x

Z. Szigeti OCG-ORCO 29 / 29

Page 198: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a

ts

b

a

ConstructionAuxiliary graph Dx

Z. Szigeti OCG-ORCO 29 / 29

Page 199: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a

ts

b

a0

0

0

4

Initialization

Labelling ℓ

Z. Szigeti OCG-ORCO 29 / 29

Page 200: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a

ts

b

a0

0

0

4

Looking for active vertex

fx(a) = d−

x (a)− d+x (a)

= (3 + 0)− (0 + 0) = 3 > 0=⇒ a is x-active

Z. Szigeti OCG-ORCO 29 / 29

Page 201: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a0

ts

b

a

0

0

4

Looking for tight arc leaving a

ℓ(a) = 0 6= 1 = ℓ(b) + 1 = ℓ(t) + 16= 5 = ℓ(s) + 1

=⇒ no ℓ-tight arc leaving a exists

Z. Szigeti OCG-ORCO 29 / 29

Page 202: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a0

ts

b

a

0

0

4

Relabel at a

ℓ′(a) = min{ℓ(v) + 1 : av ∈ Ax}= min{0 + 1, 0 + 1, 4 + 1} = 1

Z. Szigeti OCG-ORCO 29 / 29

Page 203: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a1

ts

b

a

0

0

4

Relabel at a

ℓ′(a) = min{ℓ(v) + 1 : av ∈ Ax}= min{0 + 1, 0 + 1, 4 + 1} = 1

Z. Szigeti OCG-ORCO 29 / 29

Page 204: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a1

ts

b

a

0

0

4

Relabel at a

ℓ′(a) = min{ℓ(v) + 1 : av ∈ Ax}= min{0 + 1, 0 + 1, 4 + 1} = 1

arc at becomes ℓ-tight

Z. Szigeti OCG-ORCO 29 / 29

Page 205: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(0, 4)(3, 3)

(4, 4)

b

a1

ts

b

a

0

0

4

Push on at

ε = min{g(at), fx (a)}= min{4− 0 + 0, 3} = 3

x ′(at) = x(at) + ε = 0 + 3 = 3x ′(e) = x(e) ∀e ∈ A \ {at}

Z. Szigeti OCG-ORCO 29 / 29

Page 206: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(3, 4)(3, 3)

(4, 4)

b

a

Push on at

ε = min{g(at), fx (a)}= min{4− 0 + 0, 3} = 3

x ′(at) = x(at) + ε = 0 + 3 = 3x ′(e) = x(e) ∀e ∈ A \ {at}

a is not x-active anymore

Z. Szigeti OCG-ORCO 29 / 29

Page 207: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(3, 4)(3, 3)

(4, 4)

b

a

Looking for active vertex

fx(b) = d−

x (b)− d+x (b)

= (4 + 0)− (0 + 0) = 4 > 0=⇒ b is x-active

Z. Szigeti OCG-ORCO 29 / 29

Page 208: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(3, 4)(3, 3)

(4, 4)

b

a

ts

b

a

ConstructionAuxiliary graph Dx

Z. Szigeti OCG-ORCO 29 / 29

Page 209: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(3, 4)(3, 3)

(4, 4)

b

a

ts

b

a1

0

0

4

Previous labelling

Z. Szigeti OCG-ORCO 29 / 29

Page 210: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(3, 4)(3, 3)

(4, 4)

b

a

0

ts

b

a1

0

4

Looking for tight arc leaving b

ℓ(b) = 0 6= 2 = ℓ(a) + 16= 1 = ℓ(t) + 16= 5 = ℓ(s) + 1

=⇒ no ℓ-tight arc leaving b exists

Z. Szigeti OCG-ORCO 29 / 29

Page 211: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(3, 4)(3, 3)

(4, 4)

b

a

0

ts

b

a1

0

4

Relabel at b

ℓ′(b) = min{ℓ(v) + 1 : bv ∈ Ax}= min{1 + 1, 0 + 1, 4 + 1} = 1

Z. Szigeti OCG-ORCO 29 / 29

Page 212: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(3, 4)(3, 3)

(4, 4)

b

a

1

ts

b

a1

0

4

Relabel at b

ℓ′(b) = min{ℓ(v) + 1 : bv ∈ Ax}= min{1 + 1, 0 + 1, 4 + 1} = 1

Z. Szigeti OCG-ORCO 29 / 29

Page 213: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(3, 4)(3, 3)

(4, 4)

b

a

1

ts

b

a1

0

4

Relabel at b

ℓ′(b) = min{ℓ(v) + 1 : bv ∈ Ax}= min{1 + 1, 0 + 1, 4 + 1} = 1

arc bt becomes ℓ-tight

Z. Szigeti OCG-ORCO 29 / 29

Page 214: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(0, 2)

(3, 4)(3, 3)

(4, 4)

b

a

1

ts

b

a1

0

4

Push on bt

ε = min{g(bt), fx (b)}= min{2− 0 + 0, 4} = 2

x ′(bt) = x(bt) + ε = 0 + 2 = 2

Z. Szigeti OCG-ORCO 29 / 29

Page 215: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a

Push on bt

ε = min{g(bt), fx (b)}= min{2− 0 + 0, 4} = 2

x ′(bt) = x(bt) + ε = 0 + 2 = 2

Z. Szigeti OCG-ORCO 29 / 29

Page 216: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a

Push on bt

ε = min{g(bt), fx (b)}= min{2− 0 + 0, 4} = 2

x ′(bt) = x(bt) + ε = 0 + 2 = 2

b is still x-active

Z. Szigeti OCG-ORCO 29 / 29

Page 217: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a

ts

b

a

ConstructionAuxiliary graph Dx

Z. Szigeti OCG-ORCO 29 / 29

Page 218: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a

ts

b

a1

0

1

4

Previous labelling

Z. Szigeti OCG-ORCO 29 / 29

Page 219: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a

1

ts

b

a1

0

4

Looking for tight arc leaving b

ℓ(b) = 1 6= 2 = ℓ(a) + 16= 5 = ℓ(s) + 1

=⇒ no ℓ-tight arc leaving b exists

Z. Szigeti OCG-ORCO 29 / 29

Page 220: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a

1

ts

b

a1

0

4

Relabel at b

ℓ′(b) = min{ℓ(v) + 1 : bv ∈ Ax}= min{1 + 1, 4 + 1} = 2

Z. Szigeti OCG-ORCO 29 / 29

Page 221: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a

2

ts

b

a1

0

4

Relabel at b

ℓ′(b) = min{ℓ(v) + 1 : bv ∈ Ax}= min{1 + 1, 4 + 1} = 2

Z. Szigeti OCG-ORCO 29 / 29

Page 222: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a

2

ts

b

a1

0

4

Relabel at b

ℓ′(b) = min{ℓ(v) + 1 : bv ∈ Ax}= min{1 + 1, 4 + 1} = 2

arc ba becomes ℓ-tight

Z. Szigeti OCG-ORCO 29 / 29

Page 223: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(0, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a

2

ts

b

a1

0

4

Push on ba

ε = min{g(ba), fx (b)}= min{4− 0 + 0, 2} = 2

ε′ = min{x(ab), ε} = min{0, 2} = 0x ′(ba) = x(ba) + ε− ε′ = 0+2−0 = 2x ′(ab) = x(ab)− ε′ = 0− 0 = 0

Z. Szigeti OCG-ORCO 29 / 29

Page 224: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a

Push on ba

ε = min{g(ba), fx (b)}= min{4− 0 + 0, 2} = 2

ε′ = min{x(ab), ε} = min{0, 2} = 0x ′(ba) = x(ba) + ε− ε′ = 0+2−0 = 2x ′(ab) = x(ab)− ε′ = 0− 0 = 0

Z. Szigeti OCG-ORCO 29 / 29

Page 225: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a

Push on ba

ε = min{g(ba), fx (b)}= min{4− 0 + 0, 2} = 2

ε′ = min{x(ab), ε} = min{0, 2} = 0x ′(ba) = x(ba) + ε− ε′ = 0+2−0 = 2x ′(ab) = x(ab)− ε′ = 0− 0 = 0

b is not x-active anymore

Z. Szigeti OCG-ORCO 29 / 29

Page 226: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a

Looking for active vertex

fx(a) = d−

x (a)− d+x (a)

= (3 + 2)− (3 + 0) = 2 > 0=⇒ a is x-active

Z. Szigeti OCG-ORCO 29 / 29

Page 227: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a

ts

b

a

ConstructionAuxiliary graph Dx

Z. Szigeti OCG-ORCO 29 / 29

Page 228: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a

ts

b

a1

0

2

4

Previous labelling

Z. Szigeti OCG-ORCO 29 / 29

Page 229: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a1

ts

b

a

0

2

4

Looking for tight arc leaving a

ℓ(a) = 1 = ℓ(t) + 1

Z. Szigeti OCG-ORCO 29 / 29

Page 230: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a1

ts

b

a

0

2

4

Looking for tight arc leaving a

ℓ(a) = 1 = ℓ(t) + 1=⇒ arc at is ℓ-tight

Z. Szigeti OCG-ORCO 29 / 29

Page 231: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(3, 4)(3, 3)

(4, 4)

b

a1

ts

b

a

0

2

4

Push on at

ε = min{g(at), fx (a)}= min{4− 3 + 0, 2} = 1

x ′(at) = x(at) + ε = 3 + 1 = 4

Z. Szigeti OCG-ORCO 29 / 29

Page 232: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

Push on at

ε = min{g(at), fx (a)}= min{4− 3 + 0, 2} = 1

x ′(at) = x(at) + ε = 3 + 1 = 4

Z. Szigeti OCG-ORCO 29 / 29

Page 233: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

Push on at

ε = min{g(at), fx (a)}= min{4− 3 + 0, 2} = 1

x ′(at) = x(at) + ε = 3 + 1 = 4

a is still x-active

Z. Szigeti OCG-ORCO 29 / 29

Page 234: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

ts

b

a

ConstructionAuxiliary graph Dx

Z. Szigeti OCG-ORCO 29 / 29

Page 235: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

ts

b

a1

0

2

4

Previous labelling

Z. Szigeti OCG-ORCO 29 / 29

Page 236: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a1

ts

b

a

0

2

4

Looking for tight arc leaving a

ℓ(a) = 1 6= 3 = ℓ(b) + 16= 5 = ℓ(s) + 1

=⇒ no ℓ-tight arc leaving a exists

Z. Szigeti OCG-ORCO 29 / 29

Page 237: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a1

ts

b

a

0

2

4

Relabel at a

ℓ′(a) = min{ℓ(v) + 1 : av ∈ Ax}= min{2 + 1, 4 + 1} = 3

Z. Szigeti OCG-ORCO 29 / 29

Page 238: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a3

ts

b

a

0

2

4

Relabel at a

ℓ′(a) = min{ℓ(v) + 1 : av ∈ Ax}= min{2 + 1, 4 + 1} = 3

Z. Szigeti OCG-ORCO 29 / 29

Page 239: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a3

ts

b

a

0

2

4

Relabel at a

ℓ′(a) = min{ℓ(v) + 1 : av ∈ Ax}= min{2 + 1, 4 + 1} = 3

arc ab becomes ℓ-tight

Z. Szigeti OCG-ORCO 29 / 29

Page 240: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a3

ts

b

a

0

2

4

Push on ab

ε = min{g(ab), fx(a)}= min{1− 0 + 2, 1} = 1

ε′ = min{x(ba), ε} = min{2, 1} = 1x ′(ab) = x(ab) + ε− ε′ = 0 + 1-1 = 0x ′(ba) = x(ba)− ε′ = 2− 1 = 1

Z. Szigeti OCG-ORCO 29 / 29

Page 241: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(1, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

Push on ab

ε = min{g(ab), fx(a)}= min{1− 0 + 2, 1} = 1

ε′ = min{x(ba), ε} = min{2, 1} = 1x ′(ab) = x(ab) + ε− ε′ = 0 + 1-1 = 0x ′(ba) = x(ba)− ε′ = 2− 1 = 1

Z. Szigeti OCG-ORCO 29 / 29

Page 242: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(1, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

Push on ab

ε = min{g(ab), fx(a)}= min{1− 0 + 2, 1} = 1

ε′ = min{x(ba), ε} = min{2, 1} = 1x ′(ab) = x(ab) + ε− ε′ = 0 + 1-1 = 0x ′(ba) = x(ba)− ε′ = 2− 1 = 1

a is not x-active anymore

Z. Szigeti OCG-ORCO 29 / 29

Page 243: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(1, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

Looking for active vertex

fx(b) = d−

x (b)− d+x (b)

= (4 + 0)− (1 + 2) = 1 > 0=⇒ b is x-active

Z. Szigeti OCG-ORCO 29 / 29

Page 244: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(1, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

ts

b

a

ConstructionAuxiliary graph Dx

Z. Szigeti OCG-ORCO 29 / 29

Page 245: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(1, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

ts

b

a3

0

2

4

Previous labelling

Z. Szigeti OCG-ORCO 29 / 29

Page 246: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(1, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

2

ts

b

a3

0

4

Looking for tight arc leaving b

ℓ(b) = 2 6= 4 = ℓ(a) + 16= 5 = ℓ(s) + 1

=⇒ no ℓ-tight arc leaving b exists

Z. Szigeti OCG-ORCO 29 / 29

Page 247: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(1, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

2

ts

b

a3

0

4

Relabel at b

ℓ′(b) = min{ℓ(v) + 1 : bv ∈ Ax}= min{3 + 1, 4 + 1} = 4

Z. Szigeti OCG-ORCO 29 / 29

Page 248: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(1, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

4

ts

b

a3

0

4

Relabel at b

ℓ′(b) = min{ℓ(v) + 1 : bv ∈ Ax}= min{3 + 1, 4 + 1} = 4

Z. Szigeti OCG-ORCO 29 / 29

Page 249: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(1, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

4

ts

b

a3

0

4

Relabel at b

ℓ′(b) = min{ℓ(v) + 1 : bv ∈ Ax}= min{3 + 1, 4 + 1} = 4

arc ba becomes ℓ-tight

Z. Szigeti OCG-ORCO 29 / 29

Page 250: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(1, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

4

ts

b

a3

0

4

Push on ba

ε = min{g(ba), fx (b)}= min{4− 1 + 0, 1} = 1

ε′ = min{x(ab), ε} = min{0, 1} = 0x ′(ba) = x(ba) + ε− ε′ = 1 + 1-0 = 2x ′(ab) = x(ab)− ε′ = 0− 0 = 0

Z. Szigeti OCG-ORCO 29 / 29

Page 251: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

Push on ba

ε = min{g(ba), fx (b)}= min{4− 1 + 0, 1} = 1

ε′ = min{x(ab), ε} = min{0, 1} = 0x ′(ba) = x(ba) + ε− ε′ = 1 + 1-0 = 2x ′(ab) = x(ab)− ε′ = 0− 0 = 0

Z. Szigeti OCG-ORCO 29 / 29

Page 252: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

Push on ba

ε = min{g(ba), fx (b)}= min{4− 1 + 0, 1} = 1

ε′ = min{x(ab), ε} = min{0, 1} = 0x ′(ba) = x(ba) + ε− ε′ = 1 + 1-0 = 2x ′(ab) = x(ab)− ε′ = 0− 0 = 0

b is not x-active anymore

Z. Szigeti OCG-ORCO 29 / 29

Page 253: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

Looking for active vertex

fx(a) = d−

x (a)− d+x (a)

= (3 + 2)− (4 + 0) = 1 > 0=⇒ a is x-active

Z. Szigeti OCG-ORCO 29 / 29

Page 254: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

ts

b

a

ConstructionAuxiliary graph Dx

Z. Szigeti OCG-ORCO 29 / 29

Page 255: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a

4

ts

b

a3

0

4

Previous labelling

Z. Szigeti OCG-ORCO 29 / 29

Page 256: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a3

4

ts

b

a

0

4

Looking for tight arc leaving a

ℓ(a) = 3 6= 5 = ℓ(b) + 16= 5 = ℓ(s) + 1

=⇒ no ℓ-tight arc leaving a exists

Z. Szigeti OCG-ORCO 29 / 29

Page 257: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a3

4

ts

b

a

0

4

Relabel at a

ℓ′(a) = min{ℓ(v) + 1 : av ∈ Ax}= min{4 + 1, 4 + 1} = 5

Z. Szigeti OCG-ORCO 29 / 29

Page 258: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a5

4

ts

b

a

0

4

Relabel at a

ℓ′(a) = min{ℓ(v) + 1 : av ∈ Ax}= min{4 + 1, 4 + 1} = 5

Z. Szigeti OCG-ORCO 29 / 29

Page 259: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a5

4

ts

b

a

0

4

Relabel at a

ℓ′(a) = min{ℓ(v) + 1 : av ∈ Ax}= min{4 + 1, 4 + 1} = 5

arc as becomes ℓ-tight

Z. Szigeti OCG-ORCO 29 / 29

Page 260: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(3, 3)

(4, 4)

b

a5

4

ts

b

a

0

4

Push on as

ε = min{g(as), fx (s)}= min{0− 0 + 3, 1} = 1

ε′ = min{x(sa), ε} = min{3, 1} = 1x ′(sa) = x(sa)− ε′ = 3− 1 = 2

Z. Szigeti OCG-ORCO 29 / 29

Page 261: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(2, 3)

(4, 4)

b

a

Push on as

ε = min{g(as), fx (s)}= min{0− 0 + 3, 1} = 1

ε′ = min{x(sa), ε} = min{3, 1} = 1x ′(sa) = x(sa)− ε′ = 3− 1 = 2

Z. Szigeti OCG-ORCO 29 / 29

Page 262: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(2, 3)

(4, 4)

b

a

Push on as

ε = min{g(as), fx (s)}= min{0− 0 + 3, 1} = 1

ε′ = min{x(sa), ε} = min{3, 1} = 1x ′(sa) = x(sa)− ε′ = 3− 1 = 2

Looking for active vertex

no x-active vertex exists

Z. Szigeti OCG-ORCO 29 / 29

Page 263: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

(0, 1)(2, 4) ts

(2, 2)

(4, 4)(2, 3)

(4, 4)

b

a

Optimal flow

=⇒ x is a g -feasible (s, t)-flow ofmaximum value

Z. Szigeti OCG-ORCO 29 / 29

Page 264: Combinatorial Optimization and Graph Theory ORCO Push ... · ORCO Push-Relabel Algorithm Zoltan Szigeti Z. Szigeti OCG-ORCO 1/29. Max Flow Min Cut Problem Given a directed graph D

Execution of the Push-Relabel algorithm

s (0, 1)(2, 4) t

(2, 2)

(4, 4)(2, 3)

(4, 4)

b

a

s

5

4

t

b

a

0

4

Optimal flow

=⇒ x is a g -feasible (s, t)-flow ofmaximum value

Optimal cut

ℓ does not take 1Z = {v : ℓ(v) > 1} is an (s, t)-cutof minimum capacity

Z. Szigeti OCG-ORCO 29 / 29