MSIS 685: Linear Programming Lecture 11 Minimal Network Flow Problem 11/24/98 Scriber: Yu Xia Instructor: Farid Alizadeh Transportation Problem Example: Problem: a1 12 , a2 10 , a3 7 b1 9 , b2 6 , b3 8 , b4 6 c ij : 12 6 3 7 2 5 10 8 3 3 4 9 Solution: 1) Use Northwest corner method to find the initial solution: 9 3 12 3 7 10 x ij : 1 6 7 9 6 8 6 Dual: 12 6 u1 10 8 u 2 4 9 u3 v1 v2 v3 v4 12 6 4 9 0 4 0 2) Change the base of primal: 9 3 3 6 6 3 7 1 6 7 1 6 Dual: 12 6 u1 0 2 8 u 2 10 4 9 u 3 14 v1 12 v2 v3 v4 6 18 23 3) Change the primal base: 6 6 0 6 6 9 3 7 1 1 6 7 This is a degenerate solution The dual: 12 6 7 u1 0 2 8 u 2 10 4 u 3 14 v1 12 v2 v3 v4 6 18 7 4) The primal: 0 6 6 9 6 0 6 9 1 7 The dual: 6 3 7 u1 2 8 u2 4 v1 v2 u3 v3 v4 3 6 3 7 1 7 0 5 1 5) The primal: 9 6 0 6 5 1 6 9 1 1 7 7 The dual: 6 3 7 u1 2 10 u2 4 u3 v1 v2 v3 v4 2 6 3 7 0 4 1 6) The primal: 5 1 6 6 1 5 9 9 1 1 7 7 The dual: 6 3 7 u1 2 3 u2 4 u3 v1 v2 v3 0 4 1 v4 6 6 3 7 7) The primal: 6 1 5 9 1 7 5 4 v2 v3 6 6 3 4 The dual: 6 3 7 u1 2 3 u2 v1 6 6 u3 v4 7 0 4 1 6 2 8) The primal: 6 4 5 6 2 4 8 6 4 5 2 The dual: 6 3 u1 2 3 u2 5 3 u3 v1 v2 v3 9 9) The primal 4 8 2 v2 8 4 6 8 1 6 The dual: 3 7 u1 2 3 u2 5 3 u3 v1 0 6 3 v4 8 6 3 4 5 6 v3 6 4 3 0 4 1 v4 7 Conclusion: Optimal base of the primal: 8 4 8 1 6 2 2 Minimal Cost Flow Problem A graph can be represented by G ( N , A) . N is the set of nodes, A is the set of arcs. : Supplying nodes : Transportation nodes : Demanding nodes : Arc Transshipment Problem: min c ij x ij ( i , j ) A s.t. xik i ( i , k )A x kj bk (k 1,, m) j ( k , j )A xij 0 Definitions: Walk: ( i1 ,i2 ) (i2 , i3 ) … (ik 1 , ik ) (ik , ik 1 ) Path: A path is a walk with no vertices visited more than once. Circuit: A circuit is a walk where i1 ik 1 Cycle: A cycle is a circuit, and it is a path if (ik , ik 1 ) is taken away. In cycle number of edges equals number of vertices. In path number of edges equals number of vertices minus 1. Strongly Connected: A directed network G=(N, A) is strongly connected if there exits a path between any pair of nodes. Weakly Connected: A network is weakly connected if it is connected when treated as an undirected network. Forest: A forest is a network with no cycles if treated as undirected Tree: A tree is a weakly connected forest Degree of Node: Degree of Node (i) is the number of arcs with one end pointing to i. Indegree of Node: Indegree of Node (i) is the number of arcs with the form (k, i). Outdegree of Node: Outdegree of Node (i) is the number of arcs with the form (i, k). Degree of Node (i)= Indegree of Node (i)+ Outdegree of Node (i) Lemma: A tree with n nodes has n-1 arcs. Proof: By induction: 1) The lemma is true for 1-node and 2-node trees. 2) Consider n-node tree: Claim: Every tree that has more than one node has at least one node of degree 1. Use contradiction: There is a path P between node 1 and node 2. If the degree of each node of a tree is not less than one, then it is possible to find another path between node 1 and 2, and none of the arcs in this path is identical to any arc in P. Remove that degree 1 node and the arc, we obtain a tree has n-1 nodes. Minimal cost flow problem can be presented as Ax b A R mn : Incidence Matrix ( m : the number of nodes, n : the number of arcs) Example: 1 1 2 2 3 5 4 3 4 1 1 1 1 1 A 1 1 1 1 1 m For any feasible network, the condition bk 0 must be satisfied. k 1 If the rank of the incidence matrix is k, then the graph has m-k parts. Spanning Tree: T is a spanning tree of G = (N, A ) , if T= (N, A / ) , A/ A , and T is a tree. Lemma: For every (undirected) tree, there is a way to label nodes with 1, 2 … m such that: a) Node labeled 1 is arbitrary. b) For each node labeled i (i 1) , there is exactly one edge {i, j} where j i . To find the label like this use: Method 1: breadth-first search. Example: 1) 1 2) 2 3 1 1 2 5 2 3) 3 4 1 1 2 3 4 1 1 1 1 1 A 1 1 1 Get rid of the first row, the incidence matrix is an upper triangular matrix and no zero in diagonal. Method 2: Start from the leaf, and mark it m. Take it and the associated arc away, and then mark m-1 to the leaf of the new tree. … For a minimal cost flow problem, a basic feasible solution corresponds to a spanning tree. One tree differs from another with one arc.