Flow in Network. Graph, oriented graph, network A graph G =(V, E) is specified by a non empty set of...

69
Flow in Network

Transcript of Flow in Network. Graph, oriented graph, network A graph G =(V, E) is specified by a non empty set of...

Page 1: 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.

Flow in Network

Page 2: 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.

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

Page 3: 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 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

Page 4: 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 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

Page 5: 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 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

Page 6: 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 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

Page 7: 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 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

Page 8: 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 tree is a connected graph with no cycle

Property : A tree with n nodes includes exactly (n – 1) edges

Page 9: 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 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

Page 10: 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 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

Page 11: 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 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

Page 12: 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.

• 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

Page 13: 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 non oriented graph obtained from an oriented graph G by eliminating the 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, …, ap

being 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.

Page 14: 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 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

Page 15: 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.

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

),(:

),(:

Page 16: 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.

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

Page 17: 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.

• 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

Vs Vt

( , )ij ij ijl x d i j E

i V

Page 18: 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.

• 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

ors s

s s

js sjj B j P

sj jsj P j B

s

v x x

x x v

Page 19: 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.

• 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

ort t

t t

jt tjj B j P

tj jtj P j B

t

x x v

x x v

Page 20: 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.

• 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 ijj B j P

ij jij P j B

i

x x

x x

Page 21: 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.

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

Page 22: 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.

• 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

Page 23: 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.

• 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

Page 24: 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.

• 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

Page 25: 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.

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

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

Page 26: 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.

• Exemple of incidence matrix

2

3

1 4

1 1 0 0 0 01 0 1 1 1 00 1 1 0 1 10 0 0 1 0 1

343224231312 xxxxxx

4

3

2

1

_____________________0 0 0 0 0 0

Page 27: 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.

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

Page 28: 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.

• Exemple of incidence matrix

2

3

1 4

101000

110110

011101

000011

343224231312 xxxxxx

4

3

2

1

Page 29: 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.

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

Page 30: 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.

• 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.

Page 31: 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.

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.

Page 32: 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.

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

Page 33: 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.

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

Page 34: 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.

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 singularis non singular.

But these sub matrices

are also sub matrices

of A.

2

3

1 4

101000

110110

011101

000011

343224231312 xxxxxx

4

3

2

1

Page 35: 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.

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

Page 36: 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.

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

Page 37: 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.

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

Page 38: 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.

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

Page 39: 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.

• 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 spanningtree, and vice versa.

The basic variables of a basic solution of a (MCF) problemcorrespond to the arcs of a spanning tree and vice-versa.

Page 40: 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.

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 iji j E

ij jij 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

Page 41: 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.

• 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 xij correspond to the arcs of a spanning tree T of the network.

4v

Page 42: 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.

• 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

T1[ ,..., , ..., , ..., ]i j m

ligne i

ligne j

ija

jiijij cc

)(),( TEji

)(),(0 TEjicc jiijij

Page 43: 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.

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.

Page 44: 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.

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

Page 45: 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.

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

ijT

ijij acc

πt=0π1=1πs=5

π2=4 π3=11012

1142

333

122121

ttt cc

cc

Page 46: 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.

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

Page 47: 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.

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

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

Page 48: 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.

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 jj cx

0et 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

1 then 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

Page 49: 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.

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

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 Enteringvariable

Page 50: 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.

• 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.

Page 51: 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.

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.

Page 52: 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.

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

Page 53: 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.

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

Page 54: 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.

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(

Page 55: 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.

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

Page 56: 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.

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

Page 57: 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.

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

Page 58: 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.

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

Page 59: 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.

• 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

Page 60: 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.

• 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

Page 61: 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.

Third iteration :Entering criterionDetermine 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

Page 62: 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.

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

Page 63: 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.

• 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.

Page 64: 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.

Multiple sources and multiple destinations

s1

s2

sp

t1

t2

tq

Rest of network

sources , 1, , where denotes the flow quantity coming from

destinations , 1, , where denotes the flow quantity arriving ati

j

i s i

j t j

p s V i p v s

q t V j q v t

Page 65: 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.

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 quantity coming from

destinations , 1, , where denotes the flow quantity arriving ati

j

i s i

j t j

p s V i p v s

q t V j q v t

Page 66: 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.

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 quantity coming from

destinations , 1, , where denotes the flow quantity arriving ati

j

i s i

j t j

p s V i p v s

q t V j q v t

Page 67: 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.

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,[,2sv

]0,[psv

]0,[1t

v

]0,[2t

v

]0,[qt

v

],[ ijij cd

sources , 1, , where denotes the flow quantity coming from

destinations , 1, , where denotes the flow quantity arriving ati

j

i s i

j t j

p s V i p v s

q t V j q v t

Page 68: 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.

Generate the network G1= (V1, E1 )

v v

s1

s2

sp

t1

t2

tq

Rest of network

s t

]0,[1s

v

]0,[,2sv

]0,[psv

]0,[1t

v

]0,[2t

v

]0,[qt

v

1 1

Total flowi j

p q

s ti j

v v v

sources , 1, , where denotes the flow quantity coming from

destinations , 1, , where denotes the flow quantity arriving ati

j

i s i

j t j

p s V i p v s

q t V j q v t

Page 69: 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.

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 Graw Hill (2005), Section 9.7

D. G. Luenberger, “ Linear and Nonlinear Programming ”, 2nd edition, Addison-Wesley (1984), Chapter 5