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.

Post on 06-Jan-2018

214 views 1 download

description

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

Transcript of 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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