250 likes | 281 Views
3. 3. 1. 3. s 1. 3. 2. 3. 1. t. 1. 1. 2. s 2. 2. 4. 3. 4. b s 1 = 2 b s 2 = 2 b t =-4. the black number next to an arc is its capacity. 3. 3. 1. 1. 3. 1. s 1. 3. 5. 2. 6. 3. 5. 1. 5. t. 1. 1. 1. 1. 2. 1. s 2. 2. 4. 3. 3. 4. 2. b s 1 = 2
E N D
3 3 1 3 s1 3 2 3 1 t 1 1 2 s2 2 4 3 4 bs1= 2 bs2= 2 bt =-4 the black number next to an arc is its capacity
3 3 1 1 3 1 s1 3 5 2 6 3 5 1 5 t 1 1 1 1 2 1 s2 2 4 3 3 4 2 bs1= 2 bs2= 2 bt =-4 the black number next to an arc is its capacity the red number next to an arc is its unit flow cost
3 3 1 1 1 3 1 2 s1 2 35 2 6 3 5 1 1 5 t 1 1 1 1 1 2 2 1 s2 2 4 3 3 4 2 2 2 bs1= 2 bs2= 2 bt =-4 the black number next to an arc is its capacity the red number next to an arc is its unit flow cost the green number next to an arc is its current flow
3 3 1 1 1 3 1 2 s1 2 35 2 6 3 5 1 1 5 t 1 1 1 1 1 2 2 1 s2 2 4 3 3 4 2 2 2 Cycle C={1,2,4,1}
3 3 1 1 1 3 1 2 s1 2 35 2 6 3 5 1 1 5 t 1 1 1 1 1 2 2 1 s2 2 4 3 3 4 2 2 2 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
3 3 1 1 1 3 1 2 s1 2 35 2 6 3 5 5 1 1 t 1 1 1 1 1 2 2 1 s2 2 4 3 3 4 2 2 3 For Cycle C={1,2,4,1} define +1 for all forward arcs on C h(C)= -1 for all backward arcs on C 0 for all arcs not on C
3 3 1 1 1 3 1 2 s1 2 35 2 6 3 5 5 1 1 t 1 1 1 1 1 2 2 1 s2 2 4 3 3 4 2 2 3 For Cycle C={1,2,4,1} define +1 for all forward arcs on C h(C)= -1 for all backward arcs on C 0 for all arcs not on C Ah(C)=0
3 3 1 1 1 3 1 2 s1 2 35 2 6 3 5 5 1 1 t 1 1 1 1 1 2 2 1 s2 2 4 3 3 4 2 2 3 For Cycle C={1,2,4,1} define +1 for all forward arcs on C h(C)= -1 for all backward arcs on C 0 for all arcs not on C Ah(C)=0 f+ өh(C) is feasible for all ө small enough: i.e., such that 0 ≤ f+ өh(C) ≤ u
3 3 1 1 1 3 1 2 s1 2 35 2 6 3 5 5 1 1 t 1 1 1 1 1 2 2 1 s2 2 4 3 3 4 2 2 3 For Cycle C={1,2,4,1} define +1 for all forward arcs on C h(C)= -1 for all backward arcs on C 0 for all arcs not on C Ah(C)=0 f+ өh(C) is feasible for all ө such that 0 ≤ f+ өh(C) ≤ u h(C) is called a simple circulation
3 3 1 1 1 3 1 2 s1 2 35 2 6 3 5 1 1 5 t 1 1 1 1 1 2 2 1 s2 2 4 3 3 4 2 2 2 Cycle C={1,2,4,1} Push ө unit of flow over C: Δf12= өh12 =+ө, Δf24= өh24 =+ө, Δf14= өh14 = -ө
3 3 1 1 1 3 1 2 s1 2 35 2 6 3 5 1 1 5 t 1 1 1 1 1 2 2 1 s2 2 4 3 3 4 2 2 2 Cycle C={1,2,4,1} Push ө unit of flow over C: Δf12= өh12 =+ө, Δf24= өh24 =+ө, Δf14= өh14 = -ө f12 + ө≤ 1, hence (f12=0) ө≤ 1 f24 + ө≤ 4, hence (f24=2) ө≤ 2 Thus, ө≤ 1 f14 - ө≥ 0, hence (f14=1) ө≤ 1
3 3 1 1 1 3 1 2 s1 2 35 2 6 3 5 1 1 5 t 1 1 1 1 1 2 2 1 s2 2 4 3 3 4 2 2 2 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) = ө
3 3 1 1 1 3 1 2 s1 2 35 2 6 3 5 1 1 5 t 1 1 1 1 1 2 2 1 s2 2 4 3 3 4 2 2 2 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!
3 3 1 1 1 3 1 2 s1 2 35 2 6 3 5 1 1 5 t 1 1 1 1 1 2 2 1 s2 2 4 3 3 4 2 2 2 Cycle C={1,3,4,1} Push Ө unit of flow over C: h13=+1, h43=-1, h14= -1
3 3 1 1 1 3 1 2 s1 2 35 2 6 3 5 1 1 5 t 1 1 1 1 1 2 2 1 s2 2 4 3 3 4 2 2 2 Cycle C={1,3,4,1} Push Ө unit of flow over C: h13=+1, h43=-1, h14= -1 unit cost change: c13 – c43 – c14= 1 – 1 – 6 = – 6 negative cost cycle Ө≤ 1
The Network Simplex Method 3 1 2 1 1 2 s1 4 5 6 5 5 t 1 2 1 1 s2 2 4 3 2 2 2 bs1=2 bs2=2 bt =-4 the instance slightly changed and we omit capacities
3 1 2 1 1 2 s1 4 5 6 5 5 t 1 2 1 1 s2 2 4 3 2 2 2 A basic (feasible) solution related to the Tree T
3 1 2 1 1 2 s1 4 5 6 5 5 t 1 2 1 1 s2 2 4 3 2 2 2 A basic feasible solution related to the Tree T C14 = 6 + 1 – 1 = 6
3 1 2 1 1 2 s1 4 5 6 5 5 t 1 2 1 1 s2 2 4 3 2 2 2 A basic feasible solution related to the Tree T C14 = 6 + 1 – 1 = 6 C34 = 1 + 1 = 2
3 1 2 1 1 2 s1 4 5 6 5 5 t 1 2 1 1 s2 2 4 3 2 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 1 2 1 1 2 s1 4 5 6 5 5 t 1 2 1 1 s2 2 4 3 2 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 1 2 1 1 2 s1 4 5 6 5 5 t 1 2 1 1 s2 2 4 3 2 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 The cycle is unsaturated, hence will really decrease cost. Θ*=1
3 1 2 2 1 1 3 2 s1 4 5 4 6 2 5 3 5 1 t 1 2 2 1 1 1 2 s2 2 4 3 3 2 4 2 2 3 1 2 1 1 1 2 s1 4 5 -1 2 -1 2 -5 4 6 2 5 3 5 1 2 1 t The residual graph 1 1 -1 2 1 2 -2 2 -3 2 s2 2 4 3 1 2 2 2 2
3 1 2 2 1 1 3 2 s1 4 5 4 6 2 5 3 5 1 t 1 2 1 1 1 2 s2 2 4 3 3 2 4 2 2 3 1 2 1 1 1 2 s1 4 5 -1 2 -1 2 -5 4 6 2 5 3 5 1 2 1 t 1 1 -1 2 1 2 -2 2 -3 2 s2 2 4 3 1 2 2 2 2 directed cycle in the residual graph = undirected unsaturated cycle in the graph
3 1 2 2 1 1 3 2 s1 4 5 4 6 2 5 3 5 1 t 1 2 1 1 1 2 s2 2 4 3 3 2 4 2 2 3 1 2 1 1 1 2 s1 4 5 -1 2 -1 2 -5 4 6 2 5 3 5 1 2 1 t directed negative cycle in the residual graph = undirected unsaturated negative cost cycle in the graph 1 1 -1 2 1 2 -2 2 -3 2 s2 2 4 3 1 2 2 2 2