Microelectron. Reliab.,Vol. 35, No. 2, pp. 295-298, 1995
Pergamon
Copyright © 1994 ElsevierScienceLtd Printed in Great Britain.All rights reserved 0026-2714/95 $9.50+.00
0026-2714(94)00053-0
TECHNICAL NOTE A SET THEORETIC METHOD FOR ENUMERATION OF PATHSETS OF NON-DIRECTED GRAPHS M. A. AzIz Department of Applied Physics and Electronics, Rajshahi University. Rajshahi 6205, Bangladesh
(Received for publication 26 April 1994) Abstract--A set theoretic method has been developed for the enumeration of terminal pair pathsets of a non-directed graph. The graph is represented by an expression using vertex sets defined in the text. These vertex sets are gradually converted to pathsets by set operations, like union and intersection. The method is explained using illustrative examples.
b 1. INTRODUCTION A remarkable part of the literature is concerned with various methods for enumeration of pathsets of reliability graphs. The literature is rich with many new methods [1-8] and plenty of old ones [9]. Bansal et al. [1] used a node by node search technique for enumeration of minimal paths of a graph. Hura [2] presented a systematic approach for the enumeration of all simple paths in a directed graph using petrinet. Rai et al. [3] developed an algebraic technique used for the reliability evaluation of a computer network. Samad [4] used a connection matrix of the graph for the enumeration of a pathset. A large part of CPU time is misused in this method for unuseful multiplications. Aziz et al. [5] modified method [4] by indexing the connection matrix and have been successful in avoiding almost all unuseful multiplications, except a few, thereby saving a remarkable amount of CPU time. Aziz et al. [6] again modified [5] by repeatedly indexing the connection matrix and higher-order row vectors and successfully avoided the remaining unuseful multiplications, thereby decreasing the CPU time to a minimum. Aziz et al. [7] also proposed an algorithm for enumeration of a terminal pair pathset enumeration using an incidence matrix of the graph. Besides these, many methods are available for the purpose in [8]. In this paper, a method has been developed for the enumeration of a pathset of non-directed graphs using set theory. This method requires no computer or any other computing tools, other than a pencil and a piece of paper, with a preliminary knowledge of set theory.
i a
Fig. 1. A simple graph. as a{x, y}. A vertex v of a graph G is defined as a set of edges incident on it. The vertices of the graph of Fig. 1 are written as a{i,j}, b{i, k, m}, c{j, l, m} and d{k, l}. Each of these sets is called a vertex set. The graph G is written equal to the sum of all vertex sets, i.e.:
G = a{i,j} + b{i, k,m} + c{j,l, m} + d{k, l}.
(1)
These vertex sets are gradually converted to pathsets after each operation. For the enumeration of a pathset between a vertex pair, the following three rules of operation have been developed.
Rule (1)
2. DESCRIPTION OF THE METHOD
The source, sink and all the vertex sets which can intersect with the source are to be identified in the expression of G. Let vertex sets a and d in equation (1) be the source and sink, respectively. Source vertex set a can intersect with vertex sets b and c. New pathsets of the type Px{Y} are to be developed from intersecting vertex sets a, b, and c in the following way. We have from equation (1):
In this paper, a label is used with a set of elements. For example, a set {x, y}, if labelled by a, is written
Intersection of a and b will be performed first as
G = a{i,j} + b{i, k, m} + c{j, l, m} + d{k, l}. 295
296
Technical Note interchanged in the mixed term as follows:
follows:
G ....
G = a { j } +P,{i}{k,m} + c{j,l,m} + d{k,l}, where Pl { i } = a{ i, j } c~ b{ i, k, m} and the intersecting element i is excluded from both the vertex sets a and b. Next the intersection of a and c is performed as follows:
G=a{ } + P,{i}b{k,m} + PE{j}c{l,m} +d{k,l}, where P2{J } = a{j } c3 c{j, l, m} and again the intersecting elementj is excluded from a and c. This process of intersections is continued until the source vertex set becomes an empty set. When a set is converted to an empty set, that set will be deleted from the expression. Hence:
G = P,{i}b{k, m} + Pz{J }c{l, m} + d{k, I}.
(2)
The number of pathsets in this step will be P,, where n is the number of elements in the source vertex set. Using intersections and unions, all vertex sets will be gradually converted to pathsets.
Rule (2) Now the expresssion for G contains two types of terms. The first type is a pure vertex set and this type can be called a pure term. d{k, 1} in equation (2) is a pure term. The second type is a vertex set having path set(s) attached to it and this type may be called a mixed term. P,{i}b{k, m} in equation (2) is a mixed term. P1 {i} is the pathset part and b{k, m} is the vertex set part. At this stage, intersection between vertex sets in the expression is possible in three ways: (i) vertex sets may be parts of mixed terms; (ii) a vertex set may be a part of a mixed term and the other may be a pure term; and (iii) vertex sets may be pure terms. Case (iii) will be totally ignored and case (i) will be given preference over case (ii). The two cases will be operated in the following different ways. Case (i): when intersecting vertex sets are parts of mixed terms. Let a vertex set b{k, 1, m} intersect with c{p, q, m} in an expression like:
G ....
+ Pj{t}Pt.+t){Y, mIc{P, q} + " " . Applying this rule in equation (2) we get:
P3{i,m} = P,{i} w {b{k,m} c~ c{l,m}} = P,{i} w {m}; and P4{J, m} = Pz{J} u (m}. Deleting element m from b and e and attaching P3{i, m} and P4{J, m} with the first two mixed terms in equation (2), we get:
G = Pl{i}P3{i, m}b{k} + Pz{j}P4{j, m}e{l} + d{k, 1}. Now interchanging the positions of Pa{i,m} and P4{J, m}, we get:
G = PI{i}P4{j, m}b{k} + P2{j}P3{i, m}c{l} + d{k, 1}.
(3) Now it is clear that the elements in vertex sets are decreasing and pathsets are increasing in the mixed term, step by step. Let the pathset P~ be increased up to P,.. If the intersecting vertex sets have more than one pathset attached to them, like the following expression, the operation will be as follows: G ....
= ... + Pi(x)Pi{q, r}Pk{r, s, t} x [P~,. +, ){x, p} P,. + z){q, r, p} P,. + 3){r, s, t, p}]
x b{m} + P~{u}P,{v,t}P,{w,r, s} x [P,.+4,{u, p} P,.+5,{v, t, p} x P~,.+6i{w, r,s, p}]c{k} + " ' . Then the bracketed parts will be interchanged between each other:
G = "'" + Pi{x}Pj{q,r}Pk{r,s,t}
x e~.+4,{u, p} ~.+,,{v, t, p} e,.+ 6,{w, r, s, p} x b{m} + Px{u}Py{v, t}Pz{w, r, s} x Pv,+ ,){x, P} P,.+ 2){q, r, p}
New pathsets are developed as follows:
x a.+3,{r,s,t,p}c{k}
P~.+,,{y, m} = P~{y} w {b{k,l,m} n c { p , q , m } }
.
"
P~,.+2){q, r, p} = P~(q, r} t3 {p};
p~,.+3){r,s,t,p} = Pk(r,s,t} U {p};
~.+4){u, p} = P~{u} ~ {p}; P..+,){v,t,p} = P,(v,t} u {p};
+ P~{y}P~.+,{y,m}b{k,l}
Then the positions of sets P~.+ 1) and P~.+2) are to be
.
P(,.+ ,){x, p} = P/{x} ~ {b{m, p} ~ c{k, p}}= Pi{x} w {p};
These pathsets are also to be attached to the mixed terms and the intersecting element m is to be deleted from the respective vertex sets b and c. Hence:
+ Pj{t}P~,+2){t, m}c{p, q} + " " .
+
where:
P~.+z){t, m} = Pj{t} u {m}.
G ....
+ P/(x)Pj{q, r}Pk{r,s, t}b{m, p}
+ Px{u}Py{v, t}Pz{w, r, s}e{k, p} + ' "
+ P~{y}b{k,l,m} + Pj{t}c{p,q,m} + "" ".
= P/{y} w {m}; and
+ Pi{y} P~.+z){t, m}b{k, l}
and
Pt,.+6,{w,r,s,p} = Pz(w,r,s} ~ {p}.
Technical Note If any pathset contains elements of a loop, that is to be deleted. The order of P~ in the expression is arbitrary. Case (ii): when one of the intersecting vertex sets is a part qf a mixed term and the other is a pure term. Let the intersecting vertex sets be like the following expression: G ....
297 3. E X A M P L E
Let us enumerate the pathsets between vertex pair (a, f ) for the graph of Fig. 2. Here the expression of the graph is: G=a{1,2}+b{1,3,4}+c{2,3,5,6}+d{6,7,9} + e{4, 5, 7, 8} + f{8, 9}.
+ Px{k,l}Py{m,p,r}d{t} + e { t , u , v } + " ".
In this operation it can be assumed that vertex set e contains an empty pathset. Then: G ....
+d{ } +Px{k,l,t}P,{m,p,r,t}e{u,v} + " "
where,
Applying rule (1), we get: G = a{2} + P~{1}b{3,4} + c{2, 3, 5,6} + d{6, 7, 9} + e{4, 5, 7, 8} + f{8, 9}, = a{ } + P,{1}b{3, 4} + P2{2}c{3, 5, 6} + d{6, 7, 9}
P~{k, l, t} = ex{k, l} w {d{t} ~ e{t, u, v}} = px{k,
+ e{4, 5, 7, 8} + f{8,9},
l } . {t}
= P~{1}b{3,4} + P2{2}c{3, 5, 6} + d{6, 7, 9}
and + e{4, 5, 7, 8} + f{8, 9}.
P~,{m, p, r, t} = Pr{m, p, r} w {t}.
Applying rule 2, case (i) at the intersection of b and c, we get
Rule (3)
If the vertex set of a mixed term intersects with the sink vertex, the intersecting element will be deleted from both the intersecting sets and it will be included in the path sets. For example, from equation (3), we have: G = PI{i}P,{j, m}b{k} + P2{j}P3{i, m}c{l} + d{k, I}.
G = PI{1}[P4{1, 3}]b{4} + P2{2}[P3{2, 3}]c{5, 6} + d{6, 7, 9} + e{4, 5, 7, 8} + f{8, 9}, -- P,{1}P3{2, 3}b{4} + ,°1{2},°4{1, 3}c{5, 6} + d{6, 7, 9} + e{4, 5, 7, 8} + f{8, 9}. Applying rule (2), case (ii) at the intersection of b and e, we get
Intersection of b and d will be as follows, G = b{ }+ P2{J} P3{i, m}c{I} + P~{i, k}P4{j, m, k}d{l}, where
G = b{ } + P2{2}P4{I, 3}c{5, 6} + d{6, 7, 9} + PL{1, 4} P4{2, 3, 4}e{5, 7, 8} + f{8, 9},
P,{i,k} = el{i } w {b{k} c~d{k,I}} = P,{i} w {k};
= P2{2} P4{I, 3}c{5, 6} + d{6, 7, 9}
and
+ P1{1, 4}P3{2, 3, 4}e{5, 7, 8} + f{8, 9}.
P4{j, m, k} = P,{j, m} w {k}.
As set b is an empty set it will be deleted from the expression. Intersection of c and d will be the same:
Applying rule (2), case (i) at the intersection of c and e, we get
G = c{ } + P,{i,k}P4{j,m,k}P2{j,I}P3{i,m,l}d { }.
G = P2{2} P4{ 1, 3}[P7{2, 5}/'8{ 1, 3, 5}]c{6}
Finally, c and d will be deleted from the expression:
+ d{6, 7, 9} + PI{I, 4}P3{2, 3, 4}
G = P~{i,k}P2{j,l}P3{i,m,l}P4{j,m,k}.
(4)
At this step, all the vertex sets have been converted to pathsets and here the pathsets enumeration process is completed. If we write equations (1)-(4) together, we get the complete method for pathset enumeration for the vertex pair (a, d) for the graph of Fig. 1.
× [Ps{1,4,5}P6{2,3,4,5}]e{7, g } + f { 8 , 9 } = P2{Z}P4{1,3}Ps{1,4,5}P6{2,3,4,5}c{6}
+ d{6, 7, 9} + Pall, 4}t'3{2, 3, 4} × Pv{2,5}Ps{1,3,5}e{7,8} + f{8,9}.
G = a{i,j} + b{i, k, m} + c{j, l, m} + d{k, m}, = P,{iIb{k, m} + P2{j}c{l, m} + d{k, I}, = P~{i}P4{j, m}b{k} + P2{j}Pa{i, m}c{l} + d{k, l},
3
5
= P~{i,k}P2{j,I}P3{i,m,l}P4{j,m,k}.
So the enumerated pathsets are: {i, k}, {j, l}, {i, m, l} and {j,m,k}. The developed method will become more clear in the following example.
Fig. 2. Graph of a communication network.
298
Technical Note
Pathset '°6 is to be deleted because it contains elements 3, 4, 5 which constitute a loop in the graph. Applying rule (2), case (ii) at the intersection of c and d, we get:
G = c { } + P2{Z, 6}P4{I,3,6}Ps{1,4,5,6}d{7,9}
G = P2{2, 6, 9} P4{ 1, 3, 6, 9} Ps{ 1, 4, 5, 6, 9}
× Pg{1,4,7,9}P1o{2,3,4,7,9}P~1{2,5,7,9} x PI2{1,3,5, V, 9}Pa{1,4,8}P3{2,3,4,8 } x P7{2, 5, 8} Ps{1, 3, 5, 8}
+ P,{1,4}P3{2,3,4}PT{2,5} × P8{1, 3,5}e{7, 8} + f{8,9},
= P2{2,6}P4{1,3,6}Ps{1,4,5,6}d{7,9} + PI{I,a}P3{2,3,4}PT{2,5} × P8{1, 3, 5}e{7, 8} + / { 8 , 9 } . Applying rule (2), case (i) at the intersection of d and e, we get:
G = P2{2,6}P4{1,3,6}Ps{I,4,5,6}[P13{2,6,7} × Pt4{1,3,6, V}P~5{1,4,5,6,7}]d{9 } + P~{1,4}P3{Z, 3,4}PT{Z, 5}P8{I,3,5} × [Pg{1,4,7,9}PIo{Z, 3,4,7}P~{2,5,7} × P~2{I, 3, 5, 7}]e{8} + / { 8 , 9 } ,
= P2{2,6}P4{I,3,6}Ps{1,4,5,6}Pg{1,4,7} × PlO{2,3,4,7}PII{Z, 5,7}Px2{1,3,5, V}d{9} + P~{1,4}Ps{Z, 3,4}PT{Z, 5}Ps{I,3,5}
x P13{2, 6, 7, S} P~4{1, 3, 6, 7, 8}. Hence the enumerated pathsets are: {2, 6, 9}, {1, 3, 6, 9}, {1,4,5,6,9}, {1,4,7,9}, {2,3,4,7,9}, {2,5,7,9}, {1, 3, 5, 7, 9}, {1, 4, 8}, {2, 3, 4, 8}, {2, 5, 8}, {1, 3, 5, 8}, {2, 6, 7, 8}, {1,3,6,7,8}. 4. RESULTS AND DISCUSSION The pathsets enumerated from the developed method are compared with those obtained from other computer oriented methods and found the same. The comparisons between the developed method and computer oriented methods are not logical because the developed method is different in nature from the others. This method can be carried out on paper, but the other methods require the steps of writing, loading and running the programme on a computer. It can be said that the method is easy to understand and repetitive practice will improve one's skill, like other branches of mathematics, and many intermediate steps can be skipped. The time and effort involved is much less in this method in comparison to computer oriented methods, because a preliminary knowledge of set theory is enough for the developed method, whereas computer oriented methods require a good knowledge and skill in a high-level programming language.
× P~3{2, 6, 7} P14{ 1, 3, 6, 7} × P~s{1,4,5,6, 7}e{8} + f{8,9}. Pathset P~5 is to be deleted, because it contains elements 5, 6, 7 which constitute a loop. Applying rule (3) at the intersection of d, f and e, f, we get G=d{
}+Pt{1,4}P3{2,3,4}PT{2,5}
× Ps{I,3,5}PI3{2,6,7}P~4{1,3,6,7}e{8} + P2{2,6,9}P4{I,3,6,9}Ps{1,4,5,6,9} × P9{1, 4, 7, 9} P~o{2, 3, 4, 7, 9} P~{2, 5, 7, 9} × P~2{I, 3, 5, 7, 9}/{8}, = e { } + P2{Z, 6,9}P4{I,3,6,9}P~{I,4,5,6,9}
× P9{I,4,7,9}P~o{Z, 3,4,7,9}PIa{2,5,7,9} × P12{I,3,5, Y,9}P~{1,4,S}P3{Z, 3,4, g}P7{2,5,8} × P8{ 1, 3, 5, 8} Pt3{2, 6, 7, 8} × P~4{1, 3, 6, 7, 8}f{ };
REFERENCES
1. V. K. Bansal, K. B. Misra and M. P. Jain, Minimal pathset and minimal cutset using search technique, Microelectron. Reliab. 22(6), 1067-1075 (1982) 2. G. S. Hura, Enumeration of all simple paths in a directed graph using petrinet: a systematic approach, Microelectron. Reliab. 23(1), 157-159 (1983). 3. S. Rai, A. Kumar and E. V. Prasad, An algebraic technique for reliability evaluation of computer network, In Proc. National Conf. on Reliability Engineering, IIT Kharagpur, India (1985). 4. M. A. Samad, An efficient algorithm for simultaneously deducing minimal paths as well as cuts of a communication network, Microelectron. Reliab. 27(3), 437-441 (1987). 5. M. A. Aziz, M. A. Sobhan and M. A. Samad, Reduction of computations in enumeration of terminal and multiterminal pathset by the method of indexing, Microelectron. Reliab. 32(8), 1067-1072 (1992) 6. M.A. Aziz, M. A. Sobhan and M. A. Samad, Enumeration of pathsets of reliability graphs by repeated indexing, Microelectron. Reliab. 33(4), 481-487 (1993). 7. M. A. Aziz, M. A. Sobhan and M. A. Samad, Terminal pair pathset enumeration of a graph using incidence matrix, Bangladesh J. Sci. Ind. Res. 28(3), 38-48 (1993). 8. K. B. Misra, Reliability Analysis and Prediction. Elsevier, The Netherlands (1992). 9. N. Deo, Graph Theory with Applications to Enyineering and Computer Science. Prentice-Hall, India (1989).