Topics in Combinatorial OPtimization Orlando Lee Unicamp 19 de mar - - PowerPoint PPT Presentation

topics in combinatorial optimization
SMART_READER_LITE
LIVE PREVIEW

Topics in Combinatorial OPtimization Orlando Lee Unicamp 19 de mar - - PowerPoint PPT Presentation

Topics in Combinatorial OPtimization Orlando Lee Unicamp 19 de mar co de 2014 Orlando Lee Unicamp Topics in Combinatorial OPtimization Agradecimentos Este conjunto de slides foram preparados originalmente para o curso T opicos


slide-1
SLIDE 1

Topics in Combinatorial OPtimization

Orlando Lee – Unicamp 19 de mar¸ co de 2014

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-2
SLIDE 2

Agradecimentos

Este conjunto de slides foram preparados originalmente para o curso T´

  • picos de Otimiza¸

c˜ ao Combinat´

  • ria no primeiro

semestre de 2014 no Instituto de Computa¸ c˜ ao da Unicamp. Preparei os slides em inglˆ es simplesmente porque me deu vontade, mas as aulas ser˜ ao em portuguˆ es (do Brasil)! Agradecimentos especiais ao Prof. M´ ario Leston Rey. Sem sua ajuda, certamente estes slides nunca ficariam prontos a tempo. Qualquer erro encontrado nestes slide ´ e de minha inteira responsabilidade (Orlando Lee, 2014).

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-3
SLIDE 3

Feasible flows

Given a digraph D = (V , A), an arc capacity function u : A → R+, a supply function b : V → R in which b(v) > 0 means producer, and b(v) < 0 means consumer, find x : A → R such that: x(δout(v)) − x(δin(v)) = b(v) for every v ∈ V , and 0 ≤ x(a) ≤ u(a) for every a ∈ A.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-4
SLIDE 4

Feasible flows

4 2 −3 −3 3 3 3 3 2 2 2 4 1 Necessary condition: b(V ) = 0.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-5
SLIDE 5

Feasible flows

4 2 3 3 3 3 3 3 2 2 2 4 1 s t Set u(s, v) := b(v) se b(v) > 0, Set u(v, t) := −b(v) se b(v) < 0.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-6
SLIDE 6

Feasible flows

4 2 3 3 3 3 3 3 2 2 2 4 1 s t The system has a feasible solution if and only if the auxiliary network has a maximum st-flow which saturates all arcs leaving s or entering t.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-7
SLIDE 7

Feasible flows

Conclusion: checking whether there exists x : A → R such that: (a) x(δout(v)) − x(δin(v)) = b(v) for every v ∈ V , and (b) 0 ≤ x(a) ≤ u(a) for every a ∈ A can be done in polynomial time. For brevity, if x satisfies (a), we say that it is a b-flow. If x satisfies both (a) and (b), we say that it is a feasible b-flow. Later we will see a good characterization for the existence of a feasible b-flow. In other words, necessary and sufficient conditions that provide succinct certificates for both possible answers (yes or no).

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-8
SLIDE 8

Example: matrix rounding

Let M be a real matrix with dimensions p × q such that: the sum of the elements in row i is αi and the sum of the elements in column j is βj. We can round up or down any element r to ⌈r⌉ or ⌊r⌋ anyway we like.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-9
SLIDE 9

Example: matrix rounding

A consistent rounding of M is obtained by rounding the elements

  • f M, the values αi (i = 1, . . . , p) and the values βj (j = 1, . . . , q)

so that: the sum of the rounded elements in row i is equal to the rounding of αi and the sum of the rounded elements in column j is equal to the rounding of βj. Matrix rounding problem. Given a matrix M, find (if exists) a consistent rounding of M.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-10
SLIDE 10

Example: matrix rounding

3.1 6.8 7.3 17.2 9.6 2.4 0.7 12.7 3.6 1.2 6.5 11.3 16.3 10.4 14.5 Matrix rounding problem.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-11
SLIDE 11

Example: matrix rounding

3 3 7 7 17 10 1 13 2 2 6 11 11 16 14 Consistent rounding.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-12
SLIDE 12

Example: matrix rounding

We reduce Matrix Rounding Problem to the following problem. Given a network (D, s, t, l, u) where l, u are arc capacity functions in which for each a ∈ A:

  • l(a) is the lower capacity of a and
  • u(a) is the upper capacity of a,

find an st-flow f such that l(a) f (a) u(a) for every a ∈ A. In a few minutes, we will show how to solve this problem.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-13
SLIDE 13

Example: matrix rounding

  • Reduction. construct a network as follows:

let s be the source and t be the target, for each row i we have a vertex i, for each column j′ we have a vertex j′, for each pair i e j′ we have an arc (i, j′) with capacities (⌊mi,j⌋, ⌈mi,j⌉), for each vertex i we have an arc (s, i) with capacities (⌊αi⌋, ⌈αi⌉), and for each vertex j′ we have an arc (j′, t) with capacities (⌊βj⌋, ⌈βj⌉).

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-14
SLIDE 14

Example: matrix rounding

(l, u) i j′ s t 1 1′ 2 2′ 3 3′ (0, 1) (1, 2) (2, 3) (3, 4) (3, 4) (6, 7) (6, 7) (7, 8) (9, 10) (10, 11) (11, 12) (12, 13) (14, 15) (16, 17) (17, 18)

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-15
SLIDE 15

Example: matrix rounding

There exists a 1-1 correspondence between consistent roundings of M and feasible flows in the network. If ˜ M := ( ˜ mi,j), ˜ α and ˜ β is a consistent rounding, then f (a) =    ˜ mi,j se a = (i, j), ˜ αi se a = (s, i), ˜ βj se a = (j′, t) is a feasible flow in the network. Similarly, if f is a feasible (integral) flow in the network, then we can obtain a consistent rouding.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-16
SLIDE 16

Generalized networks

A generalized network is a network (D, s, t, l, u) where each arc a is associated to a pair of capacities (l(a), u(a)). Some typical problems: find a feasible flow f , find a feasible flow with maximum value, and find a feasible flow with minimum value.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-17
SLIDE 17

Generalized networks

Unlike the case in which l = 0, the problem of finding a feasible flow is more difficult. The resolution of an optimization problem in a generalized network is usually divided into two steps: finding a feasible flow, and given a feasible flow, finding a maximum one.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-18
SLIDE 18

MaxFlow in generalized networks

In order to prove optimality of a flow in a generalized network (D, s, t, l, u) we need the following concept. Define the (generalized) capacity of an st-cut δout(X) as cap(X) := u(δout(X)) − l(δin(X)).

  • Lemma. Let f be a feasible flow and δout(X) be an st-cut. Then

val(f ) ≤ cap(X) with equality only if f (a) = u(a) for every a ∈ δout(X) and f (a) = 0 for every a ∈ δin(X). Furthermore, if equality holds, then f is a maximum flow and δout(X) is a minimum generalized capacity st-cut.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-19
SLIDE 19

MaxFlow in generalized networks

Assume we know a feasible flow f in (D, s, t, l, u). Define a residual network D′

f = (V , A′ f ) with residual capacity

r as follows: (a) if f (a) < u(a) then a ∈ A′

f and r(a) = u(a) − f (a),

(b) if l(a) < f (a) then a−1 ∈ A′

f and r(a−1) = f (a) − l(a).

Note that the definiton of residual capacity is similar to case l = 0.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-20
SLIDE 20

MaxFlow in generalized networks (2,3)

(l, u) s s s t t t (1, 2) (2, 4) (1, 4) (0, 3) f 1 1 1 3 2 2 2 2 2 2 r

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-21
SLIDE 21

MaxFlow in generalized networks

Solve the MaxFlow problem on the network (D′

f , s, t, r). Let

f ′ be the maximum flow returned by the algorithm. Intuitively, f ′ is how much we must deviate from f to reach a maximum flow in the original network. Define a flow f ∗ of the original network as follows: (a) if a ∈ AD′

f ∩ A then f ∗(a) := f (a) + f ′(a), and

(b) if a−1 ∈ AD′

f ∩ A−1 then f ∗(a) := f (a) − f ′(a).

Clearly, f ∗ is a feasible flow in the original network. (Why?)

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-22
SLIDE 22

MaxFlow in generalized networks

We will show that f ∗ is a (feasible) maximum flow in the generalized network. Let δout(X) be a minimum st-cut of (D′

f , s, t, r). Then

f ′(e) = r(e) for every e ∈ δout

D′

f (X) and

f ′(e) = 0 for every e ∈ δin

D′

f (X).

Recall that (a) for each e ∈ δout

D′

f (X) either e = a for some arc a ∈ δout(X) or

e = a−1 for some arc a ∈ δin(X) and (b) for each e ∈ δin

D′

f (X) either e = a for some arc a ∈ δin(X) or

e = a−1 for some arc a ∈ δout(X).

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-23
SLIDE 23

MaxFlow in generalized networks

Analyzing these four possibilities we conclude that in D we have that (a) if a ∈ δout(X) then f ∗(a) = u(a) and (b) if a ∈ δin(X) then f ∗(a) = l(a). Hence, f ∗ is a maximum flow and δout(X) is a minimum generalized capacity cut in the generalized network.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-24
SLIDE 24

Generalized MaxFlow MinCut theorem

  • Theorem. (Generalized MaxFlow MinCut)

Let (D, s, t, l, u) be a generalized network. Then the value of a maximum flow is equal to the generalized capacity of a minimum st-cut. Note that any MaxFlow algorithm can be used for finding a maximum flow in a generalized network, as long as we have an initial feasible solution.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-25
SLIDE 25

Feasible flows

Let (D, s, t, l, u) be a generalized network. Two basic questions: How does one find a feasible flow, if it exists? If it does not exist, how does one exhibit a simple certificate

  • f this fact?

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-26
SLIDE 26

Feasible circulations

(l, u) (l, u) s s t t (1, 2) (1, 2) (2, 4) (2, 4) (1, 3) (1, 3) (1, 4) (1, 4) (0, 3) (0, 3) (0, ∞) Add an arc (t, s) to the network with capacities (0, ∞). The generalized network has a feasible st-flow if and only if the new network has a feasible circulation.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-27
SLIDE 27

Feasible circulation problem

So the problem consists in finding x : A → R such that: x(δout(v)) − x(δin(v)) = 0 for every v ∈ V , l(a) ≤ x(a) ≤ u(a) for every a ∈ A. We say that x is a feasble circulation.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-28
SLIDE 28

Feasible circulation problem

Replacing x(a) by x′(a) + l(a) we obtain: x′(δout(v)) − x′(δin(v)) = b(v) for every v ∈ V , 0 ≤ x′(a) ≤ u(a) − l(a) for every a ∈ A. where b(v) := l(δin(v)) − l(δout(v)). Therefore it suffices to find x′ satisfying conditions above. We have seen how this can be solved by a reduction to a MaxFlow problem!

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-29
SLIDE 29

Hoffman’s condition

Given a digraph D = (V , A) and capacities l, u : A → R with l u, we want to find out if there exists a feasible circulation. A necessary condition is the following: l(δin(X)) ≤ u(δout(X)) for every X ⊆ V . We will show that this condition is also sufficient. This can be done using the reduction to a MaxFlow on the previous slide (see also the first three slides). If the algorithm stops and returns a flow saturating all arcs leaving s then we obtain the desired flow. Otherwise, find a minimum cut δout(X). This s¯ t-set X is a set violating Hoffman’s cut condition. (Exercise)

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-30
SLIDE 30

Hoffman’s circulation theorem

  • Theorem. (Hoffman, 1960) Let D = (V , A) be a digraph with

capacities l, u : A → R such that l u. Then there exists a circulation x such that l x u if and only if l(δin(X)) ≤ u(δout(X)) for every X ⊆ V . Furthermore, if l, u are integral then x can be chosen integral. We present here another proof of Hoffman’s theorem. The proof does not imply a polynomial algorithm for this problem, but illustrates some finer points.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-31
SLIDE 31

Proof of Hoffman’s theorem

We can assume that l 0 by modifying the network if

  • necessary. (Why?)

Initialize x := 0. Thus, x u but possibly l x. We say that an arc a is unfeasible if x(a) < l(a) and feasible if l(a) x(a). Idea of the algorithm/proof: at each iteration we choose an unfeasible arc a and try to increase x(a). If this is not possible, then we find a set X violating Hoffman’s cut condition.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-32
SLIDE 32

Proof of Hoffman’s theorem

Define a residual graph D(x) as follows. For a feasible arc a (1) if x(a) < u(a) then put a in D(x) with residual capacity u(a) − x(a), and (2) if l(a) < x(a) then put a−1 in D(x) with residual capacity x(a) − l(a). For an unfeasible arc a (3) put a in D(x) with residual capacity u(a) − x(a).

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-33
SLIDE 33

Proof of Hoffman’s theorem

At each iteration the algorithm selects an unfeasible arc a = (v, w). Suppose first that there exists a wv-path P in D(x). Since the residual capacities are positive, the algorithm increases the flow along the cycle P + a, reducing the “unfeasibility”of a. Note that this operation does not affect the feasiblity of the remaining arcs.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-34
SLIDE 34

Proof of Hoffman’s theorem

Suppose then that there exists no wv-path in D(x). Let X be the set of vertices reachable from w in D(x). Then x(a) = u(a) for every a ∈ δout(X) and x(a) ≤ l(a) for every a ∈ δin(X). Note that (v, w) belongs to δin(X) e x(v, w) < l(v, w). Therefore, l(δin(X)) > u(δ+(X)), and X violates Hoffman’s cut condition.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-35
SLIDE 35

Some consequences

  • Theorem. Let D = (V , A) be a digraph, b : V → R be a

function with b(V ) = 0 and l, u : A → R be arc capacity functions with l u. Then the system x(δout(v)) − x(δin(v)) = b(v) for every v ∈ V , l(a) ≤ x(a) ≤ u(a) for every a ∈ A, has a a solution if and only if u(δout(X)) − l(δin(X)) ≥ b(X) for every X ⊆ V . Furthermore, if b, l, u are integral, we can choose x integral.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-36
SLIDE 36

Some consequences

Sketch of proof. Add a new vertex r and for each v ∈ V add an arc (v, r) with l(u, r) := u(v, r) := b(v). Then there exists a solution x if and only if there exists a circulation x′ in the new network with l ≤ x′ ≤ u. Hoffman’s cut condition is equivalent to the cut condition of the theorem.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-37
SLIDE 37

Some consequences

  • Theorem. (Gale, 1957) Let D = (V , A) be a digraph,

b : V → R be a function with b(V ) = 0 and u : A → R an arc capacity function. Then the system x(δout(v)) − x(δin(v)) = b(v) para todo v ∈ V , 0 ≤ x(a) ≤ u(a) para todo a ∈ A, has a solution if and only if u(δout(X)) ≥ b(X) for every X ⊆ V . Furthermore, if b, u are integral, we can choose x integral.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-38
SLIDE 38

Some consequences

  • Exercise. Derive from Hoffman’s theorem a necessary and

sufficient cut condition that a generalized network (D, s, t, l, u) must satisfy to have a feasible flow.

  • Theorem. (MinFlow MaxCut) Let (D, s, t, l, u) be a

generalized network which has a feasible st-flow. Then the minimum value of an st-flow is equal to the maximum of l(δout(X)) − u(δin(X)) for every s¯ t-set X. Furthermore, if l, u are integral then there exists an integral minimum flow.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-39
SLIDE 39

Some consequences

Sketch of proof. (very very sketchy. . . ) Let α be a real parameter. Add a new arc (t, s) with l(t, s) := 0 and u(t, s) := α. Then there exists a feasible flow f with val(f ) = α if and only if there exists a feasible circulation x′ in the new network with x′(t, s) = α. By Hoffman’s cut condition this holds if and only if l(δout(X)) − u(δin(X)) α for every s¯ t-set X. Thus the minimum value of α for which this holds corresponds to the maximum of the statement of the theorem.

Orlando Lee – Unicamp Topics in Combinatorial OPtimization

slide-40
SLIDE 40

References

  • A. Schrijver, Combinatorial Optimization, Vol. A, Springer.

W.J. Cook, W.H. Cunningham, W.R. Pulleyblank and A. Schrijver, Combinatorial Optimization, Wiley. R.K. Ahuja, T.L. Magnanti, J.B. Orlin, Network Flows: Theory, Algorithms and Applications, Prentice-Hall. Some old slides of mine. . .

Orlando Lee – Unicamp Topics in Combinatorial OPtimization