488
IEEE TRANSACTIONS ON RELIABILITY, VOL. 56, NO. 3, SEPTEMBER 2007
A Simple Heuristic Algorithm for Generating All Minimal Paths Wei-Chang Yeh, Member, IEEE
Abstract—Evaluating network reliability is an important topic in the planning, designing, and control of network systems. In this paper, an intuitive heuristic algorithm is developed to find all minimal paths (MP) by adding a path, or an edge into a network repeatedly until the network is equal to the original network. The proposed heuristic algorithm is easier to understand & implement than the existing known heuristic algorithm. Without generating any duplicate MP, it is also more efficient. The correctness of the proposed algorithm will be analysed, and proven. One bench example is illustrated to show how to evaluate the network reliability using the proposed heuristic algorithm.
Fig. 1. An example network.
Index Terms—Heuristic algorithm, minimal cut, minimal path, network reliability. Fig. 2. An initial network of Fig. 1.
MC/MP
ACRONYM1 Minimal Cut/Minimal Path NOTATION The original network which is a connected, undirected network with the node set , and the edge set , respectively. For example, Fig. 1 is a connected undirected network. , is the specified source node, and sink node, respectively. The number of elements of , e.g., is the number of nodes in . ,if ,if
and or
Fig. 3. The network
,
where for all , , and . The th updated network, where . If , is called an initial network created by constructing node-disjoint MP in , i.e. the intersection of any two MP are only nodes , and . For example, Fig. 2 is one of the initial w.r.t. Figs. 1 networks w.r.t. Figs. 1 and 3 is and 2. the nodes in the nodes in . Manuscript received Dec. 6, 2005; revised May 1, 2006; accepted May 14, 2006. This research was supported in part by the National Science Council of Taiwan, R.O.C., under Grant NSC 92-2213-E-035-041. Associate Editor: L. Cui. The author is with the e-Integration & Collaboration Laboratory, Department of Industrial Engineering and Management Engineering, National Tsing Hua University, Hsinchu, Taiwan 300, R.O.C. (e-mail:
[email protected]). Color versions of one or more of the figures in this paper are available online at http://ieeexplore.ieee.org. Digital Object Identifier 10.1109/TR.2007.903290 1The
singular and plural of an acronym are always spelled the same. 0018-9529/$25.00 © 2007 IEEE
G
w.r.t. Figs. 1 and 2.
the edges in the edges in . the nodes (edges) in if . The th MP. It is represented either by an edge set, or by an ordered node list. For example, is a MP in Fig. 1. a path or an edge from nodes to with , and if is the updated graph after inserting into . For example, Fig. 3 is the updated network after inserting into Fig. 2. is the order of the path added into to generate . If such path is , then . Note that whenever . For example, where is an new MP generated in in Fig. 3. The th path inserted into the initial network, . For example, in where Fig. 3. The set of all MP. and for , is the set of all new MP generated e.g. . Note that is a special MP subset in s.t. any two MP in have generated in no common nodes, except nodes & , e.g. in Fig. 2.
YEH: HEURISTIC ALGORITHM FOR GENERATING ALL MINIMAL PATHS
, e.g. . Note that
is the MP set generated in . is the updated network after inserting in . The subpath from nodes to in the path . if for all with ; otherwise, . for all and . for all and . for all and . for all and . . and . node and node .
Reliability MP/MC
Original Network
Initial Network
Updated Network Duplicate MP
NOMENCLATURE The probability of connection of the source node with the sink node . Minimal path/minimal cut, a path/cut set such that if any edge is removed from this path/cut set, then the remaining set is no longer a path/cut set. For example, is a MP between nodes , and in Fig. 1. The MP/MC search is tied to the Graph Theory concepts, and connectivity measures. Probabilistic techniques usually associate the connectivity level of a network with the availability, and/or reliability of the communication paths between specific network node-pairs [10]–[19]. which is required to A network find the exact reliability between nodes , and . A special network created by constructing disjoint MP in the original s.t. the intersection of network any two MP are only nodes , and . A new network created by inserting a path into the current network. is a duplicate MP iff there is an with s.t. . MP
ASSUMPTIONS The network must satisfy the following assumptions [10]–[19]: 1) Each node is perfectly reliable, and each edge has two states: working, or failed. 2) The network is connected, and free of self-loops. 3) There are no parallel branches.
489
4) Degrees of all nodes are at least 2, except for the source , node , and sink node . If there is a node, say with only one degree, the edge adjacent to node can be removed without losing any MP, i.e. each node is passed through by at least a MP. 5) All flows in the network obey the conservation law. I. INTRODUCTION HE network reliability is defined here as the probability of a live connection between the source node, and the sink node. In recent years, network reliability theory has been applied extensively in many real-world systems such as computer and communication systems, power transmission and distribution systems, transportation systems, oil/gas production systems [1]–[7], etc. Thus, the network reliability plays important roles in our modern society; and more authors have been paying attention to the network reliability problem [1]–[27]. The evaluation of network reliability is an NP-hard problem [8], [9]. Reliability evaluation approaches exploit a variety of tools for system modeling, and reliability index calculation. Among the most popular tools are network-based algorithms founded in terms of either MC or MP [10]–[19]. However, both the problems in locating all MC/MP, and computing the exact reliability in terms of the known MC/MP, are also NP-hard [8], [9]. A variety of methods for generating MP have been proposed, which are all based on direct (explicit, and implicit) enumeration by deriving necessary, and sufficient conditions using Boolean algebra, and/or set theory. To the author’s best knowledge, Al-Ghanim first investigated a heuristic programming algorithm to generate all MP [10]. He first created a path, then used an iterative method by tracing back from an explored node in the current path via unexplored nodes to the source node, and swapped the sub-paths in the corresponding MP to generate new MP [10]. The above procedure is repeated until all MP are found. It is very hard to follow Al-Ghanim’s whole algorithm. It is less efficient, and produced duplicate MP, which needed extensive comparison, and verification. It also worked only for the directed network (graph); i.e. may have failed to search for all MP in the undirected network. In real cases, many networks such as computer, and telecommunications systems are all undirected. The worst part is that there is not any proof for the correctness of this algorithm. The need for a more intuitive heuristic algorithm to search for all MP thus arises. There is generally a need to evaluate only a few of the modifications in an existing network for expansion or reinforcement without relocating all MP or MC [11]–[14]. Such problems have been solved recently for MP [11], [12], and MC [13], [14], separately. Based on the important result from our previous published paper [11], to search for all MP in a new network using the MP obtained in the network before adding a path, a new heuristic algorithm is proposed to search for all new MP by adding repeatedly a new path (arc) to a network until the original network (see Fig. 1) is formed completely. It adapted some simple rules to prevent & detect/delete generating duplicate MP efficiently without determining whether a path is a MP.
T
490
IEEE TRANSACTIONS ON RELIABILITY, VOL. 56, NO. 3, SEPTEMBER 2007
This paper is organized as follows. Some important properties, and theorems are discussed in Section II. Section III discusses how to eliminate duplicate MP using both prevention, and detection/deletion. Section IV presents the proposed method in detail, together with a discussion of the time complexity. One bench example is illustrated to show how to generate all of the MP using the proposed heuristic algorithm in Section V. Concluding remarks are in Section VI. II. PRELIMINARIES AND FINDING NEW MP The main concepts behind the existing heuristic algorithm [10], and the proposed algorithm to search for all MP are: in , 1) Construct the initial network , find the MP set . and let in the updated network 2) Find the new MP set , where , and ; let , and . 3) Repeat the above Procedure 2 until the current network is equal to the original network . Obviously, the above Procedure 2 is the most important in the existing heuristic algorithms. Therefore, some properties , , , and MP are listed about the relationship among as follows. are true. Property 1: The following statements regarding
Property 2: The following statements regarding
are true.
Adding a path or an edge, say , between two nodes can only increase the number of MP. Hence, any MP is also an MP in the current network. Thus, we will focus on after inserting how to find the new MP in the network after inserting a new path, and eliminate duplicate MP. A special property is considered first, which simply follows immediately from the definitions of , , , and mentioned in Section I; the four sets: all of the MP passed through node , and/or can be separated into four disjoint subsets as in Property 5. , , , Property 5: The intersection of any two of are empty. and From Property 5, we have the following corollaries. These corollaries are trivial but very useful in the discussion to eliminate the duplicate MP. , Corollary 1: The intersection of any two of , , and are empty. , Corollary 2: The intersection of any two of , , and are empty. Corollary 3: . . Corollary 4: Corollary 5: . To compare the proposed algorithm with the best-known heuristic method presented in [10], the main calculation procedure, i.e. procedure 2, of the best-known heuristic method for finding new MP is listed by transforming into our notation. Theorem 1: is the set of all new MP in . Corollary 6: The maximal number of new MP obtained in , using Theorem 1, is . Corollary 7:
for all
for all Property 3: The following statements are equivalent. is a new MP generated in
is the set of all new MP in the directed network . Theorem 1 is a straightforward method. Without using the special characteristics discussed in Corollaries 1-5, it is less efficient, and generates duplicate MP. The following theorem is first proposed in [11]. Originally, it is proposed only to find all after adding a new path into . It is new MP in adapted here to find all MP in . Theorem 2: If , then let node be node . Otherwise, let
be a node in
, then let node be a node in and Property 4: Let ments are true.
If If
for all , and
if
, and
. If be node . Otherwise, let node . Let
; otherwise, let . Then,
. The following state-
then then
are all new MP in [11]. Theorem 2 is extended in this study to find all MP. Moreover, it is improved repeatedly to eliminate duplicate MP to increase its efficiency. Before that, a special characteristic of MP set is discussed as follows.
YEH: HEURISTIC ALGORITHM FOR GENERATING ALL MINIMAL PATHS
491
Theorem 3: (Menger’s Theorem) The maximum number of equals the size of a minimum cut edge-disjoint MP in between nodes , and . is the set of node-disjoint MP obtained in by the definition. From the above special case of the Max-Flow Min-Cut thecan be obtained in polynomial time. Besides, the orem [27], is nodes , and ; we have the intersection of any two MP in following property shown that there is no need to verify which is a duplicate. one MP in Property 6: is the set of all new MP in without any duplicate MP. Corollary 8: is the set of all new MP in the directed network without any duplicate MP. , then , Corollary 9: If . and In the assumption, the degrees of all nodes are at least 2, except for the source node , and sink node . Hence, both , and are not empty if is an undirected network, or at least one of
, and
is not empty if is a directed network. Based on the above discussion, a special case of Theorem 2 is listed next. This new theorem plays an important, fundamental role in the proposed heuristic algorithm. It provides the basis of the proposed algorithm, and is simplified furthermore to eliminate duplicate MP in the next section. Theorem 4: is the set of all new MP in . Corollary 10: The maximal number of new generated MP obtained in using Theorem 4 is . Corollary 11:
Fig. 4. The updated network
G
w.r.t. Fig. 3.
To verify whether a new generated MP is a duplicate, we can simply compare this MP with the other old MP. The following corollary follows immediately from Property 2e. It states a different, easy way to verify a new MP only by comparing each new MP with the other new generated MP. Thus, we can search for duplicate MP in some relatively small scope instead of searching over the whole MP list. is not a duplicate MP iff for all Corollary 12: , and . The new generated MP number also grows exponentially with network size. Therefore, some more efficient methods to eliminate duplicate MP are proposed next. Directly from Corollaries 1–5, and Theorem 4, duplicate MP are generated only in the is the path added to the current following three situations if . network Situation 1: . Situation 2: . Situation 3: ,
, , and/or
. For example, and
, , , are all MP in Fig. 3, i.e. . If Theorem 4 is employed to find all new MP in Fig. 4, which is created by adding edge , i.e. with , and , into Fig. 3; then we have
is the set of all new MP in the directed network . Because , Theorem 4 is more efficient than Theorem 1 in finding new generated MP in from Corollaries 6, and 10. However, each new generated MP still may have duplicates due to the fact that the intersection , , , , of any two of , , , and may not be empty. The theorems, and properties in the next section are presented to eliminate the duplicate MP.
and
where III. ELIMINATE DUPLICATE MP The time complexities to generate new MP in each updated network are directly proportional to the number of old MP from Corollaries 6, and 10. Because the number of MP grows exponentially with network size, and many MP may have duplicates, it is necessary to eliminate duplicate MP before calculating the network reliability at the final stage.
, , , , and . From above, it is trivial that is a new MP generated from , and , both i.e. belong to Situation 1. is a new MP generated from , i.e. belong to Situation 3.
492
IEEE TRANSACTIONS ON RELIABILITY, VOL. 56, NO. 3, SEPTEMBER 2007
To prevent any duplicate MP before it is generated from Situ” is proposed to replace “ ” ations 1 & 2, a new notation “ ): iff (which is defined in [11] using notation , , and . ” are true. The following two properties regarding to “ Property 7: . if . Corollary 13: , then , and Corollary 14: If . , Property 8: The intersection of any two of ,
,
,
,
are empty. From Theorem 4, and Property 9, to prevent any duplicate MP generated from Situation 3, avoid duplicate elements occurring , , , , , and as is in discussed in the next property. Property 10: No duplicate MP in ,
and
,
,
and
. From Property 10, Theorem 4 is revised s.t. no new duplicate MP is included, as follows. Theorem 5: is the set of all new MP in without any duplicate MP. Corollary 15: is the set of all new MP in the directed network without any duplicate MP. iff Corollary 16: ,
, and , then
Corollary 17: If , where iff
.
,
. All new MP generated in plication” combinations of for all generated in
, and . STEP 8. Implement Theorem 5 to find the new MP set generated in , let , , and go to STEP 3.
.
Corollary 18: Let
, AND P
Algorithm: Find all MP in a network . with node Input: A connected undirected graph set , edge set , a source node , and a sink node . Output: All MP in . , , and . STEP 0. Let STEP 1. If there is a MP, say , in , then , go to STEP 2. Otherwise, let , and go to STEP 3. , , , STEP 2. Let and go to STEP 1. STEP 3. If , then halt, and is the MP . set in STEP 4. Choose a new path, say in , s.t. ; and let , and . STEP 5. Separate all MP in that pass through nodes , , , , and . and/or into STEP 6. If , implement Property 6 to find the new generated in , let , , and MP set go to STEP 3. , , , STEP 7. Find
,
,
, where .
,P
this theorem, its time complexity is equal to Theorem 2. However, no duplicate MP is generated. The proposed heuristic algorithm is based on the above theorem. It will be proposed to enumerate all MP. Greater detail is stated as follows.
,
, if no duplicate element in ,
TABLE I THE CORRESPONDING b , P ,P
,
, and are empty. From Corollaries 1-5, and Property 8, we have the following property which can prevent any duplicate MP generated from Situations 1 & 2 discussed above. Property 9: The intersection of any two of , , , and/or
,
Fig. 5. The corresponding sub-networks. (a) The 1st MP in Fig. 1. (b) The 2nd MP in Fig. 1. (c) The arcs (shown in dashed line) need to added back after step 3.
, and are obtained using the “multi, , , , and/or for .
IV. THE PROPOSED ALGORITHM Based on the discussion in Sections II & III, Theorem 5 provides an easy way to eliminate new generated duplicate MP. In
In the above algorithm, the disjoint MP, and the initial network is constructed in steps 1–3. Step 4 inserts a new which is selected arbitrarily from nodes to in the path original network, but not in the current network, and updates the current network. Step 5 separates all generated MP passed into , , , and . Step at least one endpoint of . 6 is based on Property 6 to find all new MP generated in , , , , , and
are found in Step 7 for all
. The last step
YEH: HEURISTIC ALGORITHM FOR GENERATING ALL MINIMAL PATHS
THE CORRESPONDING b
493
TABLE II ,P ,5
finds all new MP by Theorem 5 using the result obtained in Step 7. Steps 3–8 are repeatedly inserting a new path, updating the current network until the original graph is completely formed. , and The number of arcs in a MP is not greater than not less than the number of nodes in any shortest path. , and the time Hence, complexity is to find all is the number of arcs in the shortest MP [10], where path. The proposed algorithm is based on paths instead of arcs. Thus, the time complexity of the proposed paper is , where is the last is the total number of the value of in STEP 3, and set of all endpoints in the paths found in STEP 4. Because , and , the proposed algorithm is more efficient than the existing known algorithm proposed in [10]. From the above discussions, we have the following statement immediately. Theorem 6: The proposed heuristic algorithm is more efficient than the existing known algorithm proposed in [10] for locating all MP in a network without any duplicate in time complexity , where is the is the total number of the set last value of in STEP 3, and of all endpoints in the paths found in STEP 4 of the proposed algorithm.
(P ), AND 5 (P )
THE CORRESPONDING b
TABLE III ,P ,5
(P ), AND 5 (P )
STEP 1. Because a MP in STEP 2. Let
(see Fig. 5(a)) is , go to STEP 2. , , , and go to STEP 1. (see Fig. 5(b)) is STEP 1. Because , go to STEP 2. a MP in , , STEP 2. Let , and go to STEP 1. , STEP 1. Because there are no MP in let , , and go to STEP 3. , go to STEP 4. STEP 3. Because STEP 4. Choose a branch string, say (see Fig. 5(c)) in s.t. , let , and . STEP 5. Let , , and . , let , STEP 6. Because , and go to STEP 3, where
V. AN EXAMPLE Enumerating all of the MP in a network is a NP-hard problem [8], [9]. It possesses a computational difficulty that, in the worse case, grows exponentially with network size. Owing to this inherent problem, instead of presenting practically large network systems, a moderate size benchmark network called the modified ARPANET shown in Fig. 1, which is the most frequently cited example [10]–[19], was selected to demonstrate this methodology. In this illustrative network, each edge represents a transmission line, and consists of several physical transmission lines, e.g. T3 cable, E1 cable, optical fiber. Each node represents a computer center, and consists of several switches. Nodes , and are the source node, and sink node, respectively. To make a branch string easy to be recognized, all of its nodes are underlined. The proposed algorithm is used to find all MP in Fig. 1 as follows: STEP 0. Let
. , go to STEP 4. STEP 3. Because STEP 4. Choose a branch string, say in s.t. , let . and STEP 5. Let , , and STEP 6. Because STEP 7. Find
,
,
, , and . The corresponding results are shown in Tables II and III. STEP 8. Let , , and go to STEP 3, where
, and .
(see Table I). , go to STEP 7. , ,
,
(see Table IV).
494
IEEE TRANSACTIONS ON RELIABILITY, VOL. 56, NO. 3, SEPTEMBER 2007
TABLE IV THE CORRESPONDING MP p
Finally, All MP are , , , , (see Table IV).
,
, ,
, ,
, , , and
VI. CONCLUSIONS Up to now, no method can give birth to real MP without duplicating during enumeration. Nevertheless, there is only one heuristic approach for searching for all MP [10]. This approach is implemented by using a very straightforward procedure. Without utilizing the properties of the network, it is inefficient, and tedious. It is also a very cumbersome, time-consuming task if all duplicate MP need to be eliminated, and/or applied in calculating the exact network reliability. By exploiting the special characteristic and structure among the subpaths in MP, the proposed algorithm not only requires fewer calculations to generate new MP, but is also more effective in generating MP without duplicates, and unfeasible MP. ACKNOWLEDGMENT The author would like to thank both the associate editor and the referees for their constructive comments and recommendations, which have significantly improved the presentation of this paper. REFERENCES [1] M. A. Samad, “An efficient algorithm for simultaneously deducing MPs as well as cuts of a communication network,” Microelectron. Reliab., vol. 27, pp. 437–441, 1987. [2] P. Kubat, “Estimation of reliability for communication/computer networks simulation/ analytical approach,” IEEE Trans. Communications, vol. 37, pp. 927–933, 1989. [3] S. Rai and S. Soh, “A computer approach for reliability evaluation of telecommunication networks with heterogeneous link—Capacities,” IEEE Trans. Reliability, vol. 40, pp. 441–451, 1991.
[4] W. J. Ke and S. D. Wang, “Reliability evaluation for distributed computing networks with imperfect nodes,” IEEE Trans. Reliability, vol. 46, pp. 342–349, 1997. [5] E. J. Doulliez, “Transportation network with random arc capacities,” RAIRO, Rech. Operations Research, vol. 3, pp. 45–60, 1972. [6] T. Aven, “Availability evaluation of oil/gas production and transportation systems,” Reliability Engineering, vol. 18, pp. 35–44, 1987. [7] T. Aven, “Some considerations on reliability theory and its applications,” Reliability Engineering and System Safety, vol. 21, pp. 215–223, 1988. [8] C. J. Colbourn, The combinatorics of network reliability. New York: Oxford University Press, 1987. [9] M. R. Garey and D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-hardness. : E.H. Freeman, 1979. [10] A. M. Al-Ghanim, “A heuristic technique for generating minimal path and cutsets of a general network,” Computers & Industrial Engineering, vol. 36, pp. 45–55, 1999. [11] W.-C. Yeh, “Search for minimal paths in modified networks,” Reliability Engineering & System Safety, vol. 75, no. 3, pp. 389–395, 2002/3. [12] J. M. Nahman, “Enumeration of MPs of modified networks,” Microelectron. Reliab., vol. 34, pp. 475–484, 1994. [13] W.-C. Yeh, “Search for MC in modified networks,” Computers and Operations Research, vol. 28, pp. 177–184, 2001. [14] J. M. Nahman, “Enumeration of minimal cuts of modified networks,” Microelectron. Reliab., vol. 37, pp. 483–485, 1997. [15] W.-C. Yeh, “Multistate-node acyclic networks reliability evaluation based on MC,” Reliability Engineering & System Safety, vol. 81, no. 2, pp. 225–231, 2003/8. [16] W.-C. Yeh, “A simple MC-based algorithm for evaluating reliability of stochastic-flow network with unreliable nodes,” Reliability Engineering & System Safety, vol. 83, no. 1, pp. 47–55, 2004/1. [17] W.-C. Yeh, “A simple algorithm to search for all MCs in networks,” European Journal of Operational Research, vol. 174, no. 3, pp. 1694–1705, 2006/11. [18] Y. Lin, “Using minimal cuts to evaluate the system reliability of a stochastic-flow network with failures at nodes and arcs,” Reliability Engineering & System Safety, vol. 75, pp. 41–46, 2002. [19] Z. Tan, “Minimal cut sets of s-t networks with k -out-of-n nodes,” Reliability Engineering & System Safety, vol. 82, no. 1, pp. 49–54, 2003/10. [20] C. C. Jane, J. S. Lin, and J. Yuan, “Reliability evaluation of a limited-flow network in terms of MC sets,” IEEE Trans. Reliability, vol. R-42, pp. 354–361, 1993. [21] W.-C. Yeh, “A revised layered-network algorithm to search for all d-minpaths of a limited-flow acyclic network,” IEEE Trans. Reliability, vol. 46, pp. 436–442, 1998. [22] W.-C. Yeh, “A simple approach to search for all d-MCs of a limited-flow network,” Reliability Engineering & System Safety, vol. 71, pp. 15–19, 2001. [23] W.-C. Yeh, “A simple algorithm to search for all d-MPs with unreliable nodes,” Reliability Engineering & System Safety, vol. 73, pp. 49–54, 2001/7, to appear in. [24] T. Jin and D. Coit, “Network reliability estimates using linear and quadratic unreliability of minimal cuts,” Reliability Engineering & System Safety, vol. 82, no. 1, pp. 41–48, 2003. [25] J. Huang and M. J. Zuo, “Dominant multi-state systems,” IEEE Trans. Reliability, vol. 53, pp. 362–368, 2004. [26] M. O. Ball, “Computational complexity of network reliability analysis: An overview,” IEEE. Trans. Reliability, vol. 35, pp. 230–239, 1986. [27] R. K. Ahuja, T. L. Magnanti, and J. B. Orlin, Netwrok Flows—Theory, Algorithms, and Applications. : Prentice-Hall International, 1993.
Wei-Chang Yeh is currently a professor of the Department of Industrial Engineering and Management Engineering at National Tsing Hua University in Taiwan. He received his M.S., and Ph.D. from the Department of Industrial Engineering at the University of Texas at Arlington. His research interests include network reliability theory, graph theory, deadlock problem, Linear Programming, and scheduling. He is a member of the IEEE, and INFORMS.