



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




3
1 2 3 4 5 1' 2' 3' 4' 5' Min cost perfect matching M = { 1-2', 2-3', 3-5', 4-1', 5-4' } cost(M) = 8 + 7 + 10 + 8 + 11 = 44
4
5
s t 1 1 1 X Y 6
x y matching M x y alternating path x y matching M' 7
1 2 1' 2' 10 6 7 2 cost(2 - 1') = 7 cost(2 - 2'- 1 - 1') = 2 - 6 + 10 = 6 8
1 2 1' 2' 10
13
Successive-Shortest-Path(X, Y, c) { M ← φ foreach x ∈ X: p(x) ← 0 foreach y ∈ Y: p(y) ← min (^) e into y c(e) while (M is not a perfect matching) { Compute shortest path distances d P ← shortest alternating path using costs cp M ← updated matching after augmenting along P foreach v ∈ X ∪ Y: p(v) ← p(v) + d(v) } return M } p is compatible with M = φ 14
Reduced costs: cp(x, y) = p(x) + c(x, y) - p(y). forward or reverse edges 15
Compatible prices. For each node v: (i) cp(x, y) ≥ 0 for for all (x, y) ∉ M. (ii) cp(x, y) = 0 for for all (x, y) ∈ M. 16
Compatible prices. For each node v: (i) cp(x, y) ≥ 0 for for all (x, y) ∉ M. (ii) cp(x, y) = 0 for for all (x, y) ∈ M.
17
18
m edges, n nodes
20
x 3 x 2 x 1 y 1 y 2 y 3 inputs outputs