Dual Based Procedures for Un-Capacitated Minimum Cost Flow Problem


In this article, we devise two dual based methods for obtaining very good solution to a single stage un-capacitated minimum cost flow problem. These methods are an improvement to the methods already developed by Sharma and Saxena [1]. We further develop a method to extract a very good primal solution from a given dual solution. We later demonstrate the efficacies and the significance of these methods on 150 random problems.

Share and Cite:

Sinha, P. and Sharma, R. (2016) Dual Based Procedures for Un-Capacitated Minimum Cost Flow Problem. American Journal of Operations Research, 6, 468-479. doi: 10.4236/ajor.2016.66043.

1. Introduction

Un-capacitated min cost flow problem is a special case of min cost flow problem in which arc capacities are assumed to be infinite. Weintraub [2] developed a variant of negative cycle algorithm which searched for the most negative cycle and subsequently introduced it into the feasible flow at each iteration. Later a strongly polynomial time algorithm for min cost flow was developed by Tardos [3] with a computational complexity of O(m4). Enhanced capacity scaling algorithm can be used to solve Transshipment problem with computational complexity of O(n log (n) S(n,m)) (Ahuja et al. [4] ). Tardos [3] developed cost scaling algorithm with the computational complexity of O(n3 log n). In this algorithm, dual optimality conditions are relaxed to form e-optimality conditions. Thus the best primal based methods solve un-capacitated min cost flow problem in O(n3 log (n)). Recently Juman [5] has presented a heuristic with O(n3) running time to solve un-capacitated transportation problem, and is shown to perform better than VAM.

Successive shortest path algorithm was developed by Busakar and Gowan [6] . This algorithm maintains dual feasibility at each step and iteratively achieves primal feasibility. Edmonds and Karp [7] proposed the first polynomial time algorithm by modifying the method to calculate shortest paths, to solve min cost flow problem with computational complexity of O((n + m) log U). Dual simplex for network flow was first analyzed by Hegason and Kennington [8] . Plotkin and Tardos [3] improved the pivoting strategy with (m2 log n) bound over the pivoting strategy proposed by Orlin [9] . This improves the number of pivot steps required in dual simplex algorithm. This algorithm runs in O(m3 log(n)) time. Ali et al. [10] have demonstrated that an efficient execution of each pivot in dual based algorithm requires less iterations as compared to primal based algorithms. This holds true even for the re-optimization process. However, computational effort required per pivot may be higher. Sharma and Sharma [11] have given a new dual based procedure that has obtained solutions within 85% of the optimal.

Sharma and Saxena [1] have posed the transshipment problem differently. We use the formulation proposed by Sharma and Saxena [1] . We then modify the dual based methods developed by them to obtain better solutions with the same complexity of O(n2) and O(n3) respectively. We further devise a method to obtain a good primal solution from the dual solutions already obtained. Empirical results on the random 150 problems are given in Appendix 1.

2. Problem Formulation

We next present the mathematical formulation of the primal problem and dual problem respectively.

2.1. Constants of Problem

refers to the demand at the kth demand node, while is the demand at market k

as a fraction of total market demand. Hence we have and, where K is the total number of demand nodes. Similarly refers to units available for transportation at the source node i and. If the problem is balanced, then we have, I is the total number of supply nodes. J is total number of

transshipment nodes. and is the cost of transporting units from node to j and j to k respectively.

2.2. Decision Variables

and is the number of units transported from node i to node j and j to k respectively. We also have and.

2.3. Primal (P)






In this formulation we assume flows only in the forward direction. Equation (1) ensures that entire supply is transported to meet the demand, which is valid for the balanced problem. Equation (2) ensures that the total demand is met by the supply. Equations (3) and (4) ensure that individual supply and demand constraints are satisfied, while Equation (4) ensures that no inventory is built at any transshipment node.

2.4. Dual of the Problem (DP)

In this section we present the dual of the problem P. We associate as the dual variables corresponding to (1), (2), (3), (4), (5) respectively. We first state the dual of the problem as DP and then divide it into two parts as DP-source and DP-sink for computational simplicity.




, Unrestricted in sign



, and unrestricted in sign.



, and unrestricted in sign.

3. Few Theoretical Results

We start with development of the heuristic for the dual solution, and then move on to develop the heuristic for the primal. Computational attractiveness of these results will be demonstrated in the later sections through empirical testing. Well known dual based approaches (Orlin [9] , Plotkin and Tardos [3] and Ali et al. [10] ) can be used for our solution to get an advanced start while solving the transshipment problem. We begin by defining the set SPS which is as under-

SPS = {SPik:SPik is the shortest path between i and k}.

Problem (TP)




Theorem 1: Optimal solution of problem TP is equal to optimal solution to problem P.

Proof: Since upper value of the flow is unbounded, hence optimal flow for a pair of source node and sink node will be on SPik. This ensures that any further reduction in the objective value is not possible. Therefore problem TP gives the optimal solution to problem P. Hence proved.

4. Solution Procedure

4.1. Heuristic to Solve Dual of the Problem (H1)

DP-source and DP-sink are equivalent in structure to DRP1 in Sharma and Murlidhar [12] . Sharma and Murlidhar [12] have given an efficient algorithm to solve DRP1 which can be modified to solve DP-source and DP-sink.

Step 1. DP-source and DP-sink can be rewritten as under



, and unrestricted in sign.



, and unrestricted in sign.

Step 2. Find and " all i, j, k and and remove all the redundant constraints in DP-source and DP-sink (Equations (8) and (9)). In case of tie, only one equation is retained while others are eliminated. This reduces the DP-source and DP-sink to the following form:







and represent the least cost transportation route between source and transshipment node and transshipment node and sink respectively.

Step 3. We sort the values of in an increasing order and re-index such that

Step 4. Since and, we let, , and. Solution to the problem is given by

We repeat the whole procedure for different increases in values of Wj " all j and retain the best solution.

It may be noted that when we increase/decrease the value of Wj " j, DP-source increases while DP-sink decreases as per the structure of DP-source and DP-sink. Actually all four possibilities are there for a general case. Our algorithm here intends to balance value of Wj for the best trade-off possible.

Result 1: Computational complexity of A1 is O(n2).

Proof: Complexity of algorithm is dominated by step 2 which can be solved in O(n2) time.

4.2. Heuristic to Solve Dual of the Problem (H2)

In the previous algorithm, we tinkered with value of along. There is no reason as to why we should not tinker with the values of along. and are achieved simultaneously along in this method. and are defined as source slack and sink slack respectively in the later sections. Next we describe this heuristic in detail.

Step 0: Set Wj = 0 ∀ j = 1, …, J.

Step 1: Compute max_value of DP_source and DP_sink, set current_best_DP = objective function value of (DP source + DP-sink), set j = 0.

Step 2: j = j + 1; if j > J then stop or else go to step 3.

Step 3: Increase value of Wj in steps and compute for each value of Wj: max_value of DP-source and DP-sink.

Step 4: Set current_DP = objective function value of (DP-source + DP-sink).

If current_DP > current_best_DP then current_best_DP = current_DP go to step 3, else go to step 2.

Result 2: Heuristic 2 runs in O(n3) time.

Proof: Complexity of the step is heuristic is dominated by step 3 which can be completed in O(n3) steps.

4.3. Development of the Heuristic to Obtain a Good Primal Solution (H3)

In this section we will develop a primal heuristic by utilizing the complimentary slackness condition. This heuristic extracts a good primal solution from a good dual solution by utilizing complimentary slackness condition. Let us denote the solution of DP by

Vsso, Vssi, ,. We further define lj, and lk, as and where and . Slack Sso and Ssi is defined as following:

and. If Sso = 0 and Ssi = 0, then and. Xij and Xjk can assume a positive value if for the corresponding i and k, we have and. According to the complimentary slackness condition, Xij = 0 and Xjk = 0 when and. Let Sso and Ssi be the source and

sink slacks respectively, and DNik = SPik × Xik. DNik is

then referred to as deviation number. If SPik = 0, then we can send a positive flow along this arc without violating the Complimentary slackness property. However if SPik > 0, then flow along this has to be zero if complimentary slackness property is not to be violated. As we are working with good dual solution (and not optimal dual solution), we may have to send positive flow along a path (i,k) even if SPik > 0. But the heuristic so described tries to minimize DNik and hence keep complementary slackness violations as low as possible to get good primal solution. If at the end of execution of algorithm DN = 0, then we have the optimal primal solution. In this way DNik is similar to Kilter number (ref OUT-OF-KILTER algorithm (a primal dual approach) [13] for solving general min-cost-flow problem).

We find shortest path from every source node ‘i’ to every sink node ‘k’ using these slacks as weights, and then make the allocations according to shortest path available. Detailed heuristic is described as under.

Step 0: Xij = Xjk = 0, Si1k1 = 0 "all i, j and k.

Step 1: Compute Sik = Sso + Ssi "all j and particular i and k.


And Sik = Sso + Ssi "j’ ¹ j for the same i, k.

If Sik’ < Sik then Si1k1 = Sik, Repeat the step "i, j and k.

Step 2: Find i and k: dk > 0 and bi > 0.

If Si1k1 < Si2k2: i1 ¹ i2 or k1 ¹ k "all i and k then Xij = Xjk = Si1k1 = min(bi, dk) = a*, bi = bi − a*, dk = dk − a*.

Step 3: Stop.

Result 3: Heuristic H2 runs in O(n2) time.

Proof: Complexity is dominated by the step 1 which is sorting and can be solved in O(n2).

5. Results and Discussion

We have solved 150 random problems of varying sizes using methods proposed in this article and the ones developed by Sharma and Saxena [1] . We performed one tail paired-test and F-test on the results. Results of paired t-test are as follows. In terms of duality gap, Subroutine S3(O(n3)) performs better than subroutine S2(O(n2)) with the statistical significance of 0.00722 (p-value) in Sharma and saxena [1] . Similarly in terms of duality gap, H2(O(n3)) in this paper performs better than H1(O(n2)) with a statistical significance of 0.000419 (p-value). H2(O(n3)) in this article performs better than S3(O(n2)) form Sharma and saxena [1] with a statistical significance of 2.94E−15. For F-test, F-statistic was calculated to be 58.31 as against the f-critical value of 2.62. P-value was calculated to be 4.05E−32. In terms of computational time, no significant difference is registered between these methods, however methods in this paper perform slightly better than those proposed in Sharma and saxena [1] . This is largely due to the fact that we calculate shortest path between the source nodes and sink nodes in contrast to shortest path individually between source and transshipment nodes and transshipment nodes and sink nodes respectively. This method is better computationally.

6. Conclusion

In this work we have developed computationally efficient dual based method to achieve good solution to un-capacitated transshipment problem. As stated earlier, available primal and dual based approaches are capable of solving un-capacitated transshipment problem in O(n3 log(n)) and O(m3 log(n)) time respectively. Computational complexities of H1, H2 and H3 are O(n2), O(n3) and O(n2) respectively. Later we intend to extend this work to General Minimum Cost Flow Problem which would have additional capacity constraints on the arcs.

Appendix 1

Results of 150 Problems.

Conflicts of Interest

The authors declare no conflicts of interest.


[1] Sharma, R.R.K. and Saxena, A. (2002) Dual Based Procedures for the Special Case of Transshipment Problem. Operation Research, 39, 177-188.
[2] Weintraub, A. (1974) A Primal Algorithm to Solve Network Flow Problems with Convex Costs. Management Science, 21, 87-97.
[3] Plotkin, S.A. and Tardos, E. (1990) Improved Dual Network Simplex. Proceedings of the 1st Annual ACM-SIAM Symposium on Discrete Algorithms, Society for Industrial and Applied Mathematics, San Francisco, 22-24 January 1990, 367-376.
[4] Ahuja, R.K. (1993) Network Flows. PhD Thesis, Technische Hochshule Darmstadt, Darmstadt.
[5] Juman, Z.A.M.S. and Hoque, M.A. (2015) An Efficient Heuristic to Obtain a Better Initial Feasible Solution to the Transportation Problem. Applied Soft Computing, 34, 813-826.
[6] Busaker, R.G. and Gowen, P.J. (1961) A Procedure for determining Minimal-Cost Flow Network Patterns. Tech. Rep. ORO-15, Operational Research Office, Johns Hopkins University, Baltimore.
[7] Edmonds, J. and Karp, R.M. (1972) Theoretical Improvements in Algorithmic Efficiency for Network Flow Problems. Association for Computing Machinery Journal, 19, 248-264.
[8] Helgason, R.V. and Kennington, J.L. (1977) An Efficient Procedure for Implementing a Dual Simplex Network Flow Algorithm. AIIE Transactions, 9, 63-68.
[9] Orlin, J.B. (1984) Genuinely Polynomial Simplex and Non-Simplex Algorithms for Minimum Cost Problems. Technical Report 1615-84, Sloan School of Management, MIT, Cambridge, MA.
[10] Ali, A.I., Padman, R. and Thiagarajan, H. (1989) Dual Algorithms for Pure Network Problems. Operations Research, 37, 159-171.
[11] Sharma, R.R.K. and Sharma, K.D. (2000) A New Dual Based Procedure for the Transportation Problem. European Journal of Operational Research, 122, 611-624.
[12] Sharma, R.R.K. and Muralidhar, A. (2009) A New Formulation and Relaxation of the Simple Plant Location Problem. Asia-Pacific Journal of Operational Research, 26, 1-11.
[13] Clasen, R.J. (1968) The Numerical Solution of Network Problems Using the Out-of-Kilter Algorithm. No. RM-5456-PR. RAND CORP Santa Monica.

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.