690 likes | 740 Views
Flow in Network. Graph, oriented graph, network. A graph G =( V , E ) is specified by a non empty set of nodes V and a set of edges E such that each edge a is identified by a pair of nodes ( u , v ) . c a b d V = {1, 2, 3} E = { a, b, c, d }
E N D
Graph, oriented graph, network • A graphG =(V, E) is specified by a non empty set of nodesV and a set of edges E such that each edge a is identified by a pair of nodes (u, v). c a b d V = {1, 2, 3} E = {a, b, c, d} a = b = (1, 2) ; c = (1, 3) ; d =(2, 3) 1 3 2
A graph g is a sub graphof a graph G if all the nodes and all the edges of g are nodes and edges ofG. c c a b d G g 1 1 3 3 2
A sub graph of a graph G including all the nodes of G is a partialgraph of G. c c a b d d G g 1 1 3 3 2 2
A chain in a graph G is a sequence of distinct edges a1, a2, …, ap such that there exist (p+1) nodes u1, u2, …, up+1 whereai= (ui, ui+1). c ab d The sequence a, c is a chain. 1 3 2
A cycle in a graph G is a chain such that u1 =up+1 c a b d The sequence c, b, d is a cycle. 1 3 2
A graph G is connected if for all pair of nodes, there exists a chain linking them. c a b d This graph is connected. 1 3 2
A tree is a connected graph with no cycle Property: A tree with n nodes includes exactly (n– 1) edges
A partial tree ( spanning tree) of a connected graph Gis a partial graph of G being a tree c c a b d d G partial tree 1 1 3 3 2 2
A fondamental cyclewith respect to a partial tree is a cycle including an edge of the graph not included in the partial tree and edges of the tree. c c a b d d G partial tree 1 1 3 3 2 2
A fondamentalcycle with respect to a spanning tree is a cycle including an edge of the graph not included in the partial tree and edges of the tree. c c a b a d d G fondamental cycle 1 1 3 3 2 2
An oriented graphG = (V, E) is specified by a non empty set of nodes V and a set of arcs E such that each arc a is identified by an ordered pair of nodes (u, v). a b c d e f V = {1, 2, 3, 4} E = {a, b, c, d, e, f} a = (1, 2), b = (2, 4), c = (2, 3), d =(3, 2), e = (1, 3), f = (3, 4) 2 1 4 3
A non oriented graph obtained from an oriented graph G by eliminating the direction of the arc is denoted the correspondinggraph. • The notions of chain, cycle, connectedness, tree, spanning tree, and fondamental cycle for an oriented graph refer to the corresponding graph. • A path in an oriented graph is a sequence of distinct arcs a1, a2, …, apbeing a chain where all the arcs are oriented in the same direction. • A directed graph is simple if the nodes identifying each arc are distinct, and if there is no pairs of arcs specified by the same pair of nodes.
A network is a connected oriented graph in which a flow can move over the arcs. Each arc (i, j) est characterized as follows a capacity dij corresponding to an upper bound on the flow in the arc a lower bound lijon the flow in the arc Moreover, 0≤ lij ≤ dij [0, 2] [2, 9] [0, 6] [3, 4] [0, 4] [1, 6] At each arc (i, j) is associated a pair [lij, dij]. 2 1 4 3
Minimum cost flow model • Consider a network where the following attributs are associated with each arc (i, j) : dijthe capacity of the arc lij the lower bound on the flow in the arc cijflow unitary cost in the arc xij the variable including the value of the flow in the arc • Furthermore, associate the following two sets of nodes with each node i:
Exemple B1= Φ, B2= {1, 3}, B3= {1, 2}, B4= {2, 3} P1= {2, 3}, P2= {3, 4}, P3= {2, 4}, P4= Φ [0, 2] [2, 9] [0, 6] [3, 4] [0, 4] [1, 6] 2 1 4 3
The minimum cost flow problem is to determine how to send a fixed quantity of flow v from a source to a destination along the arcs of the network satisfying the lower bound and the capacity constraints of the arcs in order to minimize the total cost. • Constraints of the problem: 1. lower bound and the capacity constraints of the arcs: 2. flow conservation constraints (specific to network flow problems): For each node the total flow going in the node must be equal to the total flow going out of the node
For each node, the total flow going in the node must be equal to the total flow going out of the node. v 2 1 4 3
For each node, the total flow going in the node must be equal to the total flow going out of the node. v 2 1 4 3
For each node, the total flow going in the node must be equal to the total flow going out of the node. 2 1 4 3
Model for theminimum cost flow problem • The minimum cost flow problem is to determine how to send a fixed quantity of flow v from a source to a destination along the arcs of the network satisfying the lower bound and the capacity constraints of the arcs in order to minimize the total cost.
The matrix associated with the flow conservation constraints are denoted the nodes-arcs incidence matrix: row i↔ node i column (i, j) ↔ arc(i, j) colonne (i, j) ligne i ligne j
Exemple of an incidence matrix 2 1 4 3
The nodes-arcs incidence matrix has the unimodularity propertyindicating that the simplex algorithm generates an integer solution for problem (MCF) when lij, dij et v are integer.
Properties of the incidence matrix • Now we show that the columns of any basis correspond to arcs in a spanning tree and vice versa. • Theorem: The incidence matrix A of a connected simple oriented graph having m nodes and n arcs has a rank equal to (m–1). Proof: First we showthatEach column of A includes only one component equal to 1, another one equal to -1, and all the other elements are equal to 0. Hence if we sum up the rows of A, then we obtain a row vector having all its elements equal to 0. Consequently the rows of A are linearly dependent. Thus
Exemple of incidence matrix 2 1 4 3
Exemple of incidence matrix 2 1 4 3
Theorem: Consider an incidence matrix A associated with a simple connected directed graph G including m nodes and n arcs. A square (m– 1)x (m– 1) sub matrix of A is non singular if and only if the arcs associated to its columns are those specifying a spanning tree of G.
Proof: Let T be a spanning tree of G illustrated in red. 2 1 4 3
Proof: Let T be a spanning tree of G illustrated in red. Denote by A(T) the mx(m˗1) sub matrix A being the incidence matrix of T. 2 1 4 3
Proof: Let T be a spanning tree of G illustrated in red. Denote by A(T) the mx(m–1) sub matrix A being the incidence matrix of T. Since T is a simple connected graph, it follows from the preceding theorem that rank(A(T)) = (m–1). 2 1 4 3
Proof: Let T be a spanning tree of G illustrated in red. Denote by A(T) the mx(m–1) sub matrix A being the incidence matrix of T. Since T is a simple connected graph, it follows from the preceding theorem that rank(A(T)) = (m–1). Then all (m– 1)x (m– 1) sub matrices obtained by eliminating a row of A(T) is non singular. But these sub matrices are also sub matrices of A. 2 1 4 3
Let B be a (m– 1)x (m– 1) square non singular sub matrix of A. 2 1 4 3
Let B be a (m– 1)x (m– 1) square non singular sub matrix of A. 2 1 4 3
Let B be a (m– 1)x (m– 1) square non singular sub matrix of A. B is obtained by eliminating a row from an incident matrix of a spanning tree g of G. 2 1 4 3
Let B be a (m– 1)x (m– 1) square non singular sub matrix of A. B is obtained by eliminating a row from an incident matrix of a spanning tree g of G. This sub graph g is simple, connected, including (m– 1) arcs. Then g is a spanning tree of G. 2 1 4 3
Theorem: The incidence matrix A of a connected simple oriented graph having m nodes and n arcs has a rank equal to (m–1). Theorem: Consider an incidence matrix A associated with a simple connected directed graph G including m nodes and n arcs. A square (m– 1)x (m– 1) sub matrix of A is non singular if and only if the arcs associated to its columns are those specifying a spanning tree of G. Any base from the incidence matrix is such that its columns correspond to variables associated with the arcs of a spanning tree, and vice versa. The basic variables of a basic solution of a (MCF) problem correspond to the arcs of a spanning tree and vice-versa.
The simplex method forthe minimum cost flow problem • We use the variant of the simplex method when the variables are bounded to solve the minimum cost flow problem (MCF):
To analyse one iteration of the simplex method, suppose that we have a basic feasible solution x of the problem. Then the non basic variables xij are such that xij= 0 ou dij. The basic variables xijcorrespond to the arcs of a spanning tree T of the network.
Entering criterion determine the relative costs of the variables xij: that can be written as Moreover, for the basic variables associated to the arcs of the spanning tree T : ligne i ligne j
In a tree (# arcs) = (# nodes) –1. The preceding system includes (m– 1) équations (associated to the arcs ) et m unknown πi (associated to the nodes i of T). But since any sub matrix (m – 1)x (m – 1) of the incidence matrix T is non singular, we can fix the value of one multiplier and to evaluate the others using the system. The system of equations being triangular, it is easy to show that the multipliers are evaluated sequentially one by one.
In our exemple Let πt= 0 π1=1 πs=5 πt=0 1 π3=1 π2=4 3
Once the values of the multipliers are known, determine the relative costs of the non basic variables associated to the arcs that are not belonging to the spanning tree T. In our exemple πs=5 π1=1 πt=0 π3=1 π2=4
Once the values of the multipliers are known, determine the relative costs of the non basic variables associated to the arcs that are not belonging to the spanning tree T.
Once the values of the multipliers are known, determine the relative costs of the non basic variables associated to the arcs that are not belonging to the spanning tree T. In our exemple πs=5 π1=1 πt=0 x21 is admissible to increase π3=1 π2=4 x3tis admissible to decrease
Recall: Step 1: Selecting the entering variable The criterion to select the entering variable must be modified to account for the non basic variables xjbeing equal to their upper bounds ujsince these variables can be reduced. Hence, for an index if , it is interesting to increase xj if , it is interesting to decrease xj
Once the values of the multipliers are known, determine the relative costs of the non basic variables associated to the arcs that are not belonging to the spanning tree T. In our exemple πs=5 π1=1 πt=0 x21 is admissible to increase π3=1 π2=4 x3tis admissible to decrease Entering variable
Leaving criterion In our exemple: x3t is the entering variable