Network Flow VI - Min-Cost Flow Applications Lecture 17 October - - PowerPoint PPT Presentation

network flow vi min cost flow applications
SMART_READER_LITE
LIVE PREVIEW

Network Flow VI - Min-Cost Flow Applications Lecture 17 October - - PowerPoint PPT Presentation

CS 573: Algorithms, Fall 2013 Network Flow VI - Min-Cost Flow Applications Lecture 17 October 24, 2013 Sariel (UIUC) CS573 1 Fall 2013 1 / 27 Lemma decomposing flow into cycles . Lemma . f :a circulation in G . Then, f can be


slide-1
SLIDE 1

CS 573: Algorithms, Fall 2013

Network Flow VI - Min-Cost Flow Applications

Lecture 17

October 24, 2013

Sariel (UIUC) CS573 1 Fall 2013 1 / 27

slide-2
SLIDE 2

Lemma – decomposing flow into cycles

.

Lemma

. . f:a circulation in G. Then, f can be decomposed into m cycles, C1, . . . , Cm, such that, ∀e ∈ E(G): f(e) = ∑t

i=1 λi · χCi(e),

λ1, . . . , λt > 0 and t ≤ m, m = |E(G)|. .

Proof

. . .

1

By conservation of flow, if f is not zero, then there is a cycle in f. (i) ... v: vertex non-zero flow into it. (ii) walk on an adjacent edge that has positive flow on it. (iii) Repeat, till visit a vertex that was already visited. (iv) Extract cycle contained in this walk.

Sariel (UIUC) CS573 2 Fall 2013 2 / 27

slide-3
SLIDE 3

Proof continued...

.

Proof continued:

. . .

1

C1: such a cycle. . .

2

every edge of C1 has positive flow. . .

3

λ1: smallest amount of flow on any edge of C1. e1 this edge. . .

4

g = f − λ1 · χC1. g has zero flow on e1. It is a (weak) circulation. . .

5

Removed e1 from G. H: new graph. . .

6

By induction on g on H... . .

7

= ⇒ g can be decomposed into m − 1 cycles with positive coefficients. . .

8

These cycles + C1 (with λ1) implies the claim.

Sariel (UIUC) CS573 3 Fall 2013 3 / 27

slide-4
SLIDE 4

Proof continued...

.

Proof continued:

. . .

1

C1: such a cycle. . .

2

every edge of C1 has positive flow. . .

3

λ1: smallest amount of flow on any edge of C1. e1 this edge. . .

4

g = f − λ1 · χC1. g has zero flow on e1. It is a (weak) circulation. . .

5

Removed e1 from G. H: new graph. . .

6

By induction on g on H... . .

7

= ⇒ g can be decomposed into m − 1 cycles with positive coefficients. . .

8

These cycles + C1 (with λ1) implies the claim.

Sariel (UIUC) CS573 3 Fall 2013 3 / 27

slide-5
SLIDE 5

Proof continued...

.

Proof continued:

. . .

1

C1: such a cycle. . .

2

every edge of C1 has positive flow. . .

3

λ1: smallest amount of flow on any edge of C1. e1 this edge. . .

4

g = f − λ1 · χC1. g has zero flow on e1. It is a (weak) circulation. . .

5

Removed e1 from G. H: new graph. . .

6

By induction on g on H... . .

7

= ⇒ g can be decomposed into m − 1 cycles with positive coefficients. . .

8

These cycles + C1 (with λ1) implies the claim.

Sariel (UIUC) CS573 3 Fall 2013 3 / 27

slide-6
SLIDE 6

Proof continued...

.

Proof continued:

. . .

1

C1: such a cycle. . .

2

every edge of C1 has positive flow. . .

3

λ1: smallest amount of flow on any edge of C1. e1 this edge. . .

4

g = f − λ1 · χC1. g has zero flow on e1. It is a (weak) circulation. . .

5

Removed e1 from G. H: new graph. . .

6

By induction on g on H... . .

7

= ⇒ g can be decomposed into m − 1 cycles with positive coefficients. . .

8

These cycles + C1 (with λ1) implies the claim.

Sariel (UIUC) CS573 3 Fall 2013 3 / 27

slide-7
SLIDE 7

Proof continued...

.

Proof continued:

. . .

1

C1: such a cycle. . .

2

every edge of C1 has positive flow. . .

3

λ1: smallest amount of flow on any edge of C1. e1 this edge. . .

4

g = f − λ1 · χC1. g has zero flow on e1. It is a (weak) circulation. . .

5

Removed e1 from G. H: new graph. . .

6

By induction on g on H... . .

7

= ⇒ g can be decomposed into m − 1 cycles with positive coefficients. . .

8

These cycles + C1 (with λ1) implies the claim.

Sariel (UIUC) CS573 3 Fall 2013 3 / 27

slide-8
SLIDE 8

Proof continued...

.

Proof continued:

. . .

1

C1: such a cycle. . .

2

every edge of C1 has positive flow. . .

3

λ1: smallest amount of flow on any edge of C1. e1 this edge. . .

4

g = f − λ1 · χC1. g has zero flow on e1. It is a (weak) circulation. . .

5

Removed e1 from G. H: new graph. . .

6

By induction on g on H... . .

7

= ⇒ g can be decomposed into m − 1 cycles with positive coefficients. . .

8

These cycles + C1 (with λ1) implies the claim.

Sariel (UIUC) CS573 3 Fall 2013 3 / 27

slide-9
SLIDE 9

Proof continued...

.

Proof continued:

. . .

1

C1: such a cycle. . .

2

every edge of C1 has positive flow. . .

3

λ1: smallest amount of flow on any edge of C1. e1 this edge. . .

4

g = f − λ1 · χC1. g has zero flow on e1. It is a (weak) circulation. . .

5

Removed e1 from G. H: new graph. . .

6

By induction on g on H... . .

7

= ⇒ g can be decomposed into m − 1 cycles with positive coefficients. . .

8

These cycles + C1 (with λ1) implies the claim.

Sariel (UIUC) CS573 3 Fall 2013 3 / 27

slide-10
SLIDE 10

Proof continued...

.

Proof continued:

. . .

1

C1: such a cycle. . .

2

every edge of C1 has positive flow. . .

3

λ1: smallest amount of flow on any edge of C1. e1 this edge. . .

4

g = f − λ1 · χC1. g has zero flow on e1. It is a (weak) circulation. . .

5

Removed e1 from G. H: new graph. . .

6

By induction on g on H... . .

7

= ⇒ g can be decomposed into m − 1 cycles with positive coefficients. . .

8

These cycles + C1 (with λ1) implies the claim.

Sariel (UIUC) CS573 3 Fall 2013 3 / 27

slide-11
SLIDE 11

Proof continued...

.

Proof continued:

. . .

1

C1: such a cycle. . .

2

every edge of C1 has positive flow. . .

3

λ1: smallest amount of flow on any edge of C1. e1 this edge. . .

4

g = f − λ1 · χC1. g has zero flow on e1. It is a (weak) circulation. . .

5

Removed e1 from G. H: new graph. . .

6

By induction on g on H... . .

7

= ⇒ g can be decomposed into m − 1 cycles with positive coefficients. . .

8

These cycles + C1 (with λ1) implies the claim.

Sariel (UIUC) CS573 3 Fall 2013 3 / 27

slide-12
SLIDE 12

Result

.

Theorem

. . A flow f is a minimum cost feasible circulation ⇐ ⇒ each directed cycle of Gf has nonnegative cost. .

Proof

. . .

1

C: a negative cost cycle in Gf. . .

2

Circulate more flow on C and reduce price. . .

3

ε > 0: sufficiently small constant: g = f + ε ∗ χC is feasible circulation . .

4

cost(g) = cost(f) + ∑

e∈C κ(e) ∗ ε

= cost(f) + ε ∗ ∑

e∈C κ(e) = cost(f) + ε ∗ κ(C)

< cost(f), since κ(C) < 0. A contradiction.

Sariel (UIUC) CS573 4 Fall 2013 4 / 27

slide-13
SLIDE 13

Result

.

Theorem

. . A flow f is a minimum cost feasible circulation ⇐ ⇒ each directed cycle of Gf has nonnegative cost. .

Proof

. . .

1

C: a negative cost cycle in Gf. . .

2

Circulate more flow on C and reduce price. . .

3

ε > 0: sufficiently small constant: g = f + ε ∗ χC is feasible circulation . .

4

cost(g) = cost(f) + ∑

e∈C κ(e) ∗ ε

= cost(f) + ε ∗ ∑

e∈C κ(e) = cost(f) + ε ∗ κ(C)

< cost(f), since κ(C) < 0. A contradiction.

Sariel (UIUC) CS573 4 Fall 2013 4 / 27

slide-14
SLIDE 14

Result

.

Theorem

. . A flow f is a minimum cost feasible circulation ⇐ ⇒ each directed cycle of Gf has nonnegative cost. .

Proof

. . .

1

C: a negative cost cycle in Gf. . .

2

Circulate more flow on C and reduce price. . .

3

ε > 0: sufficiently small constant: g = f + ε ∗ χC is feasible circulation . .

4

cost(g) = cost(f) + ∑

e∈C κ(e) ∗ ε

= cost(f) + ε ∗ ∑

e∈C κ(e) = cost(f) + ε ∗ κ(C)

< cost(f), since κ(C) < 0. A contradiction.

Sariel (UIUC) CS573 4 Fall 2013 4 / 27

slide-15
SLIDE 15

Result

.

Theorem

. . A flow f is a minimum cost feasible circulation ⇐ ⇒ each directed cycle of Gf has nonnegative cost. .

Proof

. . .

1

C: a negative cost cycle in Gf. . .

2

Circulate more flow on C and reduce price. . .

3

ε > 0: sufficiently small constant: g = f + ε ∗ χC is feasible circulation . .

4

cost(g) = cost(f) + ∑

e∈C κ(e) ∗ ε

= cost(f) + ε ∗ ∑

e∈C κ(e) = cost(f) + ε ∗ κ(C)

< cost(f), since κ(C) < 0. A contradiction.

Sariel (UIUC) CS573 4 Fall 2013 4 / 27

slide-16
SLIDE 16

Result

.

Theorem

. . A flow f is a minimum cost feasible circulation ⇐ ⇒ each directed cycle of Gf has nonnegative cost. .

Proof

. . .

1

C: a negative cost cycle in Gf. . .

2

Circulate more flow on C and reduce price. . .

3

ε > 0: sufficiently small constant: g = f + ε ∗ χC is feasible circulation . .

4

cost(g) = cost(f) + ∑

e∈C κ(e) ∗ ε

= cost(f) + ε ∗ ∑

e∈C κ(e) = cost(f) + ε ∗ κ(C)

< cost(f), since κ(C) < 0. A contradiction.

Sariel (UIUC) CS573 4 Fall 2013 4 / 27

slide-17
SLIDE 17

Proof of other direction...

.

Proof of other direction

. . .

1

Assume all cycles in Gf have non-negative cost. . .

2

g any feasible circulation. . .

3

Weak circulation: h = g − f. . .

4

By lemma: all edges used by h are in Gf. . .

5

By other lemma: ∃t ≤ |E(Gf)| cycles C1, . . . , Ct in Gf, and coefficients λ1, . . . , λt: h(e) = ∑t

i=1 λiχCi(e).

. .

6

cost(g) − cost(f) = cost(h) = cost

(∑t

i=1 λiχCi

)

=

∑t

i=1 λicost(χCi) = ∑t i=1 λiκ (Ci) ≥ 0, as κ(Ci) ≥ 0,

since there are no negative cycles in Gf. . .

7

= ⇒ cost(g) ≥ cost(f). = ⇒ f minimum-cost circulation.

Sariel (UIUC) CS573 5 Fall 2013 5 / 27

slide-18
SLIDE 18

Proof of other direction...

.

Proof of other direction

. . .

1

Assume all cycles in Gf have non-negative cost. . .

2

g any feasible circulation. . .

3

Weak circulation: h = g − f. . .

4

By lemma: all edges used by h are in Gf. . .

5

By other lemma: ∃t ≤ |E(Gf)| cycles C1, . . . , Ct in Gf, and coefficients λ1, . . . , λt: h(e) = ∑t

i=1 λiχCi(e).

. .

6

cost(g) − cost(f) = cost(h) = cost

(∑t

i=1 λiχCi

)

=

∑t

i=1 λicost(χCi) = ∑t i=1 λiκ (Ci) ≥ 0, as κ(Ci) ≥ 0,

since there are no negative cycles in Gf. . .

7

= ⇒ cost(g) ≥ cost(f). = ⇒ f minimum-cost circulation.

Sariel (UIUC) CS573 5 Fall 2013 5 / 27

slide-19
SLIDE 19

Proof of other direction...

.

Proof of other direction

. . .

1

Assume all cycles in Gf have non-negative cost. . .

2

g any feasible circulation. . .

3

Weak circulation: h = g − f. . .

4

By lemma: all edges used by h are in Gf. . .

5

By other lemma: ∃t ≤ |E(Gf)| cycles C1, . . . , Ct in Gf, and coefficients λ1, . . . , λt: h(e) = ∑t

i=1 λiχCi(e).

. .

6

cost(g) − cost(f) = cost(h) = cost

(∑t

i=1 λiχCi

)

=

∑t

i=1 λicost(χCi) = ∑t i=1 λiκ (Ci) ≥ 0, as κ(Ci) ≥ 0,

since there are no negative cycles in Gf. . .

7

= ⇒ cost(g) ≥ cost(f). = ⇒ f minimum-cost circulation.

Sariel (UIUC) CS573 5 Fall 2013 5 / 27

slide-20
SLIDE 20

Proof of other direction...

.

Proof of other direction

. . .

1

Assume all cycles in Gf have non-negative cost. . .

2

g any feasible circulation. . .

3

Weak circulation: h = g − f. . .

4

By lemma: all edges used by h are in Gf. . .

5

By other lemma: ∃t ≤ |E(Gf)| cycles C1, . . . , Ct in Gf, and coefficients λ1, . . . , λt: h(e) = ∑t

i=1 λiχCi(e).

. .

6

cost(g) − cost(f) = cost(h) = cost

(∑t

i=1 λiχCi

)

=

∑t

i=1 λicost(χCi) = ∑t i=1 λiκ (Ci) ≥ 0, as κ(Ci) ≥ 0,

since there are no negative cycles in Gf. . .

7

= ⇒ cost(g) ≥ cost(f). = ⇒ f minimum-cost circulation.

Sariel (UIUC) CS573 5 Fall 2013 5 / 27

slide-21
SLIDE 21

Proof of other direction...

.

Proof of other direction

. . .

1

Assume all cycles in Gf have non-negative cost. . .

2

g any feasible circulation. . .

3

Weak circulation: h = g − f. . .

4

By lemma: all edges used by h are in Gf. . .

5

By other lemma: ∃t ≤ |E(Gf)| cycles C1, . . . , Ct in Gf, and coefficients λ1, . . . , λt: h(e) = ∑t

i=1 λiχCi(e).

. .

6

cost(g) − cost(f) = cost(h) = cost

(∑t

i=1 λiχCi

)

=

∑t

i=1 λicost(χCi) = ∑t i=1 λiκ (Ci) ≥ 0, as κ(Ci) ≥ 0,

since there are no negative cycles in Gf. . .

7

= ⇒ cost(g) ≥ cost(f). = ⇒ f minimum-cost circulation.

Sariel (UIUC) CS573 5 Fall 2013 5 / 27

slide-22
SLIDE 22

Proof of other direction...

.

Proof of other direction

. . .

1

Assume all cycles in Gf have non-negative cost. . .

2

g any feasible circulation. . .

3

Weak circulation: h = g − f. . .

4

By lemma: all edges used by h are in Gf. . .

5

By other lemma: ∃t ≤ |E(Gf)| cycles C1, . . . , Ct in Gf, and coefficients λ1, . . . , λt: h(e) = ∑t

i=1 λiχCi(e).

. .

6

cost(g) − cost(f) = cost(h) = cost

(∑t

i=1 λiχCi

)

=

∑t

i=1 λicost(χCi) = ∑t i=1 λiκ (Ci) ≥ 0, as κ(Ci) ≥ 0,

since there are no negative cycles in Gf. . .

7

= ⇒ cost(g) ≥ cost(f). = ⇒ f minimum-cost circulation.

Sariel (UIUC) CS573 5 Fall 2013 5 / 27

slide-23
SLIDE 23

Proof of other direction...

.

Proof of other direction

. . .

1

Assume all cycles in Gf have non-negative cost. . .

2

g any feasible circulation. . .

3

Weak circulation: h = g − f. . .

4

By lemma: all edges used by h are in Gf. . .

5

By other lemma: ∃t ≤ |E(Gf)| cycles C1, . . . , Ct in Gf, and coefficients λ1, . . . , λt: h(e) = ∑t

i=1 λiχCi(e).

. .

6

cost(g) − cost(f) = cost(h) = cost

(∑t

i=1 λiχCi

)

=

∑t

i=1 λicost(χCi) = ∑t i=1 λiκ (Ci) ≥ 0, as κ(Ci) ≥ 0,

since there are no negative cycles in Gf. . .

7

= ⇒ cost(g) ≥ cost(f). = ⇒ f minimum-cost circulation.

Sariel (UIUC) CS573 5 Fall 2013 5 / 27

slide-24
SLIDE 24

Part I

. .

A Strongly Polynomial Time Algorithm for Min-Cost Flow

Sariel (UIUC) CS573 6 Fall 2013 6 / 27

slide-25
SLIDE 25

A Strongly Polynomial Time Algorithm for Min-Cost Flow

. .

1

Start from a feasible circulation f. . .

2

Computed using unweighted algorithm (uses max-flow algorithm). . .

3

Repeat: (A) find cycle C of minimum average cost in Gf. (B) If cost of C is non-negative. Done. (C) Circulate as much flow as possible along C (without violating the lower-bound constraints and capacity constraints), (D) Reduces cost. (E) Compute such a cycle in O(mn) time.

Sariel (UIUC) CS573 7 Fall 2013 7 / 27

slide-26
SLIDE 26

Analysis...

. .

1

Algorithm preserve integrality. . .

2

cost of the flow is monotonically decreasing. . .

3

algorithm would terminate if all the number involved are integers. . .

4

This algorithm performs a polynomial number of iterations in n and m. . .

5

Simple algorithm!

Sariel (UIUC) CS573 8 Fall 2013 8 / 27

slide-27
SLIDE 27

Notations

f, g, h, i Flows or circulations Gf The residual graph for f c(e) The capacity of the flow on e ℓ(e) The lower-bound (i.e., demand) on the flow on e cost(f) The overall cost of the flow f κ(e) The cost of sending one unit of flow on e ψ(e) The reduced cost of e

Sariel (UIUC) CS573 9 Fall 2013 9 / 27

slide-28
SLIDE 28

Analysis

. .

1

fi: flow in the beginning of the ith iteration. . .

2

Ci cycle used in the ith iteration. . .

3

Cf: minimum average-length cycle of Gf. . .

4

µ(f) = κ(Cf)/ |Cf| average “cost” per edge of Cf. .

Lemma

. . Let f be a flow, and let g the flow resulting from applying the cycle C = Cf to it. Then, µ(g) ≥ µ(f). .

Proof.

. . See class notes.

Sariel (UIUC) CS573 10 Fall 2013 10 / 27

slide-29
SLIDE 29

Lemma

.

Lemma

. . Let f be a flow used in the ith iteration of the algorithm, let g be the flow used in the (i + m)th iteration, where m is the number of edges in G. Furthermore, assume that the algorithm performed at least one more iteration on g. Then, µ(g) ≥ (1 − 1/n)µ(f). .

Proof.

. . See class notes.

Sariel (UIUC) CS573 11 Fall 2013 11 / 27

slide-30
SLIDE 30

Edges disappear

.

Lemma

. . Let f be the circulation maintained by the algorithm at iteration ρ. Then there exists an edge e in the residual network Gf such that it never appears in the residual networks of circulations maintained by the algorithm, for iterations larger than ρ + t, where t = 2nm ⌈ln n⌉. .

Proof.

. . See class notes.

Sariel (UIUC) CS573 12 Fall 2013 12 / 27

slide-31
SLIDE 31

The result

. .

1

at least one edge disappears forever every O(mn log n) iterations. . .

2

it follows that after O(m2n log n) iterations algorithm terminates. . .

3

Every iteration takes O(mn) time. .

Theorem

. . Given a digraph G with n vertices and m edges, lower bound and upper bound on the flow of each edge, and a cost associated with each edge, then one can compute a valid circulation of minimum-cost in O(m3n2 log n) time.

Sariel (UIUC) CS573 13 Fall 2013 13 / 27

slide-32
SLIDE 32

Bibliographical Notes

. .

1

minimum average cost cycle algorithm is due to Karp Karp [1978]. . .

2

Our follows Schrijver [2004]. . .

3

First strongly polynomial time algorithm for minimum-cost circulation is due to ´ Eva Tardos Tardos [1985]. . .

4

Algorithm show Andrew Goldberg and Robert Tarjan Goldberg and Tarjan [1989]. . .

5

Initial research on this problem can be traced back to the 1940s. . .

6

Took almost fifty years to find a satisfactory solution!

Sariel (UIUC) CS573 14 Fall 2013 14 / 27

slide-33
SLIDE 33

Part II

. .

Applications of min cost flow

Sariel (UIUC) CS573 15 Fall 2013 15 / 27

slide-34
SLIDE 34

Efficient flow

. .

1

A flow f would be considered to be efficient if it contains no cycles in it. . .

2

Ford-Fulkerson algorithm might generate flows with cycles. . .

3

See figure... . .

4

A in middle of edges: split the edge into multiple edges by introducing vertoces/ .

5

All edges have capacity one. .

6

Demonstrate how to get cycle...

s t

u v w

Sariel (UIUC) CS573 16 Fall 2013 16 / 27

slide-35
SLIDE 35

Efficient flow

. .

1

A flow f would be considered to be efficient if it contains no cycles in it. . .

2

Ford-Fulkerson algorithm might generate flows with cycles. . .

3

See figure... . .

4

A in middle of edges: split the edge into multiple edges by introducing vertoces/ .

5

All edges have capacity one. .

6

Demonstrate how to get cycle...

s t

u v w

Sariel (UIUC) CS573 16 Fall 2013 16 / 27

slide-36
SLIDE 36

Efficient flow

. .

1

A flow f would be considered to be efficient if it contains no cycles in it. . .

2

Ford-Fulkerson algorithm might generate flows with cycles. . .

3

See figure... . .

4

A in middle of edges: split the edge into multiple edges by introducing vertoces/ .

5

All edges have capacity one. .

6

Demonstrate how to get cycle...

s t

u v w

Sariel (UIUC) CS573 16 Fall 2013 16 / 27

slide-37
SLIDE 37

Efficient flow

. .

1

A flow f would be considered to be efficient if it contains no cycles in it. . .

2

Ford-Fulkerson algorithm might generate flows with cycles. . .

3

See figure... . .

4

A in middle of edges: split the edge into multiple edges by introducing vertoces/ .

5

All edges have capacity one. .

6

Demonstrate how to get cycle...

s t

u v w

Sariel (UIUC) CS573 16 Fall 2013 16 / 27

slide-38
SLIDE 38

Efficient flow

. .

1

A flow f would be considered to be efficient if it contains no cycles in it. . .

2

Ford-Fulkerson algorithm might generate flows with cycles. . .

3

See figure... . .

4

A in middle of edges: split the edge into multiple edges by introducing vertoces/ .

5

All edges have capacity one. .

6

Demonstrate how to get cycle...

s t

u v w

Sariel (UIUC) CS573 16 Fall 2013 16 / 27

slide-39
SLIDE 39

Efficient flow

. .

1

compute the max flow in G. . .

2

α be value of this flow. . .

3

compute min-cost flow in this network from s to t with flow α. . .

4

Every edge has cost one. . .

5

New flow will not contain any cycles! . .

6

Can also be achieved directly by removing cycles directly in the

  • flow. Might be less efficient than the min-cost flow computed.

.

Theorem

. . Computing an efficient (i.e., acyclic) max-flow can be done in polynomial time.

Sariel (UIUC) CS573 17 Fall 2013 17 / 27

slide-40
SLIDE 40

Efficient flow

. .

1

compute the max flow in G. . .

2

α be value of this flow. . .

3

compute min-cost flow in this network from s to t with flow α. . .

4

Every edge has cost one. . .

5

New flow will not contain any cycles! . .

6

Can also be achieved directly by removing cycles directly in the

  • flow. Might be less efficient than the min-cost flow computed.

.

Theorem

. . Computing an efficient (i.e., acyclic) max-flow can be done in polynomial time.

Sariel (UIUC) CS573 17 Fall 2013 17 / 27

slide-41
SLIDE 41

Efficient flow

. .

1

compute the max flow in G. . .

2

α be value of this flow. . .

3

compute min-cost flow in this network from s to t with flow α. . .

4

Every edge has cost one. . .

5

New flow will not contain any cycles! . .

6

Can also be achieved directly by removing cycles directly in the

  • flow. Might be less efficient than the min-cost flow computed.

.

Theorem

. . Computing an efficient (i.e., acyclic) max-flow can be done in polynomial time.

Sariel (UIUC) CS573 17 Fall 2013 17 / 27

slide-42
SLIDE 42

Lower bounds and efficient flows

. .

1

AFWLB: acyclic flow with lower-bounds. . .

2

Compute efficient flow (acyclic) with lower bounds on the edges. . .

3

Require that the returned flow is integral, if all the numbers involved are integers. . .

4

This problem is NP-Complete. . .

5

Because...

Hamiltonian Path

Instance: A directed graph G and two vertices s and t. Question: Is there a Hamiltonian path (i.e., a path visiting every vertex exactly once) in G starting at s and ending at t?

Sariel (UIUC) CS573 18 Fall 2013 18 / 27

slide-43
SLIDE 43

Lower bounds and efficient flows

. .

1

AFWLB: acyclic flow with lower-bounds. . .

2

Compute efficient flow (acyclic) with lower bounds on the edges. . .

3

Require that the returned flow is integral, if all the numbers involved are integers. . .

4

This problem is NP-Complete. . .

5

Because...

Hamiltonian Path

Instance: A directed graph G and two vertices s and t. Question: Is there a Hamiltonian path (i.e., a path visiting every vertex exactly once) in G starting at s and ending at t?

Sariel (UIUC) CS573 18 Fall 2013 18 / 27

slide-44
SLIDE 44

Lower bounds and efficient flows

. .

1

Hamiltonian Path is NP-Complete . .

2

reduce Hamiltonian Path to AFWLB. . .

3

Replace vertex of G with two vertices and a direct edge in between them. (except for the source vertex s and the sink vertex t). . .

4

Set the lower-bound and capacity of each such edge to 1. Let H denote the resulting graph. . .

5

Consider an acyclic flow in H of capacity 1 from s to t which is

  • integral. Its 0/1-flow, and as such it defines a path that visits

all the special edges we created. . .

6

Corresponds to a path in the original graph that starts at s, visits all the vertices of G and ends up at t.

Sariel (UIUC) CS573 19 Fall 2013 19 / 27

slide-45
SLIDE 45

Lower bounds and efficient flows

.

Theorem

. . Computing an efficient (i.e., acyclic) max-flow with lower-bounds is

NP-Hard (where the flow must be integral). The related decision

problem (of whether such a flow exist) is NP-Complete. . .

1

Confusing... . .

2

We can model an acyclic max-flow problem with lower bounds as min-cost flow, and solve it, no? . .

3

Not quite. Solution returned from the min-cost flow might have cycles. . .

4

Can not remove them by canceling the cycles. . .

5

Removing cycles was only possible when there was no lower bounds. .

6

min-cost flow algorithm would return us a solution with cycles in it if there are lower bounds on the edges.

Sariel (UIUC) CS573 20 Fall 2013 20 / 27

slide-46
SLIDE 46

Lower bounds and efficient flows

.

Theorem

. . Computing an efficient (i.e., acyclic) max-flow with lower-bounds is

NP-Hard (where the flow must be integral). The related decision

problem (of whether such a flow exist) is NP-Complete. . .

1

Confusing... . .

2

We can model an acyclic max-flow problem with lower bounds as min-cost flow, and solve it, no? . .

3

Not quite. Solution returned from the min-cost flow might have cycles. . .

4

Can not remove them by canceling the cycles. . .

5

Removing cycles was only possible when there was no lower bounds. .

6

min-cost flow algorithm would return us a solution with cycles in it if there are lower bounds on the edges.

Sariel (UIUC) CS573 20 Fall 2013 20 / 27

slide-47
SLIDE 47

Lower bounds and efficient flows

.

Theorem

. . Computing an efficient (i.e., acyclic) max-flow with lower-bounds is

NP-Hard (where the flow must be integral). The related decision

problem (of whether such a flow exist) is NP-Complete. . .

1

Confusing... . .

2

We can model an acyclic max-flow problem with lower bounds as min-cost flow, and solve it, no? . .

3

Not quite. Solution returned from the min-cost flow might have cycles. . .

4

Can not remove them by canceling the cycles. . .

5

Removing cycles was only possible when there was no lower bounds. .

6

min-cost flow algorithm would return us a solution with cycles in it if there are lower bounds on the edges.

Sariel (UIUC) CS573 20 Fall 2013 20 / 27

slide-48
SLIDE 48

Lower bounds and efficient flows

.

Theorem

. . Computing an efficient (i.e., acyclic) max-flow with lower-bounds is

NP-Hard (where the flow must be integral). The related decision

problem (of whether such a flow exist) is NP-Complete. . .

1

Confusing... . .

2

We can model an acyclic max-flow problem with lower bounds as min-cost flow, and solve it, no? . .

3

Not quite. Solution returned from the min-cost flow might have cycles. . .

4

Can not remove them by canceling the cycles. . .

5

Removing cycles was only possible when there was no lower bounds. .

6

min-cost flow algorithm would return us a solution with cycles in it if there are lower bounds on the edges.

Sariel (UIUC) CS573 20 Fall 2013 20 / 27

slide-49
SLIDE 49

Lower bounds and efficient flows

.

Theorem

. . Computing an efficient (i.e., acyclic) max-flow with lower-bounds is

NP-Hard (where the flow must be integral). The related decision

problem (of whether such a flow exist) is NP-Complete. . .

1

Confusing... . .

2

We can model an acyclic max-flow problem with lower bounds as min-cost flow, and solve it, no? . .

3

Not quite. Solution returned from the min-cost flow might have cycles. . .

4

Can not remove them by canceling the cycles. . .

5

Removing cycles was only possible when there was no lower bounds. .

6

min-cost flow algorithm would return us a solution with cycles in it if there are lower bounds on the edges.

Sariel (UIUC) CS573 20 Fall 2013 20 / 27

slide-50
SLIDE 50

Lower bounds and efficient flows

.

Theorem

. . Computing an efficient (i.e., acyclic) max-flow with lower-bounds is

NP-Hard (where the flow must be integral). The related decision

problem (of whether such a flow exist) is NP-Complete. . .

1

Confusing... . .

2

We can model an acyclic max-flow problem with lower bounds as min-cost flow, and solve it, no? . .

3

Not quite. Solution returned from the min-cost flow might have cycles. . .

4

Can not remove them by canceling the cycles. . .

5

Removing cycles was only possible when there was no lower bounds. .

6

min-cost flow algorithm would return us a solution with cycles in it if there are lower bounds on the edges.

Sariel (UIUC) CS573 20 Fall 2013 20 / 27

slide-51
SLIDE 51

Shortest Edge-Disjoint Paths

. .

1

G: a directed graph. . .

2

Q: Compute k-edge disjoint paths from s to t. . .

3

Solve with network flow. . .

4

Can compute shortest k-edge disjoint paths using min-cost flow. . .

5

Assign cost 1 for every edge, and capacity 1 for every edge. . .

6

min-cost flow in this graph with value k, corresponds to a set of k edge disjoint paths, such that their total length is minimized.

Sariel (UIUC) CS573 21 Fall 2013 21 / 27

slide-52
SLIDE 52

Shortest Edge-Disjoint Paths

. .

1

G: a directed graph. . .

2

Q: Compute k-edge disjoint paths from s to t. . .

3

Solve with network flow. . .

4

Can compute shortest k-edge disjoint paths using min-cost flow. . .

5

Assign cost 1 for every edge, and capacity 1 for every edge. . .

6

min-cost flow in this graph with value k, corresponds to a set of k edge disjoint paths, such that their total length is minimized.

Sariel (UIUC) CS573 21 Fall 2013 21 / 27

slide-53
SLIDE 53

Shortest Edge-Disjoint Paths

. .

1

G: a directed graph. . .

2

Q: Compute k-edge disjoint paths from s to t. . .

3

Solve with network flow. . .

4

Can compute shortest k-edge disjoint paths using min-cost flow. . .

5

Assign cost 1 for every edge, and capacity 1 for every edge. . .

6

min-cost flow in this graph with value k, corresponds to a set of k edge disjoint paths, such that their total length is minimized.

Sariel (UIUC) CS573 21 Fall 2013 21 / 27

slide-54
SLIDE 54

Shortest Edge-Disjoint Paths

. .

1

G: a directed graph. . .

2

Q: Compute k-edge disjoint paths from s to t. . .

3

Solve with network flow. . .

4

Can compute shortest k-edge disjoint paths using min-cost flow. . .

5

Assign cost 1 for every edge, and capacity 1 for every edge. . .

6

min-cost flow in this graph with value k, corresponds to a set of k edge disjoint paths, such that their total length is minimized.

Sariel (UIUC) CS573 21 Fall 2013 21 / 27

slide-55
SLIDE 55

Shortest Edge-Disjoint Paths

. .

1

G: a directed graph. . .

2

Q: Compute k-edge disjoint paths from s to t. . .

3

Solve with network flow. . .

4

Can compute shortest k-edge disjoint paths using min-cost flow. . .

5

Assign cost 1 for every edge, and capacity 1 for every edge. . .

6

min-cost flow in this graph with value k, corresponds to a set of k edge disjoint paths, such that their total length is minimized.

Sariel (UIUC) CS573 21 Fall 2013 21 / 27

slide-56
SLIDE 56

Shortest Edge-Disjoint Paths

. .

1

G: a directed graph. . .

2

Q: Compute k-edge disjoint paths from s to t. . .

3

Solve with network flow. . .

4

Can compute shortest k-edge disjoint paths using min-cost flow. . .

5

Assign cost 1 for every edge, and capacity 1 for every edge. . .

6

min-cost flow in this graph with value k, corresponds to a set of k edge disjoint paths, such that their total length is minimized.

Sariel (UIUC) CS573 21 Fall 2013 21 / 27

slide-57
SLIDE 57

Covering by Cycles

. .

1

G: directed graph. . .

2

cover all its vertices by a set of cycles which are vertex disjoint. . .

3

can be done using min-cost flow. . .

4

∀u ∈ V(G) replace by an edge (u′ → u′′). . .

5

u: incoming edges connected u′. Outgoing edges start from u′′. . .

6

H: resulting graph. . .

7

All new edges have a lower bound/capacity = 1. . .

8

All other edges: no lower bound, capacity 1. . .

9

Compute minimum cost circulation in H. . .

10 corresponds to a collection of cycles in G covering all the

vertices of minimum cost. .

Theorem

. . G + costs on edges. Compute cover of G by a collection of vertex disjoint cycles, of min total cost of the cycle edges.

Sariel (UIUC) CS573 22 Fall 2013 22 / 27

slide-58
SLIDE 58

Covering by Cycles

. .

1

G: directed graph. . .

2

cover all its vertices by a set of cycles which are vertex disjoint. . .

3

can be done using min-cost flow. . .

4

∀u ∈ V(G) replace by an edge (u′ → u′′). . .

5

u: incoming edges connected u′. Outgoing edges start from u′′. . .

6

H: resulting graph. . .

7

All new edges have a lower bound/capacity = 1. . .

8

All other edges: no lower bound, capacity 1. . .

9

Compute minimum cost circulation in H. . .

10 corresponds to a collection of cycles in G covering all the

vertices of minimum cost. .

Theorem

. . G + costs on edges. Compute cover of G by a collection of vertex disjoint cycles, of min total cost of the cycle edges.

Sariel (UIUC) CS573 22 Fall 2013 22 / 27

slide-59
SLIDE 59

Covering by Cycles

. .

1

G: directed graph. . .

2

cover all its vertices by a set of cycles which are vertex disjoint. . .

3

can be done using min-cost flow. . .

4

∀u ∈ V(G) replace by an edge (u′ → u′′). . .

5

u: incoming edges connected u′. Outgoing edges start from u′′. . .

6

H: resulting graph. . .

7

All new edges have a lower bound/capacity = 1. . .

8

All other edges: no lower bound, capacity 1. . .

9

Compute minimum cost circulation in H. . .

10 corresponds to a collection of cycles in G covering all the

vertices of minimum cost. .

Theorem

. . G + costs on edges. Compute cover of G by a collection of vertex disjoint cycles, of min total cost of the cycle edges.

Sariel (UIUC) CS573 22 Fall 2013 22 / 27

slide-60
SLIDE 60

Covering by Cycles

. .

1

G: directed graph. . .

2

cover all its vertices by a set of cycles which are vertex disjoint. . .

3

can be done using min-cost flow. . .

4

∀u ∈ V(G) replace by an edge (u′ → u′′). . .

5

u: incoming edges connected u′. Outgoing edges start from u′′. . .

6

H: resulting graph. . .

7

All new edges have a lower bound/capacity = 1. . .

8

All other edges: no lower bound, capacity 1. . .

9

Compute minimum cost circulation in H. . .

10 corresponds to a collection of cycles in G covering all the

vertices of minimum cost. .

Theorem

. . G + costs on edges. Compute cover of G by a collection of vertex disjoint cycles, of min total cost of the cycle edges.

Sariel (UIUC) CS573 22 Fall 2013 22 / 27

slide-61
SLIDE 61

Covering by Cycles

. .

1

G: directed graph. . .

2

cover all its vertices by a set of cycles which are vertex disjoint. . .

3

can be done using min-cost flow. . .

4

∀u ∈ V(G) replace by an edge (u′ → u′′). . .

5

u: incoming edges connected u′. Outgoing edges start from u′′. . .

6

H: resulting graph. . .

7

All new edges have a lower bound/capacity = 1. . .

8

All other edges: no lower bound, capacity 1. . .

9

Compute minimum cost circulation in H. . .

10 corresponds to a collection of cycles in G covering all the

vertices of minimum cost. .

Theorem

. . G + costs on edges. Compute cover of G by a collection of vertex disjoint cycles, of min total cost of the cycle edges.

Sariel (UIUC) CS573 22 Fall 2013 22 / 27

slide-62
SLIDE 62

Covering by Cycles

. .

1

G: directed graph. . .

2

cover all its vertices by a set of cycles which are vertex disjoint. . .

3

can be done using min-cost flow. . .

4

∀u ∈ V(G) replace by an edge (u′ → u′′). . .

5

u: incoming edges connected u′. Outgoing edges start from u′′. . .

6

H: resulting graph. . .

7

All new edges have a lower bound/capacity = 1. . .

8

All other edges: no lower bound, capacity 1. . .

9

Compute minimum cost circulation in H. . .

10 corresponds to a collection of cycles in G covering all the

vertices of minimum cost. .

Theorem

. . G + costs on edges. Compute cover of G by a collection of vertex disjoint cycles, of min total cost of the cycle edges.

Sariel (UIUC) CS573 22 Fall 2013 22 / 27

slide-63
SLIDE 63

Covering by Cycles

. .

1

G: directed graph. . .

2

cover all its vertices by a set of cycles which are vertex disjoint. . .

3

can be done using min-cost flow. . .

4

∀u ∈ V(G) replace by an edge (u′ → u′′). . .

5

u: incoming edges connected u′. Outgoing edges start from u′′. . .

6

H: resulting graph. . .

7

All new edges have a lower bound/capacity = 1. . .

8

All other edges: no lower bound, capacity 1. . .

9

Compute minimum cost circulation in H. . .

10 corresponds to a collection of cycles in G covering all the

vertices of minimum cost. .

Theorem

. . G + costs on edges. Compute cover of G by a collection of vertex disjoint cycles, of min total cost of the cycle edges.

Sariel (UIUC) CS573 22 Fall 2013 22 / 27

slide-64
SLIDE 64

Covering by Cycles

. .

1

G: directed graph. . .

2

cover all its vertices by a set of cycles which are vertex disjoint. . .

3

can be done using min-cost flow. . .

4

∀u ∈ V(G) replace by an edge (u′ → u′′). . .

5

u: incoming edges connected u′. Outgoing edges start from u′′. . .

6

H: resulting graph. . .

7

All new edges have a lower bound/capacity = 1. . .

8

All other edges: no lower bound, capacity 1. . .

9

Compute minimum cost circulation in H. . .

10 corresponds to a collection of cycles in G covering all the

vertices of minimum cost. .

Theorem

. . G + costs on edges. Compute cover of G by a collection of vertex disjoint cycles, of min total cost of the cycle edges.

Sariel (UIUC) CS573 22 Fall 2013 22 / 27

slide-65
SLIDE 65

Covering by Cycles

. .

1

G: directed graph. . .

2

cover all its vertices by a set of cycles which are vertex disjoint. . .

3

can be done using min-cost flow. . .

4

∀u ∈ V(G) replace by an edge (u′ → u′′). . .

5

u: incoming edges connected u′. Outgoing edges start from u′′. . .

6

H: resulting graph. . .

7

All new edges have a lower bound/capacity = 1. . .

8

All other edges: no lower bound, capacity 1. . .

9

Compute minimum cost circulation in H. . .

10 corresponds to a collection of cycles in G covering all the

vertices of minimum cost. .

Theorem

. . G + costs on edges. Compute cover of G by a collection of vertex disjoint cycles, of min total cost of the cycle edges.

Sariel (UIUC) CS573 22 Fall 2013 22 / 27

slide-66
SLIDE 66

Covering by Cycles

. .

1

G: directed graph. . .

2

cover all its vertices by a set of cycles which are vertex disjoint. . .

3

can be done using min-cost flow. . .

4

∀u ∈ V(G) replace by an edge (u′ → u′′). . .

5

u: incoming edges connected u′. Outgoing edges start from u′′. . .

6

H: resulting graph. . .

7

All new edges have a lower bound/capacity = 1. . .

8

All other edges: no lower bound, capacity 1. . .

9

Compute minimum cost circulation in H. . .

10 corresponds to a collection of cycles in G covering all the

vertices of minimum cost. .

Theorem

. . G + costs on edges. Compute cover of G by a collection of vertex disjoint cycles, of min total cost of the cycle edges.

Sariel (UIUC) CS573 22 Fall 2013 22 / 27

slide-67
SLIDE 67

Covering by Cycles

. .

1

G: directed graph. . .

2

cover all its vertices by a set of cycles which are vertex disjoint. . .

3

can be done using min-cost flow. . .

4

∀u ∈ V(G) replace by an edge (u′ → u′′). . .

5

u: incoming edges connected u′. Outgoing edges start from u′′. . .

6

H: resulting graph. . .

7

All new edges have a lower bound/capacity = 1. . .

8

All other edges: no lower bound, capacity 1. . .

9

Compute minimum cost circulation in H. . .

10 corresponds to a collection of cycles in G covering all the

vertices of minimum cost. .

Theorem

. . G + costs on edges. Compute cover of G by a collection of vertex disjoint cycles, of min total cost of the cycle edges.

Sariel (UIUC) CS573 22 Fall 2013 22 / 27

slide-68
SLIDE 68

Minimum weight bipartite matching

. .

1

G: undirected bipartite graph G, . .

2

Task: Compute max cardinality matching in G t of minimum cost. . .

3

Reduce to network flow as done before. . .

4

Compute maximum flow. . .

5

any edge has capacity 1. Compute ϕ = size of matching. . .

6

Compute min-cost flow in G with this value ϕ. . .

7

Zero cost to new edges, original cost on other. .

8

min-cost flow corresponds to a maximum cardinality min-cost flow in the original graph. . .

9

Using: flow computed is integral, and as such, it is a 0/1-flow.

Sariel (UIUC) CS573 23 Fall 2013 23 / 27

slide-69
SLIDE 69

Minimum weight bipartite matching

t s

1 1

1

1

Sariel (UIUC) CS573 24 Fall 2013 24 / 27

slide-70
SLIDE 70

Minimum weight bipartite matching

.

Theorem

. . Given a bipartite graph G and costs on the edges, one can compute the maximum cardinality minimum cost matching in polynomial time.

Sariel (UIUC) CS573 25 Fall 2013 25 / 27

slide-71
SLIDE 71

The transportation problem

. .

1

Input: m facilities f1, . . . , fm. . .

2

fi: contains xi units of some commodity, for i = 1, . . . , m. . .

3

u1, . . . , un customers want to buy. . .

4

ui would like to by di units, for i = 1, . . . , n. . .

5

costs cij to send one unit of commodity from facility i to costumer j. . .

6

Q: how to supply the demands while minimizing the total cost.

Sariel (UIUC) CS573 26 Fall 2013 26 / 27

slide-72
SLIDE 72

The transportation problem

. .

1

Input: m facilities f1, . . . , fm. . .

2

fi: contains xi units of some commodity, for i = 1, . . . , m. . .

3

u1, . . . , un customers want to buy. . .

4

ui would like to by di units, for i = 1, . . . , n. . .

5

costs cij to send one unit of commodity from facility i to costumer j. . .

6

Q: how to supply the demands while minimizing the total cost.

Sariel (UIUC) CS573 26 Fall 2013 26 / 27

slide-73
SLIDE 73

The transportation problem

. .

1

Input: m facilities f1, . . . , fm. . .

2

fi: contains xi units of some commodity, for i = 1, . . . , m. . .

3

u1, . . . , un customers want to buy. . .

4

ui would like to by di units, for i = 1, . . . , n. . .

5

costs cij to send one unit of commodity from facility i to costumer j. . .

6

Q: how to supply the demands while minimizing the total cost.

Sariel (UIUC) CS573 26 Fall 2013 26 / 27

slide-74
SLIDE 74

The transportation problem

. .

1

Input: m facilities f1, . . . , fm. . .

2

fi: contains xi units of some commodity, for i = 1, . . . , m. . .

3

u1, . . . , un customers want to buy. . .

4

ui would like to by di units, for i = 1, . . . , n. . .

5

costs cij to send one unit of commodity from facility i to costumer j. . .

6

Q: how to supply the demands while minimizing the total cost.

Sariel (UIUC) CS573 26 Fall 2013 26 / 27

slide-75
SLIDE 75

The transportation problem

. .

1

Input: m facilities f1, . . . , fm. . .

2

fi: contains xi units of some commodity, for i = 1, . . . , m. . .

3

u1, . . . , un customers want to buy. . .

4

ui would like to by di units, for i = 1, . . . , n. . .

5

costs cij to send one unit of commodity from facility i to costumer j. . .

6

Q: how to supply the demands while minimizing the total cost.

Sariel (UIUC) CS573 26 Fall 2013 26 / 27

slide-76
SLIDE 76

The transportation problem

. .

1

Input: m facilities f1, . . . , fm. . .

2

fi: contains xi units of some commodity, for i = 1, . . . , m. . .

3

u1, . . . , un customers want to buy. . .

4

ui would like to by di units, for i = 1, . . . , n. . .

5

costs cij to send one unit of commodity from facility i to costumer j. . .

6

Q: how to supply the demands while minimizing the total cost.

Sariel (UIUC) CS573 26 Fall 2013 26 / 27

slide-77
SLIDE 77

Solution

. .

1

Create a bipartite graph with f1, . . . , fm on one side, and u1, . . . , un on the other side. . .

2

edge from (fi → uj): costs cij. . .

3

s: a source connected to fi with capacity xi. . .

4

edges from uj to the sink t, with capacity di. . .

5

Compute min-cost flow pushing ϕ = ∑

j dk units.

. .

6

Solution encodes the required optimal solution to the transportation problem. .

Theorem

. . The transportation problem can be solved in polynomial time. Sometime called the Earth mover distance.

Sariel (UIUC) CS573 27 Fall 2013 27 / 27

slide-78
SLIDE 78

Solution

. .

1

Create a bipartite graph with f1, . . . , fm on one side, and u1, . . . , un on the other side. . .

2

edge from (fi → uj): costs cij. . .

3

s: a source connected to fi with capacity xi. . .

4

edges from uj to the sink t, with capacity di. . .

5

Compute min-cost flow pushing ϕ = ∑

j dk units.

. .

6

Solution encodes the required optimal solution to the transportation problem. .

Theorem

. . The transportation problem can be solved in polynomial time. Sometime called the Earth mover distance.

Sariel (UIUC) CS573 27 Fall 2013 27 / 27

slide-79
SLIDE 79

Solution

. .

1

Create a bipartite graph with f1, . . . , fm on one side, and u1, . . . , un on the other side. . .

2

edge from (fi → uj): costs cij. . .

3

s: a source connected to fi with capacity xi. . .

4

edges from uj to the sink t, with capacity di. . .

5

Compute min-cost flow pushing ϕ = ∑

j dk units.

. .

6

Solution encodes the required optimal solution to the transportation problem. .

Theorem

. . The transportation problem can be solved in polynomial time. Sometime called the Earth mover distance.

Sariel (UIUC) CS573 27 Fall 2013 27 / 27

slide-80
SLIDE 80

Solution

. .

1

Create a bipartite graph with f1, . . . , fm on one side, and u1, . . . , un on the other side. . .

2

edge from (fi → uj): costs cij. . .

3

s: a source connected to fi with capacity xi. . .

4

edges from uj to the sink t, with capacity di. . .

5

Compute min-cost flow pushing ϕ = ∑

j dk units.

. .

6

Solution encodes the required optimal solution to the transportation problem. .

Theorem

. . The transportation problem can be solved in polynomial time. Sometime called the Earth mover distance.

Sariel (UIUC) CS573 27 Fall 2013 27 / 27

slide-81
SLIDE 81

Solution

. .

1

Create a bipartite graph with f1, . . . , fm on one side, and u1, . . . , un on the other side. . .

2

edge from (fi → uj): costs cij. . .

3

s: a source connected to fi with capacity xi. . .

4

edges from uj to the sink t, with capacity di. . .

5

Compute min-cost flow pushing ϕ = ∑

j dk units.

. .

6

Solution encodes the required optimal solution to the transportation problem. .

Theorem

. . The transportation problem can be solved in polynomial time. Sometime called the Earth mover distance.

Sariel (UIUC) CS573 27 Fall 2013 27 / 27

slide-82
SLIDE 82

Solution

. .

1

Create a bipartite graph with f1, . . . , fm on one side, and u1, . . . , un on the other side. . .

2

edge from (fi → uj): costs cij. . .

3

s: a source connected to fi with capacity xi. . .

4

edges from uj to the sink t, with capacity di. . .

5

Compute min-cost flow pushing ϕ = ∑

j dk units.

. .

6

Solution encodes the required optimal solution to the transportation problem. .

Theorem

. . The transportation problem can be solved in polynomial time. Sometime called the Earth mover distance.

Sariel (UIUC) CS573 27 Fall 2013 27 / 27

slide-83
SLIDE 83

Solution

. .

1

Create a bipartite graph with f1, . . . , fm on one side, and u1, . . . , un on the other side. . .

2

edge from (fi → uj): costs cij. . .

3

s: a source connected to fi with capacity xi. . .

4

edges from uj to the sink t, with capacity di. . .

5

Compute min-cost flow pushing ϕ = ∑

j dk units.

. .

6

Solution encodes the required optimal solution to the transportation problem. .

Theorem

. . The transportation problem can be solved in polynomial time. Sometime called the Earth mover distance.

Sariel (UIUC) CS573 27 Fall 2013 27 / 27

slide-84
SLIDE 84

Solution

. .

1

Create a bipartite graph with f1, . . . , fm on one side, and u1, . . . , un on the other side. . .

2

edge from (fi → uj): costs cij. . .

3

s: a source connected to fi with capacity xi. . .

4

edges from uj to the sink t, with capacity di. . .

5

Compute min-cost flow pushing ϕ = ∑

j dk units.

. .

6

Solution encodes the required optimal solution to the transportation problem. .

Theorem

. . The transportation problem can be solved in polynomial time. Sometime called the Earth mover distance.

Sariel (UIUC) CS573 27 Fall 2013 27 / 27

slide-85
SLIDE 85

Notes

Sariel (UIUC) CS573 28 Fall 2013 28 / 27

slide-86
SLIDE 86

Notes

Sariel (UIUC) CS573 29 Fall 2013 29 / 27

slide-87
SLIDE 87

Notes

Sariel (UIUC) CS573 30 Fall 2013 30 / 27

slide-88
SLIDE 88

Notes

Sariel (UIUC) CS573 31 Fall 2013 31 / 27

slide-89
SLIDE 89
  • A. V. Goldberg and R. E. Tarjan. Finding minimum-cost circulations

by canceling negative cycles. J. Assoc. Comput. Mach., 36(4): 873–886, 1989.

  • R. M. Karp. A characterization of the minimum cycle mean in a
  • digraph. Discrete Math., 23:309–311, 1978.
  • A. Schrijver. Combinatorial Optimization : Polyhedra and Efficiency

(Algorithms and Combinatorics). Springer, July 2004. ISBN 3540204563. ´

  • E. Tardos. A strongly polynomial minimum cost circulation
  • algorithm. Combinatorica, 5(3):247–255, 1985. ISSN 0209-9683.

Sariel (UIUC) CS573 31 Fall 2013 31 / 27