Flow in Network
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}
a = b = (1, 2) ; c = (1, 3) ; d =(2, 3)
1
2
3
• A graph g is a sub graph of a graph G if all the nodes and all the edges of
g are nodes and edges of G.
c c
a b
d
G g
1
2
3
1
3
• A sub graph of a graph G including all the nodes of G is a partial graph of
G.
c c
a b
d d
G g
1
2
3
1
3
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 where ai= (ui, ui+1).
c
a b
d
The sequence a, c is a chain.
1
2
3
• 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
2
3
• 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
2
3
• 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 G is a partial graph of
G being a tree
c c
a b
d d
G partial tree
1
2
3
1
3
2
• A fondamental cycle with 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
2
3
1
3
2
• A fondamental cycle 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
2
3
1
3
2
• An oriented graph G = (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
3
1 4
• A non oriented graph obtained from an oriented graph G by eliminatingthe direction of the arc is denoted the corresponding graph.
• 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 lij on 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
3
1 4
Minimum cost flow model
• Consider a network where the following attributs are associated with each
arc (i, j) :
dij the capacity of the arc
lij the lower bound on the flow in the arc
cij flow 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:
{ }{ }EjiVjP
EijVjB
i
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
3
1 4
• The minimum cost flow problem is to determine how to send a fixedquantity 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
Vs ∈ Vt ∈
( , )ij ij ijl x d i j E≤ ≤ ∈
i V∈
• For each node, the total flow going in the node must be equal to the total
flow going out of the node.
v2
3
1 4
For the source
or
s s
s s
js sj
j B j P
sj js
j P j B
s
v x x
x x v
∈ ∈
∈ ∈
+ =
− =
∑ ∑
∑ ∑
• For each node, the total flow going in the node must be equal to the total
flow going out of the node.
v2
3
1 4
For the destination
or
t t
t t
jt tj
j B j P
tj jt
j P j B
t
x x v
x x v
∈ ∈
∈ ∈
= +
− = −
∑ ∑
∑ ∑
• For each node, the total flow going in the node must be equal to the total
flow going out of the node.
2
3
1 4
For an intermediate node
or
0
i i
i i
ji ij
j B j P
ij ji
j P j B
i
x x
x x
∈ ∈
∈ ∈
=
− =
∑ ∑
∑ ∑
Model for the minimum 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.
Vs ∈ Vt ∈
( , )
(MCF) min
s.t.
(flow conservation)
si
0 si ,
si
(capacity)
( , )
i i
ij iji j E
ij jij P j B
ij ij ij
c x
v i s
x x i s t
v i t
l x d i j E
∈
∈ ∈
∑
=
− = ≠∑ ∑ − =
≤ ≤ ∈
( , )
(MCF) min
s.t.
(flow conservation)
0 ,
(capacity)
( , )
s s
i i
t t
ij iji j E
sj jsj P j B
ij jij P j B
tj jtj P j B
ij ij ij
c x
x x v
x x i s t
x x v
l x d i j E
∈
∈ ∈
∈ ∈
∈ ∈
∑
− =∑ ∑
− = ≠∑ ∑
− = −∑ ∑
≤ ≤ ∈
( , )
(MCF) min
s.t.
(flow conservation)
0 ,
(capacity
( , )
s s
i i
t t
ij iji j E
sj jsj P j B
ij jij P j B
tj jtj P j B
ij ij ij
c x
x x v
x x i s t
x x v
l x d i j E
∈
∈ ∈
∈ ∈
∈ ∈
∑
− =∑ ∑
− = ≠∑ ∑
− = −∑ ∑
≤ ≤ ∈
• 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)
( , )
(FCM) min
Sujet à
(conservation de flot)
si
0 si ,
si
(capacité)
( , )
i i
ij iji j E
ij jij P j B
ij ij ij
c x
v i s
x x i s t
v i t
l x d i j E
∈
∈ ∈
∑
=
− = ≠∑ ∑ − =
≤ ≤ ∈
−
0
0
1
0
0
1
0
0
�
�
�
ijx
ligne i
ligne j
colonne (i, j)
ij P∈
ji B∈
• Exemple of an incidence matrix
2
3
1 4
−−
−−
−−
101000
110110
011101
000011
343224231312 xxxxxx
4
3
2
1
( , )
(MCF) min
s.t.
(flow conservation)
si
0 si ,
si
(capacity)
( , )
i i
ij iji j E
ij jij P j B
ij ij ij
c x
v i s
x x i s t
v i t
l x d i j E
∈
∈ ∈
∑
=
− = ≠∑ ∑ − =
≤ ≤ ∈
• The nodes-arcs incidence matrix has the unimodularity property indicating
that the simplex algorithm generates an integer solution for problem
(MCF) when lij, dij et v are integer.
( , )
(MCF) min
s.t.
(flow conservation)
si
0 si ,
si
(capacity)
( , )
i i
ij iji j E
ij jij P j B
ij ij ij
c x
v i s
x x i s t
v i t
l x d i j E
∈
∈ ∈
∑
=
− = ≠∑ ∑ − =
≤ ≤ ∈
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 show that Each column of A includesonly one component equal to 1, another one equal to -1, and all the otherelements 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
( ) ( )rank 1 .A m≤ −
( ) ( )rank 1 .A m≤ −
( , )
(MCF) min
s.t.
(flow conservation)
si
0 si ,
si
(capacity)
( , )
i i
ij iji j E
ij jij P j B
ij ij ij
c x
v i s
x x i s t
v i t
l x d i j E
∈
∈ ∈
∑
=
− = ≠∑ ∑ − =
≤ ≤ ∈
A ↔
• Exemple of incidence matrix
2
3
1 4
1 1 0 0 0 0
1 0 1 1 1 0
0 1 1 0 1 1
0 0 0 1 0 1
− − − −
− −
343224231312 xxxxxx
4
3
2
1
_____________________
0 0 0 0 0 0
( ) ( )Now we show that rank 1 .A m= −
1Suppose that there exist a set of rows of , ,
that are linearly dependent.
ki iK k A a a…
[ ]1
1
1
There exists scalars , , that are not all equal to 0 such that
0, ,0 .k
k
i k ia a
α α
α α+ + =
…
… …
Since each column of the matrix includes exactly one element equal
to 1 and another one equal to -1, if 0, then for all element different
from 0 in row , we must find in the set , the row of j
j
i
A
a K
α ≠
including the
corresponding complementary element different from 0.
A
• Exemple of incidence matrix
2
3
1 4
−−
−−
−−
101000
110110
011101
000011
343224231312 xxxxxx
4
3
2
1
( ) ( )Now we show that rank 1 .A m= −
1Suppose that there exist a set of rows of , ,
that are linearly dependent.
ki iK k A a a…
[ ]1
1
1
There exists scalars , , that are not all equal to 0 such that
0, ,0 .k
k
i k ia a
α α
α α+ + =
…
… …
Since each column of the matrix includes exactly one element equal
to 1 and another one equal to -1, if 0, then for all element different
from 0 in row , we must find in the set , the row of j
j
i
A
a K
α ≠
including the
corresponding complementary element different from 0.
A
If we reapply the reasonning for all elements 0, we find that
includes all the rows of since the oriented graph is simple and
connected.
j K
A
α ≠
( ) ( ) ( )
Hence , and consequently all subsets of rows of the matrix
where 1 , are linearly independent. Then rank 1 .
k m A
m A m
τ
τ
=
≤ − ≥ −
( ) ( )It follows that rank 1 .A m= −
• 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
3
1 4
−−
−−
−−
101000
110110
011101
000011
343224231312 xxxxxx
4
3
2
1
Theorem: Consider an incidence matrix A associated with a simple
connected directed graph G including m nodes and n arcs.
A square ( 1) ( 1) sub matrix of A is non singular if and only if
the arcs
m x m− −
associated to its columns are those specifying a spanning tree of G.
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
3
1 4
−−
−−
−−
101000
110110
011101
000011
343224231312 xxxxxx
4
3
2
1
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
3
1 4
−−
−−
−−
101000
110110
011101
000011
343224231312 xxxxxx
4
3
2
1
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)
isis non non singularsingular.
But these sub matrices
are also sub matrices
of A.
2
3
1 4
−−
−−
−−
101000
110110
011101
000011
343224231312 xxxxxx
4
3
2
1
Let B be a (m – 1)x (m – 1) square non singular sub matrix of A.
2
3
1 4
−−
−−
−−
101000
110110
011101
000011
343224231312 xxxxxx
4
3
2
1
Theorem: Consider an incidence matrix A associated with a simple
connected directed graph G including m nodes and n arcs.
A square ( 1) ( 1) sub matrix of A is non singular if and only if
the arcs
m x m− −
associated to its columns are those specifying a spanning tree of G
Let B be a (m – 1)x (m – 1) square non singular sub matrix of A.
2
3
1 4
−−
−−
−−
101000
110110
011101
000011
343224231312 xxxxxx
4
3
2
1
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
3
1 4
−−
−−
−−
101000
110110
011101
000011
343224231312 xxxxxx
4
3
2
1
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
3
1 4
−−
−−
−−
101000
110110
011101
000011
343224231312 xxxxxx
4
3
2
1�
• Theorem: The incidence matrix A of a connected simple oriented graph having m nodes and n arcs has a rankequal 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
for
the 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):
( , )
(MCF) min
s.t.
(flow conservation)
0 ,
(capacity)
0 ( , )
i i
ij ij
i j E
ij ji
j P j B
ij ij
c x
v si i s
x x si i s t
v si i t
x d i j E
∈
∈ ∈
=
− = ≠− =
≤ ≤ ∈
∑
∑ ∑
{ } { }where : ( , ) et : ( , )i iB j V j i E P j V i j E= ∈ ∈ = ∈ ∈
• 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 xijare such that
xij = 0 ou dij.
The basic variables xij correspond
to the arcs of a spanning tree T of
the network.
4v =
• 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 :
Tij ij ijc c aπ •= −
−
0
0
1
0
0
1
0
0
�
�
�
ijx
T
1[ , ..., , ..., , ..., ]i j mπ π π π π=
ligne i
ligne j
=•ija
jiijij cc ππ +−=
)(),( TEji ∈
)(),(0 TEjicc jiijij ∈∀=+−= ππ
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).
)(),(0 TEjicc jiijij ∈∀=+−= ππ
)(),( TEji ∈
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
)(),(0 TEjicc jiijij ∈∀=+−= ππ
tttt
ssss
ssss
cc
cc
cc
cc
ππππ
ππππ
ππππ
ππππ
+−=+−==
+−=+−==
+−=+−==
+−=+−==
1111
32322323
2222
1111
10)4(
30)3(
10)2(
40)1(
143040)3(
451040)2(
514040)1(
11010)4(
3332
222
1
111
=⇒+−=⇒+−=
=⇒+−=⇒+−=
=⇒+−=⇒+−=
=⇒−=⇒+−=
ππππ
ππππ
ππππ
ππππ
s
sss
t
π3=1
πt=0π1=1πs=5
π2=41
3
Once the values of the multipliersare 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
ijT
ijij acc •−= π
πt=0π1=1πs=5
π2=4π3=1
1012
1142
333
122121
=+−=+−=
−=+−=+−=
ttt cc
cc
ππ
ππ
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.
jiijij cc ππ +−=
If
0 ( , ) ( ) où 0
and
0 ( , ) ( ) où ,
then the current solution is
Recall the optimality criter
opti .
i n
al
o
m
ij ij
ij ij ij
c i j E T x
c i j E T x d
≥ ∀ ∉ =
≤ ∀ ∉ =
Otherwise select one of the variables
(admissibles) where the optimality
criterion is not satisfied.
ijx
If the admissible variable = 0, then
its value increases, and if the value
, then its value decreases.
ij
ij ij
x
x d=
Once the values of the multipliersare 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
ijT
ijij acc •−= π
1012
1142
333
122121
=+−=+−=
−=+−=+−=
ttt cc
cc
ππ
ππ
πt=0π1=1πs=5
π2=4π3=1x21 is admissible to increase
x3t is 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 xj being equal to their upper bounds uj since
these variables can be reduced.
Hence, for an index
if , it is interesting to increase xj
if , it is interesting to decrease xj
JBj ∈
0et0 = jjj cux
{ } { }
{ } { }( )
1 2
1 2 1 2
1
then the solution is optimal
Determine min : 0 and max :
Let min , max ,
If 0, , and the algoithm stops.
If 0 an then the non basic variable increasesd ,
s j sj j jjj JB j JB
s s s s s
s
s s ss
c c x c c x u
c c c c c
c
c c c x
∈ ∈= = = =
= −
≥
< =
1then the non basic variab
, and go to Step 2.1.
If le decre 0 et , , and go to Stases ep 2.2.s s s sxc c c<
Once the values of the multipliersare 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
ijT
ijij acc •−= π
1012
1142
333
122121
=+−=+−=
−=+−=+−=
ttt cc
cc
ππ
ππ
πt=0π1=1πs=5
π2=4π3=1x21 is admissible to increase
x3t is admissible to decrease Entering
variable
• Leaving criterion
In our exemple:
x3t is the entering variable
A fondamental cycle with respect to a spanning tree is a
cycle including an edge of the graph not included in the partial three
and edges of the
Reca
th
ll:
ree.
Evaluate the impact of modifying
the value of the entering variable
on the values of the basic variables.
It is easy to verify that only the values
of the flow on the arcs of the
fondamental cycle associated to the
arc associated to the entering variable
are modifed.
Determine the largest value of the
modification of the entering
variable before
θ
i) the value of a basic variable
reduce to 0
ijx
ii) the value of a basic variable
reach its capacity
ij
ij
x
d
iii) the entering variable move
between from one of its
bound to the other
In cases i) or ii) where the modification
of the entering variable is limited,
then the entering variable exits
from the base being replace by
the entering variable. The new
basis where the arc
ijx
T i
θ
′ ( ),
is remplaced by the entering arc.
j T∈
In case iii), we adjust the values of
the flow on the arcs of the fondamental
cycle, and we move to the next
iteration with the same basis.
4-θ
4-θ
4-θ
0+θ 0+θ
To complete the iteration, the value of
the entering variable is reduces by .θ
( )
1
The largest value of 2 since
the flow in arc 1, reach its
capacity 2.t
t
d
θ =
=
1
3
The variable is replaced by the
variable in the basis.
t
t
x
x
To complete the iteration, the value of
the entering variable is reduces by .θ
( )
1
The largest value of 2 since
the flow in arc 1, reach its
capacity 2.t
t
d
θ =
=
1
3
The variable is replaced by the
variable in the basis.
t
t
x
x
The new solution and the spanning
tree associated are as follows
Second iteration :
Entering criterion
Determine the multipliers by
solving the system:
tttt
ssss
ssss
cc
cc
cc
cc
ππππ
ππππ
ππππ
ππππ
+−=+−==
+−=+−==
+−=+−==
+−=+−==
3333
32322323
2222
1111
20)4(
30)3(
10)2(
40)1(
Let πt = 0
tttt
ssss
ssss
cc
cc
cc
cc
ππππ
ππππ
ππππ
ππππ
+−=+−==
+−=+−==
+−=+−==
+−=+−==
3333
32322323
2222
1111
20)4(
30)3(
10)2(
40)1(
264040)1(
651040)2(
523040)3(
22020)4(
111
2
2232
333
=⇒+−=⇒+−=
=⇒+−=⇒+−=
=⇒+−=⇒+−=
=⇒−=⇒+−=
ππππ
ππππ
ππππ
ππππ
s
sss
t
3
1
Determine the relavive costs of the
non basic variables
2
3
1
4πt= 0
π3= 2π2= 5
πs= 6 π1= 2
0=+−= jiijij cc ππ
21 21 2 1 2 5 2 1c c π π= − + = − + = −
1 1 1 1 2 0 1t t tc c π π= − + = − + = −
2
3
1
4
1021
1252
111
122121
−=+−=+−=
−=+−=+−=
ttt cc
cc
ππ
ππ
1 1 1
1
Since 2 and 1,
then is not admissible.
t t t
t
x d c
x
= = = −
21 21
21
The variable 0 and 1,
then becomes the entering
variable that is increasing.
x c
x
= = −
1021
1252
111
122121
−=+−=+−=
−=+−=+−=
ttt cc
cc
ππ
ππ
1 1 1
1
Since 2 and 1,
then is not admissible.
t t t
t
x d c
x
= = = −
21 21
21
The variable 0 and 1,
then becomes the entering
variable that is increasing.
x c
x
= = −
21
The fondamental cycle associated
with in the spanning tree isx
• Leaving criterion
Then θ = 2 since for this value,
xs1 = 2 – 2 = 0
x21 = 0 + 2 = 2 = d21.
0+θ2+θ
2-θ
Evaluate the impact of increasing
the value of the entering variable
on the values of the basic variables.
21 21
We can use the same basis at the
next iteration since 2 .x d= =
1We prefer to use as the leaving
variable.
sx
• Leaving criterion
Then θ = 2 since for this value,
xs1 = 2 – 2 = 0
x21 = 0 + 2 = 2 = d21.
•
Evaluate the impact of increasing
the value of the entering variable
on the values of the basic variables.
21 21
We can use the same basis at the
next iteration since 2 .x d= =
1We prefer to use as the leaving
variable.
sx
The new solution and the associated
spanning three are the following
Third iteration :
Entering criterion
Determine the multipliers
Determine the relative costs of
the non basic variables
2
3
21
πt=0πs=6
π2=5 π3=2
π1=3
2031
1364
111
111
−=+−=+−=
=+−=+−=
ttt
sss
cc
cc
ππ
ππ
The solution is optimal
2031
1364
111
111
−=+−=+−=
=+−=+−=
ttt
sss
cc
cc
ππ
ππ
1 1
1 1 1
0 and 1 0
2 and 2 0
s s
t t t
x c
x d c
= = >
= = = −
• The simplex version for the minimum cost flow problem is simplified
because of the incidence matrix structure.
• There is a lot of degeneracy in flow problem. This may induce degenerate
iteration (where the values of the variables dont change) sinply to modify
the basis. There exists procedures to guide in chosing the basic solutions in
order to reduce the number of degenerate iterations.
Multiple sources and multiple destinations
s1
s2
sp
t1
t2
tq
Rest
of
network
sources , 1, , where denotes the flow quantitycoming from
destinations , 1, , where denotes the flow quantity arriving at
i
j
i s i
j t j
p s V i p v s
q t V j q v t
∈ =
∈ =
�
�
Generate the network G1= (V1, E1 )
s1
s2
sp
t1
t2
tq
Rest
of
network
s t
{ }tsVV ,1 ∪=
sources , 1, , where denotes the flow quantitycoming from
destinations , 1, , where denotes the flow quantity arriving at
i
j
i s i
j t j
p s V i p v s
q t V j q v t
∈ =
∈ =
�
�
Generate the network G1= (V1, E1 )
s1
s2
sp
t1
t2
tq
Reste
du
réseau
s t
{ }tsVV ,1 ∪=
{ } { }qjttpissEE ji ,,1:),(,,1:),(1 �∪�∪ ===
sources , 1, , where denotes the flow quantitycoming from
destinations , 1, , where denotes the flow quantity arriving at
i
j
i s i
j t j
p s V i p v s
q t V j q v t
∈ =
∈ =
�
�
Generate the network G1= (V1, E1 )
s1
s2
sp
t1
t2
tq
Rest
of
network
s t
{ }tsVV ,1 ∪=
{ } { }qjttpissEE ji ,,1:),(,,1:),(1 �∪�∪ ===
]0,[1s
v
]0,[,2s
v
]0,[ps
v
]0,[1t
v
]0,[2t
v
]0,[qt
v
],[ ijij cd
sources , 1, , where denotes the flow quantitycoming from
destinations , 1, , where denotes the flow quantity arriving at
i
j
i s i
j t j
p s V i p v s
q t V j q v t
∈ =
∈ =
�
�
Generate the network G1= (V1, E1 )
v
v
s1
s2
sp
t1
t2
tq
Rest
of
network
s t
]0,[1s
v
]0,[,2s
v
]0,[ps
v
]0,[1t
v
]0,[2t
v
]0,[qt
v
1 1
Total flowi j
p q
s t
i j
v v v= =
= =∑ ∑
sources , 1, , where denotes the flow quantitycoming from
destinations , 1, , where denotes the flow quantity arriving at
i
j
i s i
j t j
p s V i p v s
q t V j q v t
∈ =
∈ =
�
�
References
M.S. Bazaraa, J.J. Jarvis, H.D. Sherali, “ Linear Programming and Network Flows”, 3rd edition, Wiley-Interscience (2005), Chapter9
F.S. Hillier, G.J. Lieberman, “Introduction to Operations Research”, Mc GrawHill (2005), Section 9.7
D. G. Luenberger, “ Linear and Nonlinear Programming ”, 2nd edition, Addison-Wesley (1984), Chapter 5