Network Simplex Algorithm associated with the Maximum Flow Problem
Sennosuke Watanabe, Hodaka Tanaka, Yoshihide Watanabe

TL;DR
This paper adapts the network simplex algorithm for maximum flow problems, demonstrating that it avoids cycling issues that cause infinite loops in the minimum cost flow context.
Contribution
It introduces a version of the network simplex algorithm tailored for maximum flow problems and proves the absence of cycling phenomena.
Findings
The algorithm successfully solves maximum flow problems.
Cycling phenomena do not occur in this adapted algorithm.
The method improves understanding of algorithmic behavior in flow problems.
Abstract
In the present paper, we apply the network simplex algorithm for solving the minimum cost flow problem, to the maximum flow problem. Then we prove that the cycling phenomenon which causes the infinite loop in the algorithm, does not occur in the network simplex algorithm associated with the maximum flow problem.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Manufacturing and Logistics Optimization · Scheduling and Optimization Algorithms
Network Simplex Algorithm
associated with the Maximum Flow Problem
Sennosuke WATANABEa, Hodaka TANAKAb, Yoshihide WATANABEc
a National Institute of Technology, Oyama College,
771 Nakakuki, Oyama, Tochigi 323-0806 Japan
b**Graduate School of Science and Engineering, Science of Environment and
Mathematical Modeling, Doshisha University, 1-3 Tatara Miyakodani,
Kyotanabe, 610-0394 Japan
c**Faculty of Science and Engineering, Department of Mathematical Sciences,
Doshisha University, 1-3 Tatara Miyakodani, Kyotanabe, 610-0394 Japan
E-mail addresses: a[email protected],
Abstract
In the present paper, we apply the network simplex algorithm for solving the minimum cost flow problem, to the maximum flow problem. Then we prove that the cycling phenomenon which causes the infinite loop in the algorithm, does not occur in the network simplex algorithm associated with the maximum flow problem.
Keywords: Network, Maximum Flow Problem, Network Simplex Algorithm, Cycling
1 Introduction
Two key optimization problems with respect to networks defined in directed graphs are the maximum flow problem (MFP) and the minimum cost flow problem (MCFP). These two problems have their own algorithms to achieve optimal solutions. It is well known that the MFP can be interpreted as a special class of the MCFP [1, 4]. Thus, the network simplex algorithm for the minimum cost flow problem can be applied to the maximum flow problem. The network simplex algorithm is known to be one of the most efficient algorithms for solving the MCFP [1, 3]. However, a serious drawback of this algorithm is the so-called cycling phenomenon, which yields an infinite loop in the updating of feasible solutions, causing the algorithm to never reach an optimal solution. Thus, preventing this cycle from occurring is an indispensable part of effectively applying the algorithm. In the present paper, we will consider the MFP as a special class of the MCFP, and solve it by applying the network simplex algorithm. We will show that the network simplex algorithm for the MFP becomes very concise and simple. Furthermore, we will also demonstrate the main result of this paper, which is that the cycling phenomenon never occurs in this application.
2 Minimum Cost Flow Problem and Maximum Flow Problem
2.1 Minimum Cost Flow Problem (MCFP)
Let be a digraph with the vertex set and edge set . As the upper and lower capacity of , we will assign non-negative integers and , respectively, to each edge satisfying the inequality . For the cost of , we will assign a positive real number to each edge . Furthermore, for the demand of , we will assign the integer to each vertex with .
The quadruple is called a network associated with the MCFP. A flow on the network is the function on satisfying the following conditions (i) and (ii):
- (i)
The capacity constraint at each edge:
[TABLE] 2. (ii)
The demand condition at each vertex:
[TABLE]
where the maps and with and for . The MCFP is the problem of finding the flow whose cost is minimal.
2.2 Maximum Flow Problem (MFP)
Let be a digraph with the vertex set and edge set . The digraph has the source and the sink , and each edge has the capacity . Then, the quadruple is called a network associated with the MFP. A flow on the network is the function on satisfying the following conditions (i) and (ii):
- (i)
The capacity constraint at each edge:
[TABLE] 2. (ii)
The flow conservation law at each vertex except for the source and the sink :
[TABLE]
It follows from the flow conservation law that
[TABLE]
where is the flow value of the flow . The MFP is the problem of finding the flow such that the flow value is the maximum.
2.3 Minimum Cost Flow Problem and Maximum Flow Problem
In this subsection, we will explain how the MFP can be interpreted as a special case of the MCFP. Let be a network on the digraph associated with the MFP, and let be the flow value of a flow on . By adding a new edge to , giving , we can define the flow network on the digraph associated with the MCFP as follows:
- (i)
for all and for and . 2. (ii)
for all .
Now, let be a function on the edge set . We will extend to the function on the edge set using . Then, is a flow on the network if and only if is a flow on the network . Furthermore, we will define the cost on using for and otherwise. Then, a flow on is the maximum flow if and only if the flow is the minimum cost flow on with respect to the cost .
3 Network Simplex Algorithm
The network simplex algorithm consists of the following 3 steps:
- (1)
Find the initial feasible tree structure. 2. (2)
Decide whether or not the given tree structure is optimal. 3. (3)
If the tree structure is not optimal, then update the tree structure and associated tress solution to improve the cost.
In the present paper, we will refer the reader to [3] for a description and use of step 1, which we do not address.
3.1 Tree Structure
We will consider the MCFP on a digraph . Let be a spanning tree of . We often identify the spanning tree and its edge set and use the same symbol for . We will divide the edge set into the disjoint union , where subsets are allowed to be empty. We can fix the triplet and define the function on the edge set as follows: First, we define the function on and using and , respectively. Then, the demand condition for the function uniquely determines the flow value on the spanning tree . Thus, we can see that the function on is uniquely determined by the triplet . Note that the function does not always become the flow on the network because it does not always satisfy the capacity constraints on . If the function uniquely determined by the triplet becomes the flow on the network, the flow is called the tree solution associated with the feasible tree structure . We call an edge free with respect to the flow on the network provided that holds. It follows directly from the definition of the tree solution that the free edge with respect to the tree solution must be contained in . However, all edges of need not be free with respect to the tree solution. A feasible tree structure is called optimal if the unique tree solution associated with the tree structure is optimal. It is well known that if the MCFP has an optimal solution, then there exists an optimal tree solution [1, 3]. The network simplex algorithm is an algorithm for solving the MCFP by updating the feasible tree structure.
3.2 Optimality Condition
Consider the MCFP on the network defined on a digraph and let be the tree solution associated with a feasible tree structure . We can determine the potential using the following procedure: Fix a base vertex , and set . For each vertex , there exists a unique undirected path from to in the spanning tree . We will define the direction of the path from to . Then, all the edges in are categorized as forward and backward edges with respect to the direction of ; the set of forward edges is denoted by and the set of backward edges by . We can define the potential using
[TABLE]
Furthermore, we can define the reduced cost in terms of the potential using
[TABLE]
Then, we have
[TABLE]
which shows that the cost and the reduced cost of the tree solution differ only by a constant independent. Thus, it is easy to see that a tree structure is optimal if and only if the reduced cost on satisfies the following condition:
[TABLE]
3.3 Network Simplex Algorithm
Algorithm 3.1**.**
Consider the MCFP on a digraph . We can obtain the optimal solution of the MCFP using the following procedures:
If the reduced cost with respect to the feasible tree structure satisfies optimality condition (3.4), then the tree solution associated with the tree structure is the optimal solution of the MCFP. Otherwise go to the next step. 2. 2.
Choose some satisfying either
- (i)
or 2. (ii)
.
We call this edge the entering edge. Then, the edge set contains the unique circuit . We can determine the orientation of as the direction of the entering edge if , and as the opposite direction of if . 3. 3.
Augment the flow along the circuit until either
- (i)
one of the forward edges in reaches its upper capacity or 2. (ii)
one of the backward edge in reaches its lower capacity.
Choose an edge in that reaches the upper or lower capacity and call the leaving edge. 4. 4.
Update the new tree structure as follows:
[TABLE]
Compute the potential of and the reduced cost . Go to Step 1.
4 Network Simplex Algorithm associated with the Maximum Flow Problem
In this section, we will apply the network simplex algorithm to the MFP.
4.1 Pseudo Tree Structure
We will consider the MFP on a network with the digraph . Let and be trees of satisfying
[TABLE]
We will express the union of and as . Furthermore, we will divide the edge set into the disjoint union . We can fix the triplet and define the function on the edge set as follows: Define the function on and using and . Then, the values of the function on are uniquely determined by the conservation law. Thus, we see that the function on is uniquely determined by the triplet . If this function becomes the flow on the network, it is called the tree solution associated with the feasible pseudo tree structure .
4.2 Initial Feasible Pseudo Tree Structure
Let . Consider a pseudo tree structure with and . Then the function which is uniquely determined by becomes the zero flow on the network . We can take the zero flow as the initial tree solution associated with the initial feasible pseudo tree structure .
4.3 Optimality Condition
Consider the MFP on the network with the digraph and let be the tree solution associated with a feasible pseudo tree structure . We will define sets of edges and as
[TABLE]
Then the optimality condition of the tree structure is given as follows:
Lemma 4.1**.**
The tree solution associated with a feasible pseudo tree structure is optimal if and only if sets of edges and are empty sets, that is, and .
proof**.**
The tree solution associated with a pseudo tree structure on the network associated with the MFP accords with a tree solution associated with the tree structure on the network associated with MCFP. Thus, we only have to prove that the edge set given in (3.4) that obstruct the optimality of the solution coincides with the edge set of Lemma 4.1. We will choose an arbitrary feasible pseudo tree structure on the network associated with the MFP. We will divide the edge set into six subsets:
[TABLE]
First, we will prove that the edges in or do not satisfy optimality condition (3.4). To compute the potential , we will take the sink vertex as the base vertex and set .
(1-i)
For we have and for , we have and for . Since and for , we can compute and for . Thus, for all , which shows that does not satisfy optimality condition (3.4) (cf. Figure 1).
(1-ii)
It follows from the assumption on the MFP that there are no edges with tail . We have for and for . Since for all , we can see that (cf. Figure 1), which shows that does not satisfy optimality condition (3.4).
Next, we will prove that edges in and satisfy optimality condition (3.4).
(2-i)
Since and for , we can compute (cf. Figure 2), which shows that satisfies optimality condition (3.4).
(2-ii)
If , we have and for . Therefore, we compute (cf. Figure 2), which shows that satisfies optimality condition (3.4). If , we have and . Therefore, we compute (cf. Figure 2), which shows that satisfies the optimality condition (3.4).
(2-iii)
It follows from the assumption on the MFP that there are no edges with head or edges with tail . Thus, for and for . Furthermore, for . Therefore, we can compute (cf. Figure 3), which shows that satisfies optimality condition (3.4).
(2-iv)
We have for . Furthermore, for , we have and , and and . Therefore, we can compute the reduced cost for both cases and (cf. Figure 3), which shows that satisfies optimality condition (3.4).
Thus, we have completed the proof of Lemma 4.1. ∎
4.4 Network Simplex Algorithm associated
the Maximum Flow Problem
Consider the MFP on the network on the digraph . We can describe the network simplex algorithm for MFP as follows.
Algorithm 4.2**.**
Step 0: Choose arbitrary trees and satisfying
[TABLE]
Define the initial pseudo tree structure as , and . Take the zero flow as the initial tree solution associated with the tree structure .
Step 1: If the pseudo tree structure satisfies , then the tree solution associated with is optimal. Else go to step 2.
Step 2: Chose an edge and attach to . Then, there is the unique - path in . Determine the orientation of the path as the direction of if and as the opposite direction of if . Augment until at least one of the forward edges of reaches its upper capacity or one of the backward edge reaches its lower capacity, and choose one edge that is saturated by the above augmentation of the flow.
Step 3: Update the new pseudo tree structure as follows:
[TABLE]
Go to Step 1.
5 Main Result - no cycling phenomenon
The network simplex algorithm 3.1 for the MCFP does not necessarily terminate in a finite number of iterations. This inconvenience is caused by the degeneracy of the tree structure. If the spanning tree in the tree structure contains non-free edges, then the tree structure is called degenerate. In this case, a proper augmentation along the circuit determined in Step 2 of algorithm 3.1 may be impossible. In such a case only the feasible tree structure is updated and the tree solution associated with the tree structure is not updated. In this case, we may return to the same tree structure after a number of iterations without updating the tree solution. This phenomenon is known as cycling. It is known that this cycling can be prevented by choosing the leaving edge appropriately, for example, by applying the so-called rule of the last blocking edge or the rule of the first blocking edge [3, 5]. In the present paper, we will prove that the cycling phenomenon never occurs in the network simplex algorithm for the maximum flow problem.
Theorem 5.1**.**
The cycling phenomenon never occurs in the network simplex algorithm for the maximum flow problem.
proof**.**
We assume on the contrary that the cycling occurs and prove that this leads to a contradiction. We will start with some pseudo tree structure , and return to the original pseudo structure without updating the flow value after a finite number of iterations. Let and be the corresponding trees associated with the pseudo tree structure . We assume that there exists an edge that leaves the tree and later re-enters the tree. We call such an edge a leaving-entering edge. We will prove that the existence of leaving-entering edge gives rise to a contradiction.
First, we will consider the case where the leaving-entering edge is in . If we consider the tree as an undirected graph, there exists a unique path in between the source vertex and an arbitrary vertex such that the vertices in can be layered as , where and is the set of vertices such that the length of the unique path from in is . Also, we define the set of edges using , where we set
[TABLE]
We assume and that is taken as a minimum. Since the edge leaves from , we can see that if or if . It follows from the minimality of that and . For the edge to re-enter , we must have either if or if . In both cases, we have , which contradicts the assumption . We can also consider the assumption that there exists a leaving-entering edge , which similarly leads to a contradiction. Thus, the proof of the main theorem is complete. ∎
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] K. Ahuja, L. Magnanti and B. Orlin: NETWORK FLOWS , Prentice-Hall, New Jersey, 1993.
- 2[2] A. Bachem and W. Kern: Linear Programming Duality , Springer Verlag, Berlin Heidelberg, 1992.
- 3[3] D. Jungnickel: Graphs, Networks and Algorithm , Second Edition, Springer Verlag, Berlin Heidelberg, 2005.
- 4[4] B. Korte and J. Vygen: Combinatorial Optimization , Second Edition, Springer Verlag, 2001.
- 5[5] S. Yoneda, S. Watanabe and Y. Watanabe: A New Rule for Preventing the Cycling in the Network Simplex Algorithm , The Science and Engineering Review of Doshisha University, Science and Engineering Research Institute of Doshisha University, Vol.53 No.1, pp.54-57, 2012 (in Japanese).
