Combinatorial Optimization and Graph Theory ORCO Push-Relabel Algorithm Zolt´ an Szigeti Z. Szigeti OCG-ORCO 1 / 29
Combinatorial Optimization and Graph TheoryORCO
Push-Relabel Algorithm
Zoltan Szigeti
Z. Szigeti OCG-ORCO 1 / 29
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Push
Definition: function x on the arcs of D,
01 ts
1
03
4
b
a
Z. Szigeti OCG-ORCO 10 / 29
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
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
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
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
Push
Operation Push:
Z. Szigeti OCG-ORCO 11 / 29
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
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
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
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
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
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
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
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
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
Push
Lemma1 ε > 0,
2 ε′ ≥ 0.
3 x ′ is an (s, t)-preflow,
4 x ′ is g -feasible.
Z. Szigeti OCG-ORCO 12 / 29
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
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
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
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
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
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
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
Push
Proof of (3)
u v
x(vu)
x(uv)
u v
x(vu)− ε′
x(uv) + ε− ε′
Z. Szigeti OCG-ORCO 13 / 29
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Push
Example
When one can not push forward, only backward.
Z. Szigeti OCG-ORCO 15 / 29
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
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
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
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
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
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
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
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
Labelling
Question
In the previous example we could not push forward.
What does forward mean ?
Z. Szigeti OCG-ORCO 16 / 29
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
Initialization
Initialization
Given a network (D, g , s, t):
Z. Szigeti OCG-ORCO 17 / 29
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Labelling
Example
There exists g -feasible (s, t)-preflows with no x -valid (s, t)-labelling.
Z. Szigeti OCG-ORCO 19 / 29
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Distance and labelling
Corollary
distDx(u, t) ≥ ℓ(u) ∀u ∈ V .
4
ts
b
a3
0
4
Z. Szigeti OCG-ORCO 23 / 29
Distance and labelling
Corollary
distDx(u, t) ≥ ℓ(u) ∀u ∈ V .
Idea
4
ts
b
a3
0
4
Z. Szigeti OCG-ORCO 23 / 29
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
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
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
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
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
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
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
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
No tight arcs
Example
1 Active vertex exists but no tight arc exists.
Z. Szigeti OCG-ORCO 25 / 29
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
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
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
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
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
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
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
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
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
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
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
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
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
Relabel
Lemma
After executing Operation Relabel at u, the new labelling ℓ′ is x -valid.
Z. Szigeti OCG-ORCO 27 / 29
Relabel
Lemma
After executing Operation Relabel at u, the new labelling ℓ′ is x -valid.
Proof
Z. Szigeti OCG-ORCO 27 / 29
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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