Microelectron. Rel~b., Vol. 29, No. 4, pp. 509-510,1989. Printed in Great Britain.
0026-2714/8953.00 + .00 © 1989 Pergamon Press pie
SIMPLE ENUMERATION OF MINIMAL TIESETS OF UNDIRECTED GRAPH S. HASANUDDINAHMAD Department of Industrial Engineering,King Abdul Aziz University,PO Box 9027, Jeddah, Saudi Arabia
(Receivedfor publication 6 June 1988) Abstract--There are many methods to enumerate tiesets (pathsets) of directed graphs. However, very few methods are available for undirected graphs. Even these involve higher mathematics or prior ideas of reliability.This paper givestwo methods which use the ideas of string of nodes and ordered pairs of nodes to enumerate all minimal pathsets. One simply has to enumerate all strings or ordered pairs of different orders. Unrequired ones are then simply deleted according to certain conditions. Two examples are given to illustrate the aigorithms. 1. I N T R O D U C T I O N
Though algorithms have been suggested which do not use tiesets or cutsets, such as [1], the enumeration of cutsets and pathsets is nevertheless still a basic step in evaluation of reliability [2, 3]. Many algorithms have been designed to generate tiesets of undirected graphs. Rai and Aggerwal [3] give a method for path enumeration. Jasmon and Kai [4] give another method for deducing minimal paths and cutsets. Devamanoharan I-5] has given a method of finding the pathset of a direct network. In this paper we give an algorithm for enumeration of tiesets of an undirected graph. We also propose an additional algorithm to the one proposed by Devamanoharan 1-5] for directed graphs, to take care of the case of undirected graphs. Our algorithms do not require knowledge of advanced mathematics, except that one should be able to represent the graph in the form of an adjacancy matrix and should have an idea of ordered numbers. Some notation and definitions are given in Section 2. In Section 3 we give an algorithm which enumerates all tiesets of a graph. In Section 4 we give an algorithm which generates remaining tiesets of an undirected graph in addition to the ones already generated by [51 for a directed graph. 2. N O T A T I O N A N D D E F I N I T I O N S
1,2,3..... N node numbers, where 1 is the source node and N is the terminal node; also row and column numbers A,B,C,... links between two nodes (symbolsof links) LN last node entered in the string 1-2-3...-N string or tieset M number of ordered pairs (x,Y) ordered pair of nodes
Step I. The following is the adjacency matrix of Fig. 1.
1
1
2
3
4
5
6
7
0
A
B
0
0
E
0
0
0
2
0
0
G
0
3
0
G
0
LOP
40 5 0
0 0
L
O R
T
0
0
R
0
0
W
0
X
0
0
0
6
0
0
P
TO
7
0
0
0
0
0 Q
We now generate all the tiesets in the form of strings of nodes starting from source node 1 and ending with the terminal node N. Step 2. Start the string with 1 as the last and only node LN. Step 3. Find all the columns which have non-zero entries in the row L N and are not previously entered in the current string. If no such column number is available discard the string and go to step 6. Otherwise generate a new string for each column by entering the column number on the last node LN. Step 4. Enter strings with the last node N in the set of complete strings, if any. Step 5. Enter all other strings into a set of incomplete strings. Step 6. If the set of incomplete strings is empty go to step 7, otherwise pick one incomplete string and go to step 3.
[
3. T I E S E T S A L G O R I T H M O F U N D I R E C T E D G R A P H
We shall first give the steps of our algorithm for enumerating tiesets of an undirected graph, illustrated by Fig. 1. 509
Fig. 1. An undirected graph.
510
S. HASANUDDINAI-IMAD
Step 7. Stop. The set of complete strings gives all the minimal tiesets. Example I (Fig. 1, Step 1) Step 2. 1 is the last node LN. Step 3. Columns 2, 3 and 6 have non-zero entries in the first row and are not previously entered in the current string. New strings 1-2, 1-3 and 1-6 are generated. Step 5. All of these are entered in the set of incomplete strings. Step 6. One incomplete string 1-3 is picked. Step 3. New strings 1-3-2, 1-3-4, 1 - 3 - 6 and 1 - 3 - 7 are generated. Step 4. String 1 - 3 - 7 is entered in the set of complete strings. Step 5. The set of incomplete strings is now updated. It contains 1-2, 1-6, 1-3-2, 1 - 3 - 4 and 1-3-6. Step 6. Pick one incomplete string from the set, say 1 3-2.
Step 3. 1-3-2 is the current string. There is no such column which has non-zero entry in row 2 and is not previously entered in the string. The string 1 - 3 - 2 is thus discarded. Go to step 6. Continuing in this way we get a set of complete strings which gives us the following tiesets: 1 - 2 - 3 - 7 , 1 - 2 - 3 - 6 - 7 , 1 - 2 - 3 - 4 - 5 - 7 , 1 - 2 - 3 - 4 - 6 - 7 , 1-3-7, 1 3-6-7, 1 - 3 - 4 - 5 - 7 , 1 - 3 - 4 - 6 - 7 , 1-6-7, 1 - 6 - 4 - 3 - 7 , 1-6-4-5-7, 1-6-3-4-5-7, 1-6-3-7.
4. EXTENSION OF AN ALGORITHM
Let us consider only the upper triangle of the matrix in Step 1. It represents the network in Fig. 1 if it is treated as a directed network. By the algorithm given in [5] one can easily obtain the following tiesets: 1-2-3-4-5-7, 1-2-3-4-6-7, 1-2-3-5-7, 1 - 2 - 3 - 6 - 7 , 1 - 3 - 4 - 5 - 7 , 1 - 3 - 4 - 6 - 7 , 1 - 3 - 6 - 7 , 1-3-7, 1-6-7. However, if the network is treated as an undirected one, as shown in Fig. 1, one can easily generate extra tiesets by the following algorithm. Step 1. Let 1 be the source node and N be the terminal node number as the highest number. Step 2. Let X be the highest node number connected to 1. Step 3. L e t M = 3 , N - 1 . Step 4. Consider the following set of M ordered pairs of nodes (1, X), (X, Y). . . . . (Z, N). Step 5. Enumerate all sets of M ordered pairs of nodes for different values of Y,..., Z between 2 and N - 1 such that X :~ Y :~ ... 4: Z. Delete
those sets where at least one of the following holds: (i) X < Y < ... < Z; (ii) at least one pair of ordered nodes is non-adjacent. Step 6. Change X to next highest node number connected to 1, then go to step 3. IfX can no more be changed go to step 7. Step 7. Stop. We have already found additional tiesets in step 5. Example 2 (Fig. 1, Step 1) Step I. N = 7. Step 2. X = 6. Step3. M -~ 3,6. Step 4 and 5. (1,6), (6, Y), (Y,7), for M = 3 , (1, 6), (6, 3), (3, 7) additional tieset. (1, 6), (6, Y), (Y, Z), (Z, 7), for M = 4, (1, 6), (6, 4), (4, 5), (5, 7) additional tieset, (1, 6), (6,4), (4, 3), (3, 7) additional tieset. (1, 6), (6, Y), (Y, W), (W, Z), (Z, 7), for M = 5, (1,6), (6, 3), (3,4), (4,5), (5,7) additional tieset. Others are deleted, and so for M=6. Step 6. For X = 3 and X = 2 no additional tieset is generated. Step 7. Stop. We now have the following four additional tiesets: 1 - 6 - 3 - 7 , 1 - 6 - 4 - 5 - 7 , 1-6-4-3-7, 1-6-3-4-5-7.
5. CONCLUSION Many algorithms to enumerate tiesets of undirected graphs have been designed. These algorithms generally involve higher maths or reliability ideas. Our algorithms are easy to understand and use in the sense that one only has to form different strings of ordered pairs of nodes and then delete the unrequired ones. Our algorithms are easy to use for classroom lectures as well. REFERENCES
1. S. Hasanuddin Ahmad, A simple technique for computing network reliability, IEEE Trans. Reliab. R-31, 41-45 (1982). 2. S. Hasanuddin Ahmad and A. T. M. Jamil, Calculations of systems unreliability by algebraic manipulation of failure event, Microelectron. Reliab. 24, 793-799 (1984). 3. S. Rai and K. K. Aggarwal, An efficient method for reliability evaluation of a general network, IEEE Trans. Reliab. R-27, 206-211 (1978). 4. G. B. Jasmon and O. S. Kai, A new technique in minimal path and cutset evaluation, IEEE Trans. Reliab. R-34, 136-141 (1985). 5. S. Devamanoharan, A note on determination of tiesets and cutsets for system without feedback, IEEE Trans. Reliab. R-28, 67-68 (1979).