A Polynomial Time Algorithm for the Minimum Cost Flow Problem

GSTF Journal of Mathematics, Statistics and Operations Research (JMSOR) Vol.2 No.1, May 2013
A Polynomial Time Algorithm for the
Minimum Cost Flow Problem
M. Tlas
Scientific Services Department, Atomic Energy Commission, P. O. Box 6091, Damascus, Syria
E-mail addresses: [email protected] (M. Tlas)
Abstract- An efficient polynomial time algorithm for
solving minimum cost flow problems has been proposed
in this paper. This algorithm is basically based on
successive divisions of capacities by multiples of two,
and it solves the minimum cost flow problem as a
cost-scaling approach of Goldberg and Tarjan (1990)
⎛
⎞
n2
O ⎜ nm log log nC ⎟ time on
m
⎝
⎠
networks with maximum arc cost magnitude C , the
which runs in
O (n 2 ) shortest path problems on residual
2
networks with n nodes and runs in O ( n m r ) time,
where m is the number of arcs and r is the smallest
integer greater than or equal to log B , and B is the
sequence of
double scaling of both costs and capacities of Ahuja
et al (1992) which solves the problem in
O ( nm log log B log nC ) time in the worst case,
the strongly polynomial time of Orlin (1993) with
running
time
bounded
by
largest arc capacity of the network. A numerical
example is illustrated using the proposed algorithm.
O ( ( m log n )( m + n log n ) ) and
the
primal
network simplex polynomial time of Orlin (1997)
which
runs
in
Keywords- Minimum cost flow problem, Scaling
algorithm, Polynomial time algorithm, Augmenting path
method, Network flow
(
)
O min ( n 2 m log nC , n 2 m 2 log n ) time
at
most.
The first four of these algorithms have idea is
common, that is scaling or successive approximation.
Scaling algorithms work by solving a sequence of
sub-problems which numeric parameters are more
and more closely approximate those of the original
problem, i.e.,. A solution for one sub-problem helps
to solve the next sub-problem in the sequence.
In this paper, an efficient polynomial algorithm is
proposed for determining the minimum cost flow in a
Introduction
The minimum cost flow problem is one of the most
fundamental network flow problems and it is a
generalization of the maximum flow problem. It has
applications in wide range of fields including
chemistry, physics, computer networking, most
branches of engineering, manufacturing, public
policy and social systems, scheduling and routing,
telecommunications, and transportation (Ahuja ,
Magnanti and Orlin, 1993).
Different approaches have been proposed to solve the
minimum cost flow problem. The classical algorithm
for solving minimum cost flow problems is the
Fulkerson's Out of Kilter algorithm (Ford and
Fulkerson, 1962) which is essentially a primal
method and runs in exponential time in the worst
case.
There are numbers of different polynomial time
algorithms for solving the minimum cost flow
problem such as: the capacity-scaling approach of
Edmonds and Karp (1972) with running time
2
network with an upper bound O ( n m r ) on the
number of arithmetic operations, where n , m are
the numbers of nodes and arcs of the network
respectively and r is the smallest integer greater than
or equal to log B , where B is the largest arc
capacity of the network. The algorithm is basically
based on successive divisions of capacities by
multiples of two; it solves the minimum cost flow
2
problem as a sequence of O ( n ) shortest path
problems on residual networks.
A generalization of this proposed algorithm has been
also performed in order to solve a minimum cost flow
problem in a network with nonnegative lower bound
on the flow vector.
O ( ( m log B )( m + n log n ) ) on networks with
n nodes, m arcs and maximum arc capacity B , the
DOI: 10.5176/2251-3388_2.1.40
103
© 2013 GSTF
GSTF Journal of Mathematics, Statistics and Operations Research (JMSOR) Vol.2 No.1, May 2013
∑x
Preliminarily. In this section we define the
minimum cost flow problem and introduce the
terminology and notation used throughout the paper.
Minimum cost flow problem statement. We consider
j ∈V
ij
= 0 ∀i ∈V \ {s , t } (flow
constraint).
a directed graph (digraph) G = (V , E ) consists of
Call a flow
a set V of nodes and a set E of arcs whose
elements are ordered pairs of distinct nodes. A
directed network is a directed graph with numerical
among flows with value x s t .
values attached to its nodes and arcs. Let n = V
and
k = ( i , j ) ∈ E a nonnegative integral unit cost c k
bk . Frequently,
two special nodes are distinguish in a graph, the
If c ij = c ij − (u j − u i ) > 0, then x ij = 0 ,
t . An arc k = ( i , j ) ∈ E has
two end points i and j , the node i is called the
tail and node j is called the head of arc k . The arc
k = ( i , j ) is said to emanate from node i , the arc
source s and the sink
If c ij = c ij − (u j − u i ) < 0 , then x ij = bij ,
If c ij = c ij − (u j − u i ) = 0 , then 0 ≤ x ij ≤ bij ,
k = ( i , j ) is an outgoing arc of node i and an
incoming arc of node
c ij = c ij − (u j − u i ) is called the reduced cost of
j . The arc adjacency list of
node i , E (i ) , is defined as the set of arcs
emanating
from
node
i,
the arc (i , j ) .
i.e.,
E (i ) = {k = (i , j ) ∈ E : j ∈V } . The degree of
Residual network. A residual network G ( x )
corresponding to a feasible flow x is defined as
follows: (for arc (i , j ) ∈ E )
a node is the number of incoming and outgoing arcs
at that node.
The total cost of a flow x from source node s to
sink node
t is
∑c
k ∈E
k
If x ij < bij , then there is a forward arc (direct arc)
x k and let its value be z . The
(i , j ) has flow
problem is to find a maximum flow of minimum cost
among the source node s and the sink node
x extreme if it is of minimum cost
Labeling function. A labeling function (potential
function) u is defined as a function from nodes to the
real numbers, i.e., u :V → R , where R denotes
real numbers. x and u are called compatible if the
flow x and labeling function u together satisfy the
following conditions: (for arc (i , j ) ∈ E )
m = E . We associate with each arc
and a nonnegative integral capacity
conservation
x ij ≥ 0
and
reduced
cost
c ij = c ij − (u j − u i ) ≥ 0 ,
t with
If x ij = bij , then the arc (i , j ) is ignored,
*
value z .
If x ij > 0 , then there is a backward arc (reverse arc)
A flow is a value x on arcs satisfying the following
( j , i ) has flow x ji = bij − x ij ≥ 0 and reduced
constraints:
x ij ≤ bij
∀(i , j ) ∈ E (capacity constraint),
x ij = − x ji
∀(i , j ) ∈ E (flow
cost c ji = −c ij + (u j − u i ) ≥ 0 ,
If x ij = 0 , then the arc
anti-symmetry
( j , i ) is ignored.
constraint) and
104
© 2013 GSTF
GSTF Journal of Mathematics, Statistics and Operations Research (JMSOR) Vol.2 No.1, May 2013
Artificial arc. We introduce on network an additional
arc (t , s ) which has cost ct s = 0 and capacity
Set
bt s = ∞ .
⎢B ⎥
bk := ⎢ rk ⎥
⎣2 ⎦
for
all
arcs
k = 1,..., m / ⎢⎣ x ⎥⎦ is the greatest integer less
Minimum cost flow algorithm with zero lower
bound on the flow vector
This algorithm solves the minimum cost flow
problem in polynomial time with zero lower bound
and b upper bound on the flow vector x i.e.
0 ≤ x k ≤ bk for all arcs k = 1,..., m on the
than or equal to
While(2)
x/
( k ≤ m ) , then do /scan arcs
k = (i , j ) /
network G = (V , E ) , and also it is considered that
If(1) x k < bk , then do
bk < ∞ for all k = 1,..., m .
c k = c k − (u j − u i ) < 0 ,
If(2)
Initialization:
then do / k = (i , j ) , ct s = 0 /
Set
Do procedure
r := min {q ∈ Z + =/ 2q > max {bk , k = 1,..., m }}
D ( j , i ) from
j to i on the residual network G ( x )
Set u i := 0 for all nodes i = 1,..., n
If(3)
/ s = 1, t = n /
i ∈ p , then do
Set x k := x k + 1
Set x k := 0 and B k := bk for all arcs
Set x l := x l + 1 for all
k = 1,..., m
forward arcs l on the shortest path
μ
Set x t s := 0 /total flow/ and z := 0
of
reduced
/total cost/
costs from j to i in G ( x )
Set x gf := x gf − 1 for all
Iteration:
backward arcs
While(1) ( r ≥ 1) , then do
shortest path
Set k := 1 , r := r − 1 and z := 2z
Set
x k := 2x k
for
all
l = (f , g ) on the
μ
arcs
Set z := z + c k
k = 1,..., m
/
c k = c k − (u j − u i ) with new node
Set x t s := 2 x t s
105
© 2013 GSTF
GSTF Journal of Mathematics, Statistics and Operations Research (JMSOR) Vol.2 No.1, May 2013
End If(1)
Set k := k + 1
potentials u i and u j /
End While(2)
End If(3)
End While(1)
If(4) c k = c k − (u j − u i ) < 0
Set u i := u i − u s for all i = 1,..., n
/ with new node potentials u i and u j /
End the algorithm
Set
ue := ue − c ij for all
*
nodes e = 1,..., n and e ≠ i
This procedure gives the shortest path of reduced
costs between j
End If(4)
D (s , t ) from s to t
Set
*
and i on the defined residual
p := φ ,
Set I := {1, 2,..., n } ,
on the new residual network G ( x )
If(5) t ∈ p , then do
Set g = 0 ,
Set x t s := x t s + 1
*
⎪⎧0 if j = j
*
⎪⎩ ∞ if j ≠ j
Set d j = ⎨
Set x l := x l + 1 for all
forward arcs l on the shortest path
μ
for all
j = 1,..., n
of
reduced
costs from s to t in
*
network G ( x ) based on Dijkstra’s algorithm
Initialization:
End If(2)
Do procedure
*
Procedure D ( j , i )
Iteration:
While ( I ≠ φ ) do
G (x )
Let h := inf {d i \ i ∈ I }
Set x gf := x gf − 1 for all
backward arcs l = (f , g ) on the
If h = ∞ do
Set d i := g for all i ∈ I
shortest path
μ
Set I := φ
Set
z := z + (ut − u s )
Else do
Set g := h
/with new node potentials u s and ut /
Find i ∈ I such that d i = g
End If(5)
106
© 2013 GSTF
GSTF Journal of Mathematics, Statistics and Operations Research (JMSOR) Vol.2 No.1, May 2013
Set I := I \ {i } and p := p ∪ {i }
*
defined residual network from j to i
*
in the case
when there is a path between them i.e., i ∈ p .
*
For all j ∈ I ,such that (i , j ) is an arc
*
in the residual network, do
If (d j > g + c ij ) do
the defined residual network
/ c ij ≥ 0
Initialization:
reduced cost/
Set d j := g + c ij
Set
*
Identification of the shortest path from j to i on
pred ( j ) := i
Set
i := i *
Set
μ := {i }
Iteration:
While (i ≠ j ) do
End If
*
End For all
j := pred (i )
Set
End If
Set i := j
End While
Set
Set u i := u i + d i for all i = 1,..., n
End While
End the procedure
Comments
Notes:
a.
a.
After the application of the procedure
D ( j * , i * ) on the defined residual network,
new potential function u will be reb.
determined.
After the application of the procedure
D ( j * , i * ) on the defined residual network,
it is found that the set p ≠ φ because
j * ∈ p at least.
c.
μ := {i } ∪ μ
If c ij < 0 , then we will change the
node potentials to be:
After the application of the procedure
*
It is noticed that, when the algorithm is
executed, the compatibility conditions
between the current flow x and the current
potential function u must be satisfied. In
the contrary case, it is necessarily to change
the current potential function as follows: (for
arc (i , j ) ∈ E )
*
D ( j , i ) on the defined residual network,
*
*
if i ∈ p , then there is a path between j
*
and i on the defined residual network else
*
*
there is not any path between j and i on
ue := ue − c ij for all e = 1,..., n
and
e≠j
b.
the defined residual network.
The procedure
D ( j , i ) is applied when
c ij < 0 , in this case, there are two
possibilities, the first one is i ∈ p (there is
The following procedure determines the shortest path
of the reduced costs μ defined by nodes on the
a path
107
μ from j
to
i ). In this case, it is
© 2013 GSTF
GSTF Journal of Mathematics, Statistics and Operations Research (JMSOR) Vol.2 No.1, May 2013
found that z new < z old
Complexity of the algorithm with zero lower
bound on the flow vector
when the arc
(t , s ) ∉ μ and z new > z old when the arc
(t , s ) ∈ μ . The second one is i ∉ p and
in this case, z dos not change but the node
c.
*
2
is based on Dijkstra’s algorithm is O ( n ) arithmetic
operations, where n is the number of nodes in the
network G = (V , E ) .The maximum number of
iterations of the algorithm is m × r ,where m is the
number of arcs in the network G = (V , E ) and r is
potentials will be changed.
When the procedure D (s , t ) is applied, two
cases are also possible, the first one is
t ∈ p (there is a path from s to t ), and it is
the smallest integer greater than or equal to log B ,
where B is the largest arc capacity of the network.
found that z new > z old in this case. The
d.
second one is t ∉ p , and it is found that,
z dos not change in this case but the node
potentials will be changed.
The new reduced cost c ij ( new ) is equal to
*
*
The procedure D ( j , i ) is applied two times in
each iteration, then the time taken by the algorithm is
2
at most O ( n mr ) arithmetic operations.
the old reduced cost c ij (old ) minus the
Minimum cost flow algorithm with nonnegative
lower bound on the flow vector
This algorithm solves the minimum cost flow
problem in polynomial time with a ≥ 0 nonnegative
lower bound and b upper bound on the flow vector
x i.e. 0 ≤ ak ≤ x k ≤ bk for all arcs k = 1,..., m
deference between d j and d i because: (for
arc
*
The time taken by the procedure D ( j , i ) , which
(i , j ) ∈ E )
on the network G = (V , E ) , and also it is
considered that bk < ∞ for all k = 1,..., m .
c ij ( new ) = c ij − (u j − u i )
= c ij − (u j (old ) + d j − u i (old ) − d i )
It is supposed that there is a nonnegative lower bound
= c ij − (u j (old ) − u i (old )) − (d j − d i )
a ≥ 0 on the flow x in the network G = (V , E )
i.e. 0 ≤ ak ≤ x k ≤ bk this implies that
c ij ( new ) = c ij (old ) − (d j − d i )
e.
The reduced cost c ji of the arc
0 ≤ x k − ak ≤ bk − ak for all arcs k = 1,..., m .
( j , i ) is
Let y k = x k − ak and bk = bk − ak for all arcs
*
equal to the inverse reduced cost c ij of the
arc
k = 1,..., m , which implies that x k = y k + ak ,
(i , j ) and verse versa because: (for arc
bk = bk* + ak and
(i , j ) ∈ E )
0 ≤ y k ≤ bk*
for
all
arcs
k = 1,..., m .
c ji = c ji − (u i − u j )
= −c ij − (u i − u j )
Using the conservation constraint, it can be seen that
n
∑x
= −(c ij + (u i − u j ))
i =1
= −(c ij − (u j − u i ))
n
ij
= ∑ x js
for
all
nodes
j = 1,..., n
s =1
(1)
= −c ij
108
© 2013 GSTF
GSTF Journal of Mathematics, Statistics and Operations Research (JMSOR) Vol.2 No.1, May 2013
From another hand, we have
n
n
*
n
∑ x ij = ∑ y ij + ∑ aij for all nodes j = 1,..., n
i =1
i =1
also added where, its capacity is bt *s * = ∞ and its
*
i =1
n
This new defined digraph will be denoted by
n
∑ x js = ∑ y js + ∑ a js
s =1
s =1
for
all
nodes
G * (V * , E * ) , where it is consisting of the same set
*
of nodes V added to it the super source s and the
*
*
*
super sink t with V = n = n + 2 , the same set
of arcs E added to it all auxiliary arcs with
E * = m * , where m ≤ m * ≤ m + n and the two
s =1
j = 1,..., n
(3)
Using (1), (2) and (3), it can be found that
n
n
i =1
s =1
∑ y ij = ∑ y js + w j for all nodes j = 1,..., n
where
n
n
s =1
i =1
w j = ∑ a js − ∑ aij
for
all
*
nodes
w j and zero cost is added in the
have
w =
∑
of the flow
j where, j = 1,..., n , we define also a new
source (super source) called
and let
s * and a new sink (super
positive
capacities
i.e.
w j , and let z x denote the total cost
x with nonnegative lower bound on x
z y denote the total cost of the flow y with
m
y , then it can see that:
m
m
m
k =1
k =1
k =1
z x = ∑ c k x k = ∑c k ( y k + ak ) = ∑ c k y k + ∑ c k ak
k =1
w j > 0 , then an outgoing arc in the
m
z x = z y + ∑ c k ak
k =1
*
j of the form ( j ,t ) is added where, its
capacity is
b *jt * = w j and its cost is c jt * = 0 , in the
case of w
< 0 , then an incoming arc in the node j
j
strictly
zero lower bound on
t*.
In the case of
node
which
{ j ∈V :w j >0}
An arc of capacity
sink) called
*
special arcs (t , s ) and (t , s ) .
Let w is the sum of capacities of auxiliary arcs
j = 1,..., n
node
ct *s * = 0 .
cost is
(2)
n
*
auxiliary arcs. A special arc of the form (t , s ) is
Initialization:
Set
{
}
r * := min q ∈ Z + =/ 2q > max {bk* , k = 1,..., m * }
*
of the form (s , j ) is added where, its capacity is
bs** j = −w j and its cost is c s * j = 0 , in the case of
Set
u i := 0 for all nodes i = 1,..., n *
/ s = 1, t = n , s * = n * − 1, t * = n * , n * = n + 2 /
w j = 0 , then there is not any arc added in the node
j . These added arcs are at most n arcs called
109
© 2013 GSTF
GSTF Journal of Mathematics, Statistics and Operations Research (JMSOR) Vol.2 No.1, May 2013
y k := 0 and B k* := bk* for all arcs
Set
j to i on the residual network G * ( y )
k = 1,..., m *
y t s := 0 /total flow/ and z y := 0
Set
D ( j , i ) from
Do procedure
i ∈ p , then do
If(3)
Set
/total cost/
Set
y t * s * := 0
Set
w =
y k := y k + 1
Set
∑
forward arcs
wj
y l := y l + 1 for all
l on the shortest path μ
{ j ∈V :w j >0}
of reduced costs
Iteration:
from
While(1) ( r
j to i in G * ( y )
≥ 1) , then do
*
Set
k := 1 ,
Set
r := r − 1 and
*
y gf := y gf − 1 for all
*
backward arcs
z y := 2z y
l = (f , g ) on the
shortest path
y k := 2 y k
Set
for
all
arcs
Set
k = 1,..., m *
z y := z y + c k
μ
/
c k = c k − (u j − u i ) with new node
Set
y t s := 2 y t s and y t * s * := 2 y t * s *
Set
⎢B* ⎥
bk* := ⎢ rk* ⎥
⎣2 ⎦
for
all
potentials
arcs
u i and u j /
End If(3)
k = 1,..., m *
If(4)
While(2) ( k
≤ m * ) , then do /scan arcs
/ with new node potentials
c k = c k − (u j − u i ) < 0
u i and u j /
k = (i , j ) /
Set
If(1)
y k < b , then do
If(2)
then do / k
*
k
ue := ue − c ij for all
nodes e = 1,..., n and e ≠ i
*
c k = c k − (u j − u i ) < 0 ,
End If(4)
= (i , j ) , ct s = 0 , ct * s * = 0 /
End If(2)
110
© 2013 GSTF
GSTF Journal of Mathematics, Statistics and Operations Research (JMSOR) Vol.2 No.1, May 2013
Do procedure
D (s * , t * ) from s * to t *
on the new residual network
If(5) t
*
G *( y )
backward arcs
y gf := y gf − 1 for all
l = (f , g ) on the
∈ p , then do
Set
shortest path
μ
Set z y := z y + (u t − u s )
y t * s * := y t * s * + 1
/with new node potentials
y l := y l + 1 for all
Set
forward arcs
Set
u s and ut /
End If(6)
l on the shortest path μ
End If(1)
of reduced costs
from
Set k := k + 1
s * to t * in G * ( y )
End While(2)
Set
backward arcs
y gf := y gf − 1 for all
End While(1)
l = (f , g ) on the shortest
path
μ
u i := u i − u s for all i = 1,..., n
If (7) ( y t *s *
z y := z y + (ut * − u s * )
Set
/with new node potentials
Set
no feasible flow
Else
u s * and ut * /
End If(5)
Do procedure
on the new residual network
If(6) t
Set
forward arcs
Set
x k = y k + ak for all arcs k = 1,..., m
Set
bk = bk* + ak for all arcs k = 1,..., m
Set
z x = z y + ∑ ak c k
D (s , t ) from s to t
m
k =1
G *( y )
End If(7)
∈ p , then do
Set
< w ) , then, the network G (V , E ) has
End the algorithm
y t s := y t s + 1
y l := y l + 1 for all
Notes:
l on the shortest path μ
a.
The quantity
∑
w =
w j is the
{ j ∈V :w j >0}
of reduced costs
maximum
*
from s to
*
flow
in
the
network
*
G (V , E ) , then, we always have
( y t *s * ≤ w ) , where y t *s * is the flow in
t in G * ( y )
G * (V * , E * ) .
111
© 2013 GSTF
GSTF Journal of Mathematics, Statistics and Operations Research (JMSOR) Vol.2 No.1, May 2013
b.
In the case when all auxiliary arcs in
are on the flow
G * (V * , E * ) are
saturated,
i.e.
y t *s * = w , then the flow y is optimal in
all
*
*
In
the
case
of
0 ≤ x k ≤ bk ≤ ∞
for
all
k = 1,..., m , we will do the following procedure:
In the case when there are some auxiliary
Procedure:
This procedure forms an auxiliary network derived
from the original network G = (V , E ) and also tests
if the original minimum cost flow problem has a
feasible solution or not.
G * (V * , E * ) are not saturated, i.e.
< w , then the flow y is optimal in
arcs in
y t *s *
k = 1,..., m .
*
G (V , E ) and consequently the flow
x = y + a is optimal in G (V , E ) .
c.
x i.e. 0 ≤ ak ≤ x k ≤ bk ≤ ∞ for
G * (V * , E * ) and consequently there is
not any feasible flow x in G (V , E ) .
Initialization /auxiliary network/
Complexity of the algorithm with nonnegative
lower bound on the flow vector
(For each arc
D ( j * , i * ) , which
* 2
is based on Dijkstra’s algorithm is O (( n ) )
*
arithmetic operations, where n is the number of
*
*
*
nodes in the network G = (V , E ) .The
If
maximum number of iterations of the algorithm is
If
m × r ,where m is the number of arcs in the
G * = (V * , E * ) and r * is the smallest
integer greater than or equal to log B , where B is
Iteration
The time taken by the procedure
*
*
largest
bij = ∞ then, there is a forward arc (i , j ) has a
reduced cost
c ij = 1
bij < ∞ then the arc (i , j ) is ignored
*
network
the
(i , j ) ∈ E ), then do
arc
capacity
of
the
G * = (V * , E * ) . The procedure
Do procedure D (s , t ) from s to t on this auxiliary
network.
If there is a path goes from s to t , i.e. t ∈ p , then
the maximum flow is infinite and the minimum cost
flow problem does not have any finite feasible
solution, else the maximum flow is upper bounded by
network
D ( j * , i * ) is
applied three times in each iteration, then the time
taken by the algorithm is at most
arithmetic operations.
O (( n * )2 m *r * )
the value of
β=
∑
{( i , j ):i ∈p & j ∈V
\ p}
bij . In this case the
infinity ∞ in the original network
Minimum cost flow problem with infinite upper
bound on the flow vector
Two cases have been treated earlier in this paper, the
first one is when a zero lower bound and a finite
upper bound are on the flow vector x i.e.
0 ≤ x k ≤ bk < ∞ for all k = 1,..., m and the
G = (V , E ) will
be changed by the value of β and resolve it using
the proposed algorithm.
Now, in the case of 0 ≤ ak ≤ x k ≤ bk ≤ ∞ for all
k = 1,..., m , we will change it to the case of
0 ≤ y k ≤ bk* ≤ ∞ for all k = 1,..., m , where
second case is when a nonnegative lower bound and a
finite upper bound are on the flow x i.e.
0 ≤ ak ≤ x k ≤ bk < ∞ for all k = 1,..., m .
y k = x k − ak and
for
all
bk* = bk − ak
k = 1,..., m , and we repeat the same procedure
Now, two additional cases will be treated: the first
one is when a zero lower bound and an infinite upper
bound are on the flow x i.e. 0 ≤ x k ≤ bk ≤ ∞ for
used before in the first case.
all k = 1,..., m ; The second case is when a
nonnegative lower bound and an infinite upper bound
112
© 2013 GSTF
GSTF Journal of Mathematics, Statistics and Operations Research (JMSOR) Vol.2 No.1, May 2013
Conclusion
In this paper, using the successive divisions of
capacities by multiples of two, a polynomial time
algorithm for solving the minimum cost flow
problem has been developed. The algorithm runs in
O ( n 2 m r ) time, where n , m are the numbers of
nodes and arcs of the network G (V , E ) respectively
and r is the smallest integer greater than or equal to
log B , where B is the largest arc capacity of the
network. The algorithm solves the minimum cost
2
flow problem as a sequence of O ( n ) shortest path
problems on residual networks.
A generalization of this algorithm has been also
performed in order to solve the minimum cost flow
problem in a network with nonnegative lower bound
on the flow vector.
113
© 2013 GSTF
GSTF Journal of Mathematics, Statistics and Operations Research (JMSOR) Vol.2 No.1, May 2013
Illustrative example
The demonstration of the proposed algorithm for solving the minimum cost flow problem will be done though the
following numerical example.
Arc
Arc tail
Arc
Arc
Arc cost
Flow lower
Flow lower
k = (i , j )
i
head
capacity
ck
bound
bound
j
bk
ak1
ak2
1
1
2
50
3
15
45
2
1
3
30
6
7
25
3
1
4
15
8
5
15
4
2
3
50
2
5
20
5
2
5
25
2
3
25
6
3
4
15
2
5
15
7
3
5
45
1
4
40
8
3
6
10
3
2
10
9
3
8
15
8
4
14
10
4
6
10
1
5
9
11
4
9
20
3
4
19
12
5
7
90
9
1
33
13
5
8
10
8
5
8
14
6
8
60
5
1
40
15
7
8
10
1
2
10
16
7
11
10
2
4
5
17
8
10
10
1
3
3
18
8
11
80
4
50
60
19
9
8
20
2
4
16
20
9
10
10
3
4
5
21
10
11
10
3
3
7
114
© 2013 GSTF
GSTF Journal of Mathematics, Statistics and Operations Research (JMSOR) Vol.2 No.1, May 2013
b=30,c=6, a=7
,c
=8
,a
=5
1,
,c=
4
a=
9, a
,c=
0
9
b=
=3
5
b=1
0, c
7
=1
=8,
a
=5
b=15,c=8, a=4
3
b=
10
b=15,c=2, a=5
b=
15
45
b=
5,c=
2, a
,c=
3,
0,
b=1
b=6
a=
2
c=1
5
, a=
=5
0 ,c
6
1
, a=
c=2
, a=
4
b=80,c=4, a=50
8
b=
10
,c=
1,
a=
3
11
,
10
b=
3,
c=
3
a=
10
9
4
b=
10,
b=10,c=1, a=2
1
50
b=50,c=2, a=5
b=
,
=3
,c
b=2
b=20,c=2, a=4
2
15
a=
b
a=4
c=3,
= 10 ,
b=20,c=3, a=4
Diagram of the example with
a1 lower bound on the flow vector
115
© 2013 GSTF
GSTF Journal of Mathematics, Statistics and Operations Research (JMSOR) Vol.2 No.1, May 2013
The solution of the proposed minimum cost flow problem is given as follow:
Arc
Arc tail
Arc
Arc
Arc cost
Arc flow
Arc flow with
k = (i , j )
i
head
capacity
ck
with
ak2
j
bk
ak1
1
1
2
50
3
50
The minimum
2
1
3
30
6
20
cost flow
3
1
4
15
8
15
problem has
4
2
3
50
2
25
no feasible
5
2
5
25
2
25
flow
6
3
4
15
2
15
7
3
5
45
1
5
8
3
6
10
3
10
9
3
8
15
8
15
10
4
6
10
1
10
11
4
9
20
3
20
12
5
7
90
9
20
13
5
8
10
8
10
14
6
8
60
5
20
15
7
8
10
1
10
16
7
11
10
2
10
17
8
10
10
1
3
18
8
11
80
4
68
19
9
8
20
2
16
20
9
10
10
3
4
21
10
11
10
3
7
Total flow
is
116
© 2013 GSTF
GSTF Journal of Mathematics, Statistics and Operations Research (JMSOR) Vol.2 No.1, May 2013
x ts = 85
Total cost
is
z = 1475
b=2
2
,c =
8,
x=
1
5
x=5
b =9
5
7
20
, x=
9
=
c
0,
b =1
0 ,c=
8, x
=1 0
b=15,c=8, x=15
b=
10
b =1
,c =
3 ,x
=1
0,c
=
b
0
= 10
1, x
,c
=60
=
=2 0
5, x
6
0, c
=2 ,
x=1
0
b=
10
,c =
1,
11
x=
3
1
b=
0,
c
,
=3
7
x=
10
9
4
b =1
b=80,c=4, x=68
8
b=20,c=2, x=16
15
b=
3
b=15,c=2, x=15
b=
b=30,c=6, x=20
,
45
,
c =1
2, x
=25
b=10,c=1, x=10
1
c
0
b=50,c=2, x=25
b=
,
50
=3
=5
,x
5 , c=
x=4
,c=3,
b=10
b=20,c=3, x=20
x=85, z=1475
Diagram of the solution with
a1 lower bound on the flow vector
117
© 2013 GSTF
GSTF Journal of Mathematics, Statistics and Operations Research (JMSOR) Vol.2 No.1, May 2013
References
[1]
[2]
[3]
[4]
[5]
[6]
[7]
Ahuja. R.K, Goldberg. A.V, Orlin. J.B and Tarjan. R.E,
Finding minimum cost flows by double scaling,
Mathematical Programming, 53 (1992), 243-266.
Ahuja. R.K, Magnanti. T.L and Orlin. J.B, Network
Flows: Theory, Algorithms and Applications, Prentice
Hall, Englewood Cliffs, NJ (1993).
Edmonds. J and Karp. R, Theoretical improvements in
algorithmic efficiency for network flow problems,
Journal of ACM (1972), 248-264.
Ford. L.R and Fulkerson. D.R, Flows in Networks,
Princeton Univ. Press, Princeton, NJ (1962).
Goldberg. A.V and Tarjan. R.E, Solving minimum cost
flow
problem
by
successive
approximation,
Mathematics of Operations Research, 15 (1990), 430466.
Orlin. J.B, A faster strongly polynomial minimum cost
flow algorithm, Operations Research, 41(2) (1993),
338-350.
Orlin. J.B, A polynomial time primal network simplex
algorithm for minimum cost flows, Mathematical
Programming, 78 (1997), 109-129.
M. Tlas received his M. Sc. In graph theory from Louvain University,
Belgium in 1989 and he received the Ph.D. in applied statistics-orientation
operations research from Brussels University, Belgium in 1993. From
1993 up till now, he is a principal and senior researcher at the Atomic
Energy Commission of Syria. The main topics are operation research,
applied statistics, inverse problem, multi-objective optimization and
mathematical modeling. He published many papers in the above
mentioned fields and he was awarded the ABDEL SALAM prize in
mathematics for young Syrian scientists in 2005.
118
© 2013 GSTF