Applications of Maximal Network Flow Problems in Transportation and Assignment Problems

This paper presents some modiﬁcations of Ford-Fulkerson’s labeling method for solving the maximal network ﬂow problem with application in solving the transportation and assignment problems. The modiﬁcations involve the tree representation of the nodes labeled and the edges used them. It is shown that after each ﬂow adjustment some of the labels can be retained for the next labeling process. Through certain computational aspects it has been suggested that to indicate that with theses the primal-dual approach for solving the transportation and assignment problems is improved to certain extent


Introduction
New solution techniques have been suggested to solve transportation, mainly in the tree representation of a basis, location of a better adjacent basis, and labeling and relabeling of trees (Glover, 1982;Klingman, 1983).In this paper some of theses ideas are incorporated into the primal-dual approach to the transportation and assignment problems.Each label computed in the labeling method of Ford-Fulkerson (Ford, L.R., 1962) for the maximum flow problems consists of two element.The second element is used for flow augmentation.After each flow adjustment, all labels are discarded and the labeling process starts from the source again.At each labeling process the nodes labeled and the edges used to label them are represented by a forest on the transportation network.It is shown that by using either the predecessor and distance labels (Singh, Vinai K., 2007) or the triple labels (Johnoson, E.I., 1986) on the nodes of the tree, several of the labeled nodes can be retained as "labeled and unscanned" nodes for the next labeling process.
Based on the Ford-Fulkerson's primal-dual approach for solving the transportation problems, it is found the primaldual method can be improved considerably making it once again competitive with the MODI method for solving the transportation problems.For the assignment problem our computational experience with these modifications has been very encouraging and since the primal-dual approach is similar in the spirit to Hungarian Method, it appears that we have accelerated the Hungarian Method.It should be pointed out that we have not in any sense attempted to "optimize" our codes.Presumably, the computational times can be reduced by appropriate modifications to the codes.
There are a variety of other problems for which the ideas developed in this paper can be useful.For instance; algorithms for solving the Bottleneck Assignment and Bottleneck Transportation problems (Garfinkel, R.S., 1981) involve the solution of maximal flow problems.

Definition and notations
Let G =( N, A ) be a finite directed network with N representing the node set and A the arc set Let x =w 0 , w 1 , . . ..., w k = y be a sequence of distinct nodes having the property that either (w j−1 , w j ) ∈A or(w j , w j−1 ) ∈A for j=1,2, . . . . . .,k. Singling out, for each i, one of theses two possibilities, the resulting sequence of nodes is called a path from x to y. Arcs (w j−1 , w February, 2010 j ) that belong to the path are referred to as forward arcs while arcs (w j+1 , w j )belonging to the same path referred to as reverse arcs.A cycle is a path from a node to itself.A tree in G = ( N,A) is any set of | N | -1 arcs without cycles.Each tree is pictured vertically in the plane and extending downwards with the highest node as root.In such a rooted tree, for each node x, a distance label d(x) and the triple-label [consisting of predecessor P(x), right-neighbour B(x), and leftmost successor L(x) ] can be defined.

Algorithms for Solving the Maximal Flow Problem
Let G =(N,A) be a directed network, where each (x, y) ∈ A has associated with it as non negative number c(x,y) which is the capacity of the arc (x, y).The maximal flow problem from source to sink can be stated as: Where s= source node of he network.
We define the following characterization of the structure of the labeled nodes and the edges used to label them in a particular application of the labeling process (i.e.routine A): N k = {y 1, y 2,....., y q } as the set of nodes labeled on the k th application of the labeling process.
The connected graph (N k , E k ) is obviously a tree.We define the rooted tree T k =(N k , E k ) as the tree formed by the graph (N k , E k ) with s as the root.
After the k th flow adjustment, there exists at least one (y j−1 , y j ) ∈ F k such that either: , y j ): (y j−1 , y j )a binding edge after he k th flow adjustment} A backtracking algorithm 2 is given below for flow adjustment at a breakthrough.This algorithm does not use the second element (E) of the label which is computed in Ford-Fulkerson's routine A. The algorithm also identifies the set J k which is later utilized to identify those nodes whose labels remain valid even after the flow adjustment.One computational experience discussed later in the paper and the results given in (Barr, R., F. Glover, 1982) indicate that there is some computational saving in using a backtracking procedure for flow adjustment instead of the∈ function.Furthermore, we note that the improved labeling algorithms 2 and 3 become computationally less attractive if the ∈ function of Ford-Fulkerson is utilized instead of the backtracking procedure.
Algorithm 1: for flow adjustment along F k using a backtracking routine.
Step 0: Breakthrough occurs in the kth labeling process.
Step 1 (Backtrack): The adjusted flows are represented by f'(x, y).Stop It will now be shown that with the use of either the predecessor -distance labels or the triple -labels, some of the labeled nodes can be retained for the next labeling process.
Lemma 1: after the k th breakthrough and flow adjustment let M = {m 1, m 2,....., m l } be the set of labeled nodes such that d (m 1 ) ≤d (x b ) for i= 1,2,. . ...,l where d The predecessor and distance labels of the node m 1 ∈ M remain valid and these nodes can be retained as labeled and unscanned for the next labeling process.
This is true since (m j−1 , m j ) J k .On the next application of the labeling process, node m j can be labeled from node m j−1 again.Since s∈ M, all m î ∈M can be labeled in the same sequence again.The labels, therefore, remain valid, and the nodes m i ∈M can be retained in the labeled and unscanned state for the next labeling process.
Corollary to Lemma 1: After the kth breakthrough and flow adjustment, if P(t)=x b , the labels and the status (scanned or unscanned) of each labeled node except nodes x b and t can be retained for the next labeling process.Nodex b is set to the labeled and unscanned state while t is set to the unlabeled state.
Lemma 2: After the k th breakthrough and flow adjustment, we need to discard only the triple -label of the nodes in the tree Proof: The proof of the first part of lemma is similar to proof of lemma 1.The second part of the lemma then follows from the fact that the subtree with y b as root has to be disconnected from the tree with s as the root.
Using the results of Lemmas 1 and 2, we propose the following improved labeling algorithms from solving the maximal flow problem.
Algorithm 2: Improved labeling algorithm for solving the maximal flow problem using the predecessor and distance functions.
Step 0: (i) At the start all nodes are in the unlabeled state (ii) Node s receives labels (Φ, 0) (s is now labeled and unscanned).

Journal of Mathematics Research
February, 2010 Step 1 (labeling Process): Select any labeled unscanned node x with label (z ± , h ).To each unlabeled node y such that f(x,y) < c(x,y), assign the label (x ± , h+1).To each unlabeled node y such that f(y,x)>0, assign the label ( x − , h+1 ) [y is now labeled and unscanned, x is labeled and scanned].Repeat until t is labeled [breakthrough] or until no more labels can be assigned and t is unlabeled.In the breakthrough case go to step 2, in the latter case, stop.
to the labeled and unscanned state.Erase the label on t.Go to step 1.
(iv) Set all labeled nodes y j such that d(y j ) ≤ d(x b ) to the labeled and unscanned state and erase the labels on the other labeled nodes.Go to step 1.
Algorithm 3: Improved labeling algorithm for the maximal flow problem using the triple labels.
Step 0: (i) At the start all nodes are in the unlabeled state.
Step 1 (Labeling Process): Select any labeled unscanned node x with label (x ± , B(x), L(x)).To each unlabeled node y such that f(x, y) < c(x, y), assign the label (x + , B(y), L(y) ) where B(y) = L(x) and L(y)=Φ Set L(x) =y.To each unlabeled node y such that f(x,y)>0, assign the label (B(y), L(y)) where B(y)=L(x) and L(y)=Φ [x is now labeled and unscanned, y is labeled and unscanned].Repeat until t is labeled [breakthrough] or until no more labels can be assigned and t is unlabeled.In the breakthrough case, go to step 2; in the latter case, stop.
(iii) Let node u be such that B (u) = y b .Let B(u) and go to Step 2 (iv).
(iv) Disconnect the subtree with y b as root from the tree with s as root.Erase all labels on the subtree with y b as root.
(v) Set all remaining labeled nodes to labeled and unscanned state; go to Step 1.
The predecessor-distance and triple-label algorithms use the same criterion as Ford-Fulkerson's procedure in the search for flow augmenting paths.Optimality of solution at termination and finiteness of the algorithms for integers capacity functions are not in question.The main computational advantage of the predecessor-distance and triple -label algorithms is that after each flow adjustment, the labels that remain valid after a flow adjustment, it requires the use of one more label than the predecessor-distance algorithm.

Application To Transportation And Assignment Problems
The transportation problem (Ford, 1962) can be stated as: The network( N,A) representation of this problem is a bipartite graph with i∈ U , j ∈V forming the two sets of nodes and arcs (i, j ) connecting each i ∈ U to each j∈V.
¢ www.ccsenet.org/jmr The dual to the transportation problem maybe stated as: The primal-dual algorithm (Florian, M., 1990) solves a sequence of restricted primal problems.Each such problem is a maximum flow problem on a subset of the extended transportation network (N * , A * ) which is formed from ( N,A) by the addition of a source s * , sink t * , arcs ( s * , i ) with c (s * , i ) =a i and arcs( j, t * ) with c( j, t * )= b j .Thus it is clear that either Algorithm 2 or 3 can be used for solving the maximum flow problems.However, since the transportation network is a special type of multi-source, muti-sink network, and alternative algorithm is computationally interesting.This algorithm (predecessor-root algorithm) is especially suitable and computationally very efficient for the assignment problem.
Definition and Notation: Let A row i with a * i > 0 is defined as a source row i.It is clear that a source node i, together with its descendant labeled nodes and the edges used to label them, forms a tree . The source rows are not connected to each other by labeling.Thus, the labeled nodes (rows and columns), together with the edges used to label them, form a forest F k = {T 1 k , T 2 k , ......., T q k }.Lemma 3: if on the k th application of the labeling process the flow augmenting path k is formed by edges from the treeT j k =(N j k , E j k )then after the flow adjustment is sufficient to discard the labels only on nodes y r ∈ N j k .The predecessor and root labels on the other labeled nodes (i.ey r ∈ q i=1 N i k , i j ) remain valid, and the nodes can be retained as labeled and unscanned nodes for the next labeling process.
Proof: The flow in any edge (y r−1 , y r ) ∈ q i=1 E i k (i j) is not change at the k th flow adjustment.Therefore at the next labeling process all nodes y r ∈ q i=1 N i k (i j) can be labeled in the same sequence again; they can therefore be retained as labeled and unscanned nodes.
Lemma 4: Suppose that at the k th breakthrough a particular column g, say, with b * g >0 and F k have been detected in the tree T j k =(N j k ,E j k )with source row i as root.If Min [a * i , e(g) ]> b * g , then the predecessor and root labels on nodes y r ∈ N j k remain valid for the next labeling process.Therefore, the labels and the status (scanned or unscanned) of all y r ∈ q j=1 N j k can be retained for the next labeling process.
Proof: All edges(y r−1 , y r ) ∈ E j k are non-binding.Therefore, each y r ∈ N j k can be labeled in the same sequence again.Furthermore, from a labeled and scanned node, no further labeling is possible.Hence the labels and status of all y r ∈ q j=1 N j k can be retained for the next labeling process.
We propose the following predecessor-root labeling algorithm, based on the results of Lemmas 3 and 4.
Algorithm 4: Predecessor-root labeling algorithm for solving the transportation problem.
Step 0: Begin with any dual feasible solution ( u*,v* ).Let x * i j = 0, for all ( i, j).At the start all i ∈U and j ∈ V are in the unlabeled state.
Step 1 (Labeling Process): Each unlabeled source row i with a * i >0 is labeled as ( j, R(i) ) where R( i) = i.Next select a labeled row, say row I, and scan it for all unlabeled columns such that c i j − u i − v j =0; label these columns as ( i, R (j) ) where R(j)= R(i).Repeat until all labeled rows have been scanned.The select labeled column, say column j, and scan it for all unlabeled rows i such that x i j >0 ; label these rows as (j, R(i)) where R(i)=R(j).Repeat until all labeled columns have been scanned.Now revert to row scanning of new labeled rows and then the column and so on.If a column l with b * l > 0 is labeled (breakthrough) go to step 2. Otherwise continue until no more labels can be assigned (non-breakthrough) and go to step 3.

Journal of Mathematics Research
February, 2010 Retain all labels and go to step 1.
(iv)Adjust flows as in Step 2 (iii) above.
i∈U j∈V Otherwise erase the labels of all labeled rows i and labeled columns j such that R(i) =R(j)=s.Go to Step 1.
Step 3 (Dual variable change): 1. Let I and J be the index set of labeled rows and columns and Where δ= min i, j Step 1 with the new dual feasible solution.
After each flow change, the labels discarded by the predecessor-root method include some labels that can be retained.If the triple -label algorithm discussed in the previous section is adopted for the primal-dual approach to the transportation problem, all valid labels after a flow change would be retained.However, the triple -label algorithm require the use of one more element in the label then the predecessor-root algorithm.
The predecessor -root algorithm specializes very well to accelerate the primal-dual method for solving the Assignment Problem (Ford, 1962).
For this problem since the a * , i s and b * , j s are equal to one, at each breakthrough, the net availability at the root of the treeT j k = (N j k ,E j k ) which contains F k , becomes zero after flow adjustment.Therefore, all the labels on nodes y r ∈ N j k have to be discarded.In the next section we present some computational results using the predecessor-root algorithm to solve the assignment Problem.

Computational Results
In this section we discuss some computational experience with the application of the predecessor-root algorithm to the transportation and assignment problems and also the triple label algorithm applied to the transportation problem.
In table 1, the mean solution times as a function of problem size is presented for comparison, the rim and cost parameters were kept identical of those tested in (Singh, 2007).Our mean solution times indicate that the modified primal-dual method is computationally as attractive as the primal method.Approximate mean solution times with the 1971 code 100 ×100 and 150×150 transportation problems reported in (Singh, 2007) are 1.9 and 4.81 seconds respectively compared to our mean solution times of 6.56 and 14.55 seconds respectively.For 100×100 transportation problems the range of solution times with our code was4.3 seconds to 8.5 seconds.In table 1, we also analyzed the breakdown of mean solution times for the transportation problems.In spite of our modifications about 70% of the mean solution time was still taken up in the labeling process.This explains why our attempts in reducing the number of labels to be discarded after each flow change had been effective in reducing the mean solution time.Since such a large proportion of the mean solution time is spent in the labeling process, any significant reduction in scanning during the labeling process would reduce the mean solution time substantially.Lemma 4 was found to be very effective in the sense.For example, in the 100×100 transportation problem it was found that out of 250 average number of breakthroughs, about 100(or about 40%) of them did not require the discarding of any labels.
We tested the effect, on the mean solution time, of the variation in range of the parameters of the transportation problem.We found that mean solution time was relatively independent of the range of the rim parameters, but dependent on the range of the cost parameters.This can be explained by the fact that for problems with a large range in the cost parameter, an initial dual feasible solution would probable not have a large number of admissible cells.Also, at each dual variable change, only a few new cells would probably become admissible.Therefore, a large number of iterations is required before optimality is attained.This fact is brought out in table 2. This suggests that for transportation problems with a large range in cost parameter, the maximum dual change rule as suggested in (Ford, L.R., 1962) may be more efficient than  gives the mean solution times, using the predecessor-root algorithm, for solving the assignment problem.The range for was maintained as integers between 0 and 50 in the order to compare with (Florian, M., 1990).For 50×50 and 100 ×100 problems, our mean solution times are 0.47 and 1.74 seconds respectively compared to 0.51 and 2.0 seconds, respectively as respectively as reported in (Florian, M., 1990).For 100 × 100 assignment problems the range of solution times with our code was 1.43 to 2.0 seconds.The computational saving was especially significant for large problems.For ¢ www.ccsenet.org/jmrthe 100×100 and 175×175 assignment problems [c i j integers in the range 0 -99] our mean solution times are 2.01 and 5.85 seconds respectively as shown in Table 3(

b).
Table 4 gives the effect, on the mean solution time, of the variation in range of the cost parameter for the assignment problem.Again we find that the number of nonbreakthrough and the mean solution times are dependent on the number of significant digits in the cost parameter.This again suggests that even for the assignment problem with a large number of significant digits in the cost parameter, the maximum dual change rule may be more efficient computationally then Ford-Fulkerson's routine C.
< Table 1 > All solution times are exclusive of input/output and based on 10 randomly generated problems, each solved by using QSB + Computer Software.The a i and b j are integers drawn from a uniform distribution between 1 and 99 and the c i j are integers drawn from a uniform distribution between 0 and 99.

< Table 2 >
Note: NBT =Nonbreakthroughs DVC = Time for Dual Variable Change MST =Mean Solution Time All solution times are exclusive of input/output and based on 10 randomly generated problems, each by using QSB + Computer Software.The parameters are integers drawn from a distribution between the ranges specified.

< Table 3(a) >
All Solution times are exclusive of input/output and based on 10 randomly generated problems, each solved on by using QSB + Computer Software.The c i j are integers drawn from a uniform distribution between 0 and 50.

< Table 3(b) >
All solution times are exclusive of input/output and based on 10 randomly generated problem, each solved by using QSB + Computer Software.The c i j re integers drawn from a uniform distribution between 0 and 99.

< Table 4 >
Note: DVC = Dual Variable Change All solution times are exclusive of input/output and based on 10 randomly generated problems each solved on by using QSB + Computer software.The c i j are integers drawn from a uniform distribution between the ranges specified.

Journal of Mathematics Research
February, 2010 tion and Minimum Cost Flow Network Problems, working Paper Series 109, center for Cybernetic Studies, the university of Texas, Austin, Texas, February 1983. Singh, Vinai K. andNimisha. (2007).An Algorithm for Labeling Network Flow Problems.Indian Journal of Mathematics andMathematical Sciences, Vol. 3, No. 2, Dec. 2007. Srinivasan, V. andG. l. Thompson. (1983) where node x b is such that P(y b ) = x b .Otherwise we have to set B(u)=B(y b ), where node u is such that B(u)= y b .
, . . . . . .., m }, set of rows i∈U x i j = b j j ∈ V = {1, 2, . . . . . .., n }, set of columns x i j ≥ 0, for all i∈ U and j∈V with i∈U a i = j∈V b j (i) Set s = R(l).Backtrack along the detected flow augmenting path F k from s to l and determine e(l) = Min [ x * i j (i, j)∈ A * k ] where A + k and A − k are as defined in section 3. (ii) If Min[e(l ), a * s ]> b * l , set e(l) and go to step 2(iii).Otherwise set e(l)= Min [e(l), a * s ] and go to Step 2

Table 1 .
. Benefit-Cost analysis of Coding Technique for the Primal Transportation algorithm.Journal of the Association for Computing machinery, No. 2. Breakthrough of Mean Solution Time for solving the Transportation Problem as a Function of Problem Size

Table 2 .
Effect on the Mean Solution Time, of the Variation in range of the Parameters of the Transportation Problem (Size 100 x100)

Table 3 (
a). Breakdown of Mean Solution Time for Solving The Assignment Problem as a Function of Problem SizeTable 3 (b).Breakthrough of Mean Solution Time for Solving the assignment Problem as a Function of Problem Size ¢ www.ccsenet.org/jmr

Table 4 .
Effect on Mean Solution Time of the Variation in Range of the Cost Parameters of the Assignment Problem (Size 100x100)