An algorithm for evaluating all the minimal cuts of a graph

An algorithm for evaluating all the minimal cuts of a graph

Microelectron. Reliab., Vol. 35, No. 5, pp. 865-867, 1995 Copyright © 1995 Elsevier Science Ltd Printed in Great Britain. All rights reserved 0026-271...

190KB Sizes 4 Downloads 55 Views

Microelectron. Reliab., Vol. 35, No. 5, pp. 865-867, 1995 Copyright © 1995 Elsevier Science Ltd Printed in Great Britain. All rights reserved 0026-2714/95 $9.50 + .00

Pergamon

0026-2714(93) E0018-5

TECHNICAL NOTE AN A L G O R I T H M FOR E V A L U A T I N G ALL THE M I N I M A L CUTS OF A GRAPH BRIJENDRA SINGH Centre for Excellencein Reliability Engineering, Department of Electronics & Computer Engineering, Regional Engineering College, Kurukshetra-132119, India (Received for publication 23 November 1993) Abstract--This paper presents an algorithm for evaluating all the minimal cuts of a graph. The algorithm generates the combination of nodes with the help of neighbouring nodes in ascending order. Those combinations which satisfy a given connectivity condition give the minimal cuts of graph. An example illustrates the algorithm.

INTRODUCTION During the past decade considerable work has been devoted to the problem of finding all the minimal cuts of a graph [1]. Alternative procedures have been suggested by different authors I-2-6]. Some [3, 4, 5] are useful for enumerating minimal cuts between specified pairs of nodes. Rai [2] has suggested a method for enumerating minimal cuts. For N-terminal node network, there are (2 N - 1) possible combination of nodes. Method of Rai generates all possible combinations and converts them into cutsets using ring sum operator. Thereafter, it deletes all edges-disjoint union of cutsets to get minimal cuts. Jasmon and Foong I-61 have presented a method for enumeration of minimal cuts. Their algorithm generates all possible combinations and deletes some combinations with the use of successive elimination technique. They apply two checking conditions, source node tree technique and the terminal node tree technique. The combinations which satisfy both conditions generate minimal cuts. The proposed algorithm generates the combination of nodes with the help of neighbouring nodes in ascending order. It avoids the successive elimination technique and terminal node tree technique to eliminate such combinations which do not give minimal cuts. The remaining combinations which satisfy a given connectivity condition only generate minimal cuts. Proposed algorithm to obtain the minimal cuts of graph does not require to delete all edges-disjoint union ofcutsets. An example illustrates the algorithm. NOTATION {S} set of minimal cutsets N number of nodes

{ST} STN n-STN {n-STN} q~

set of terminal nodes of graph subsetof terminal nodes n-number of nodes in STN set of n-STN ring sum operator.

DEFINITIONS Order of STN 1-STN: Any one node from the set of terminal nodes. 2-STN: Collection of any one of the 1-STN and one of its adjacent nodes. 3-STN: Collection of any one of the 2-STN and one of its adjacent nodes. n-STN: Collection of any one of the (n - 1)-STN and one of its adjacent nodes. Adjacent nodes of n-STN Nodes i and j are adjacent if they are connected by an edge. Node i is adjacent to a particular n-STN (n-STN ~_ {ST}) if node j exists in the n-STN, where n-STN is the collection of nodes, such that node i is the adjacent node of n-STN. Vertex cutset Vertex cutset is a set of edges, which are connected to the particular node (i.e. also called vertex), whose removal from the given graph isolates the vertex. Riny sum of n-STN Ring sum of all n-vertex cutsets of the vertices in the n-STN is calculated by using ring sum operator, as defined in [2].

865

866

Technical Note PROPOSED ALGORITHM

Step 1: Input: (i) the graph by giving for every node the list of nodes adjacent to it. (ii) specify the source node and total number of nodes (N) in the graph. (iii) {ST}. (iv) vertex cutsets of nodes in the graph. Step 2: Initialize; n-STN = I-STN =- Source node. Step 3: Do for all n-STN: (a) Obtain the adjacent nodes of a given n-S TN. (b) Generate all (n + I ) - S T N s for the given n-STN and its adjacent nodes one by one. Store the sets of (n + 1)-STNs. Step 4: n - S T N s ~ (n + 1)-STNs. Step 5: IF n ~< (N - 2) T H E N go to step 3 ELSE step 6. Step 6: Form an array of SINs. Step 7: Repeat for all STNs: Call the A L G O R I T H M - A to check the connectivity of remaining nodes after removing nodes in S T N from the graph. IF remaining nodes are connected. T H E N store the S T N in the form of array. ELSE delete it. Step 8: Do step 8 11 for all S T N s in the array. {S} = ~ , Choose an element from the array of S T N s . Step 9: Get the vertex cutset of nodes in the STN. Step 10: Calculate the ring sum of vertex cutsets. Step 1 l: Store the set of edges as an element of {S}. Step 12: List all the elements of {S} as minimal cuts. ALGORITHM-A: CONNECTIVITY CHECK OF NODES IN THE GRAPH

To check the connectivity of remaining nodes after removing the subset of terminal nodes (STN) in the graph, proceed according to the following steps: Step 1: Input (i) {ST} (ii) S T N (iii) All the remaining nodes except nodes in STN. Step 2: Put any node from the remaining nodes at the top of the tree. Step 3: Put those nodes that are directly connected to the node into layer 2 (lower layer). Step 4: For each of the nodes found in step 3 operate as follows: (a) Is this node a member of S T N ? IF no, then leave it. 1F yes, then check further whether this node has appeared before in any part of the tree. If it has not appeared before, then circle it; else delete this node from the tree.

(b) Repeat step 4(a) until all nodes in that layer have been examined. Step 5: Is any node in that layer not circled? IF no, then j u m p to step 6. IF yes, then j u m p to step 3, to create the next lower layer (namely layer 3,4 . . . . ) for each node that is not circled. Step 6: Scan the whole tree and check whether every node that is not a member of S T N is present and not circled. IF yes, remaining nodes are connected. 1F no, remaining nodes are not connected.

ILLUSTRATION OF ALGORITHM

Consider the network as in Fig. 1.

2

E4

3

5 Fig. 1. Global network.

Step 1: Input; (i) Adjacent nodes of 1 = 2, 5 Adjacent nodes of 2 = 1, 3, 5 Adjacent nodes of 3 = 2, 4, 5 Adjacent nodes of 4 = 3, 5 Adjacent nodes of 5 = I, 2, 3, 4 (ii) Choose node 5 as a source node and N=5 (iii) {ST} = {1,2,3,4,5} (iv) Vertex cutset of node 1 = E 1E2 Vertex cutset of node 2 = E1E3E4 Vertex cutset of node 3 = E4EsE 6 Vertex cutset of node 4 E6E 7 Vertex cutset of node 5 = EzE3EsEv. Step 2: Initialize; n-STN = 1-STN - 5. Step 3: (a) Adjacent nodes of 5 are: 1, 2, 3, 4 (b) Store the collection of nodes (5, 1), (5, 2) (5, 3), (5, 4) as elements of 2-STNs. {2-STN} = .[(5, 1), (5, 2), (5 3,), (5, 4)}. Step 4: n - S T N s ~ 2-STNs. Step 5: Go to step 3. Step 3: For 2-STN = (5, 1) (a) Adjacent nodes of (5, 1) are: 2, 3, 4 (b) Store the collection of nodes (5, 1, 2), (5, 1,3), (5, 1, 4) as elements of 3-STNs. =

[Repeat the steps 3(a) and 3(b) for all other 2-STNs] {3-STN} = {(5,1,2), (5,1,3), (5,1,4), (5,2,3), (5,2,4), (5,3,4)}.

Technical Note Step 4: n - S T N s ~ 3 - S T N s . Step 5: G o to step 3. Step 3: Generate the set of 4 - S T N s

DISCUSSION from each

3-STNs. { 4 - S T N } = {(5, 1, 2, 3), (5, 1, 2, 4), (5, 1, 3, 4),

(5, 2, 3, 4)}. Step 4: n - S T N s .-- 4 - S T N s . Step 5: Since 4 ~< N - 2; where N = 5 Go to step 6. Step 6: Form an array of S T N s : (5), (5, 1), (5, 2), (5, 3), (5, 4), (5, 1, 2), (5, 1, 3), (5, 1,4), (5, 2, 3), (5, 2, 4), (5, 3, 4), (5, 1, 2, 3), (5, 1, 2, 4), (5, 1, 3,4), (5,2,3,4). Step 7: After the connectivity test on all S T N s the following S T N s are eliminated, which do not satisfy the connectivity: (5, 2), (5, 3), (5, 1, 3), (5, 2, 3), (5, 2, 4) and the following S T N s are stored which satisfies the connectivity condition: (5), (5, 1), (5,4), (5, 1,2), (5,1,4), (5,3,4), (5, 1, 2, 3), (5, 1, 2, 4), (5, 1, 3, 4), (5, 2,3,4). Step 8: Do steps 8-11 for all S T N s . Choose the element S T N = (5), {S} = Step 9: Vertex cutset of node 5 = EzE3EsE 7. Step 10: Ring sum = E2E3EsE 7. Step 11: {S} = {E2E3EsET} [Repeat steps 8 11 for next element]. Step 8: Choose the element S T N = (5, 1). Step 9: Vertex cutset of node 5 = E2E3EsE 7 and Vertex cutset of node 1 = E I E 2. Step 10: Ring sum = E 2 E 3 E s E 7 0 E1E 2 = E I E 3 E s E 7. Step 11: {S} = {E2E3EsE~, E1E3EsE~}. [Repeat the steps 8 11 for all S T N s in the array; then go to step 12] Step 12: {S} = E2E3EsE 7 E1E3EsET, E2E3EsE6, E4EsE7, EIE3EsE6, E2E3E 4, E6E7, E4EsE6, E1E3E,,, EaE 2.

867

The method suggested in this paper has been tested on different types of graphs to check the accuracy of the method. The proposed method to obtain the minimal cuts of graph is as simple as that given by earlier authors. The typical advantage of this method is that the connectivity check algorithm deletes many unwanted combinations at an early stage, thereby reducing the number of higher order combinations which generate the cutsets. The algorithm is simple to use as can be seen from the illustration. For a large and complex graph, the number of possible combinations remains the same for every source node. There is no rule for choosing a source node. This method has been put in the form of an iterative process, which can easily be implemented on a computer. Acknowledgement--The author is deeply indebted to the referees for their valuable suggestions and comments which have enhanced the quality of this paper.

REFERENCES 1. K. B. Misra, Reliability Analysis and Prediction." A Methodology Oriented Treatment. Elsevier Science, Netherlands (1992). 2. S. Rai, Cutset approach to reliability evaluation in communication network, IEEE Trans. Reliab. R-31, 428 431 (Dec. 1982). 3. S. Arun Kumar and S. H. Lee, Enumeration of all minimal cutsets for a node pair in a graph, IEEE Trans. Reliab. R-29, 51 55 (April 1979). 4. S. H. Ahmad, Simple enumeration of minimal cutsets of acyclic directed graph, IEEE Trans. Reliab. R-37, 484 487 (Dec. 1988). 5. S. K. Ghosh and Brijendra Singh, Cutset approach to reliability evaluation of a general network. Journal IETE, 35(6), 331-335 (Nov.-Dec. 1989). 6. G. B. Jasmon and K. W. Foong, A method for evaluating all the minimal cuts of a graph, IEEE Trans. Reliab. R-36, 539-545 (Dec. 1987).