3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

26
3 t 4 1 2 s 2 s 1 2 1 4 2 3 3 1 3 3 3 1 black number next to an arc is its capacit

Upload: frederick-cuthbert-lynch

Post on 06-Jan-2018

214 views

Category:

Documents


1 download

DESCRIPTION

3 t s2s2 s1s b s 1 = 2 b s 2 = 2 b t =-4

TRANSCRIPT

Page 1: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

2s2

s1

2

1

4

2 3

3

1

3

3

3

1

the black number next to an arc is its capacity

Page 2: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

2s2

s1

2

11

4 2

2 56 3

13

1 5

33

13

5

1

3

1 1

the black number next to an arc is its capacitythe red number next to an arc is its unit flow cost

Page 3: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

2s2

s1

2

11

4 2

2 56 3

13

1 5

33

13

5

1

3

1 1

bs1= 2bs2= 2bt =-4

Page 4: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

2s2

s1

2

11

4 2

2 56 3

13

1 5

33

13

2

1 1

bs1= 2bs2= 2bt =-4

2

2 1

1

2 3 5

1

2

1

the black number next to an arc is its capacitythe red number next to an arc is its unit flow costthe green number next to an arc is its current flow

Page 5: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

2s2

s1

2

11

4 2

2 56 3

13

1 5

33

13

2

1 1

Cycle C={1,2,4,1}

2

2 1

1

2 3 5

1

2

1

Page 6: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

2s2

s1

2

11

4 2

2 56 3

13

1 5

33

13

2

1 1

Cycle C={1,2,4,1}

On C in the order given:{1,2} and {2,4} are forward arcs {1,4} is a backward arc

2

2 1

1

2 3 5

1

2

1

Page 7: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

2s2

s1

2

11

4 2

2 56 3

13

1 1 5

33

13

2

1 1

For Cycle C={1,2,4,1} define

+1 for all forward arcs on Ch(C)= -1 for all backward arcs on C 0 for all arcs not on C

2

2 1

2 3 5

1

3

1

Page 8: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

2s2

s1

2

11

4 2

2 56 3

13

1 1 5

33

13

2

1 1

For Cycle C={1,2,4,1} define

+1 for all forward arcs on Ch(C)= -1 for all backward arcs on C 0 for all arcs not on C

2

2 1

2 3 5

1

3

1

Ah(C)=0

Page 9: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

2s2

s1

2

11

4 2

2 56 3

13

1 1 5

33

13

2

1 1

For Cycle C={1,2,4,1} define

+1 for all forward arcs on Ch(C)= -1 for all backward arcs on C 0 for all arcs not on C

2

2 1

2 3 5

1

3

1

Ah(C)=0 f+ өh(C) is feasible for all ө small enough: i.e., such that 0 ≤ f+ өh(C) ≤ u

Page 10: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

2s2

s1

2

11

4 2

2 56 3

13

1 1 5

33

13

2

1 1

For Cycle C={1,2,4,1} define

+1 for all forward arcs on Ch(C)= -1 for all backward arcs on C 0 for all arcs not on C

2

2 1

2 3 5

1

3

1

Ah(C)=0 f+ өh(C) is feasible for all ө such that 0 ≤ f+ өh(C) ≤ uh(C) is called a simple circulation

Page 11: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

2s2

s1

2

11

4 2

2 56 3

13

1 5

33

13

2

1 1

Cycle C={1,2,4,1}

Push ө unit of flow over C: Δf12= өh12 = +ө, Δf24= өh24 = +ө, Δf14= өh14 = -ө

2

2 1

1

2 3 5

1

2

1

Page 12: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

2s2

s1

2

11

4 2

2 56 3

13

1 5

33

13

2

1 1

Cycle C={1,2,4,1}

Push ө unit of flow over C: Δf12= өh12 = +ө, Δf24= өh24 = +ө, Δf14= өh14 = -ө

f12 + ө ≤ 1, hence (f12=0) ө ≤ 1f24 + ө ≤ 4, hence (f24=2) ө ≤ 2 Thus, ө ≤ 1f14 - ө ≥ 0, hence (f14=1) ө ≤ 1

2

2 1

1

2 3 5

1

2

1

Page 13: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

2s2

s1

2

11

4 2

2 56 3

13

1 5

33

13

2

1 1

Cycle C={1,2,4,1}

Push ө unit of flow over C: Δf12= өh12 = +ө, Δf24= өh24 = +ө, Δf14= өh14 = -ө

Total change in cost: ө(5 + 2 – 6) = ө

2

2 1

1

2 3 5

1

2

1

Page 14: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

2s2

s1

2

11

4 2

2 56 3

13

1 5

33

13

2

1 1

Cycle C={1,2,4,1}

Push ө unit of flow over C: Δf12= өh12 = +ө, Δf24= өh24 = +ө, Δf14= өh14 = -ө

Total change in cost: ө(5 + 2 – 6) = ө Not a good change!

2

2 1

1

2 3 5

1

2

1

Page 15: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

2s2

s1

2

11

4 2

2 56 3

13

1 5

33

13

2

1 1

Cycle C={1,3,4,1}

Push Ө unit of flow over C: h13=+1, h43=-1, h14= -1

2

2 1

1

2 3 5

1

2

1

Page 16: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

2s2

s1

2

11

4 2

2 56 3

13

1 5

33

13

2

1 1

Cycle C={1,3,4,1}

Push Ө unit of flow over C: h13=+1, h43=-1, h14= -1

2

2 1

1

2 3 5

1

2

1

unit cost change: c13 – c43 – c14= 1 – 1 – 6 = – 6 negative cost cycle

Ө ≤ 1

Page 17: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

s2

s1

2

1

2

5 6

1

5

3

1

1

bs1=2bs2=2bt =-4

2

2 2

4 5

1

2

2

the instance slightly changed and omitting capacities

The Network Simplex Method

Page 18: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

A basic (feasible) solution related to the Tree T

3

t

4

1

s2

s1

2

1

2

56

1

5

3

1

1

2

2 2

4 5

1

2

2

Page 19: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

s2

s1

2

1

2

56

1

5

3

1

1

2

2 2

4 5

1

2

2

A basic feasible solution related to the Tree T

C14 = 6 + 1 – 1 = 6

Page 20: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

s2

s1

2

1

2

56

1

5

3

1

1

2

2 2

4 5

1

2

2

A basic feasible solution related to the Tree T

C14 = 6 + 1 – 1 = 6

C34 = 1 + 1 = 2

Page 21: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

s2

s1

2

1

2

56

1

5

3

1

1

2

2 2

4 5

1

2

2

A basic feasible solution related to the Tree T

C14 = 6 + 1 – 1 = 6

C34 = 1 + 1 = 2

C4t = 1 – 5 – 1 = – 5

Page 22: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

s2

s1

2

1

2

56

1

5

3

1

1

2

2 2

4 5

1

2

2

A basic feasible solution related to the Tree T

C14 = 6 + 1 – 1 = 6

C34 = 1 + 1 = 2

C4t = 1 – 5 – 1 = – 5 negative reduced cost

Page 23: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

s2

s1

2

1

2

56

1

5

3

1

1

2

2 2

4 5

1

2

2

A basic feasible solution related to the Tree TC14 = 6 + 1 – 1 = 6

C34 = 1 + 1 = 2 C4t = 1 – 5 – 1 = – 5 negative reduced cost

The cycle is unsaturated, hence will really decrease cost. Θ*=1

Page 24: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

s2

s1

2

1 1

2 4

5 36 2

1 2

5 1

3 3

1 3

1

2

2 2

4 5 4

1 2

2

2

The residual graph

3

t

4

1

s2

s1

2

1 1

2 2

5 36 2

1

5 1

3 1

1 1

2 1

2

2 2

4 5

1 2

2

-1 2

-1 2 -1 2

-5 4

-3 2 -2 2

Page 25: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

s2

s1

2

1 1

2 4

5 36 2

1 2

5 1

3 3

1 3

1

2

2 2

4 5 4

1 2

2

2

3

t

4

1

s2

s1

2

1 1

2 2

5 36 2

1

5 1

3 1

1 1

2 1

2

2 2

4 5

1 2

2

-1 2

-1 2 -1 2

-5 4

-3 2 -2 2

directed cycle in the residual graph =undirected unsaturated cycle in the graph

Page 26: 3 t 4 1 2 s2s2 s1s1 2 1 4 23 3 1 3 3 3 1 the black number next to an arc is its capacity

3

t

4

1

s2

s1

2

1 1

2 4

5 36 2

1 2

5 1

3 3

1 3

1

2

2 2

4 5 4

1 2

2

2

directed negative cycle in the residual graph =undirected unsaturated negative cost cycle in the graph

3

t

4

1

s2

s1

2

1 1

2 2

5 36 2

1

5 1

3 1

1 1

2 1

2

2 2

4 5

1 2

2

-1 2

-1 2 -1 2

-5 4

-3 2 -2 2