• 沒有找到結果。

An Efficient Parallel Strategy for ComputingK-Terminal Reliability and Finding Most Vital Edges in 2-Trees and Partial 2-Trees

N/A
N/A
Protected

Academic year: 2021

Share "An Efficient Parallel Strategy for ComputingK-Terminal Reliability and Finding Most Vital Edges in 2-Trees and Partial 2-Trees"

Copied!
25
0
0

加載中.... (立即查看全文)

全文

(1)

File: DISTL2 145401 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 4326 Signs: 2299 . Length: 58 pic 2 pts, 245 mm

journal of parallel and distributed computing51, 89113 (1998)

An Efficient Parallel Strategy for Computing

K-Terminal Reliability and Finding Most Vital

Edges in 2-Trees and Partial 2-Trees

1

Chin-Wen Ho2

Department of Computer Science and Information Engineering, National Central University, Chung-Li, Taiwan

and

Sun-Yuan Hsieh and Gen-Huey Chen

Department of Computer Science and Information Engineering, National Taiwan University, Taipei, Taiwan

Received July 18, 1996; revised March 2, 1998; accepted March 18, 1998

In this paper, we first develop a parallel algorithm for computing K-terminal reliability, denoted by R(GK), in 2-trees. Based on this result, we

can also compute R(GK) in partial 2-trees using a method that transforms, in

parallel, a given partial 2-tree into a 2-tree. Finally, we solve the problem of finding most vital edges with respect to K-terminal reliability in partial 2-trees. Our algorithms take O(log n) time with C(m, n) processors on a CRCW PRAM, where C(m, n) is the number of processors required to find the connected components of a graph with m edges and n vertices in logarithmic time.  1998 Academic Press

Key Words: Network reliability, K-terminal reliability, partial tree, 2-tree, most vital edge.

1. INTRODUCTION

Analysis of network reliability is of major importance in computer, communica-tion, power, and other networks. Because some components of a particular network may be subjected to random failure, we need to compute, as efficiently as possible, the probability that the network is still functional.

Let G=(V, E) be a graph with vertex set V and edge set E, and let K be a specified subset of V. Each vertex is assumed to be perfectly reliable, and each edge e # E may fail independently with known probability 1&Pro(e) (i.e., Pro(e) is the article no.PC981454

89 0743-731598 25.00

Copyright  1998 by Academic Press All rights of reproduction in any form reserved.

1This work was partially supported by the National Science Council of Taiwan under Grant

NSC84-2213-E-008-005. We thank the anonymous referees for helping us improve the presentation of this paper.

2Corresponding author. Address: Department of Computer Science and Information Engineering,

(2)

File: DISTL2 145402 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 3719 Signs: 3249 . Length: 52 pic 10 pts, 222 mm

probability that the edge is functional). The K-terminal reliability of G, denoted by R(GK), is the probability that all vertices in K are connected. Generally, the

K-terminal network reliability problem belongs to a class of NP-hard problems [5, 13, 21, 25]. Even for planar graphs, the computation of R(GK), for K{V, is also

an NP-hard problem [20, 22]. There are linear time algorithms for solving the problem when |K| =2 or K=V for some special graphs [20]. For any KV, Satyanarayana and Wood [23] developed a linear time algorithm to solve the problem in series-parallel networks. Wald and Colbourn [26] also developed a sequential linear time algorithm to solve the problem in partial 2-trees. Partial 2-trees, also called generalized series-parallel graphs [16, 29], include properly the class of series-parallel graphs.

Since a 2-tree is a biconnected series-parallel graph, it can be represented by a decomposition tree [6, 11, 17]. In this paper, given a 2-tree, we first represent it using a special form of its decomposition tree and then develop a parallel strategy to solve K-terminal reliability problems in 2-trees using the tree contraction technique [1]. In addition, based on structure characterization of 2-trees, we can first trans-form a given connected partial 2-tree into a biconnected one and further transtrans-form it into a 2-tree by adding dummy edges with probability measure zero. Thus, R(GK)

in partial 2-trees can be computed by using the algorithm we have developed for 2-trees. Finally, we consider an application that finds the most vital edge (the edge whose deletion yields the largest decrease in the K-terminal reliability) in a partial 2-tree. The time-processor complexity for finding most vital edges is the same as the result for computing R(GK) in partial 2-trees. Our algorithms take O(log n) time

with C(m, n) processors on a CRCW PRAM, where C(m, n) is the number of processors required to deterministically find connected components of a graph with m edges and n vertices in logarithmic time. The best result for C(m, n) is O((m+n):(m, n)log n), where : is the inverse Ackermann function [9].

The computation model used in this paper is the deterministic parallel random access machine model (PRAM) which permits concurrent or exclusive reads and writes, including CRCW, CREW, and EREW, in its shared memory. In CRCW PRAM, if a write conflict occurs, the model allows an arbitrary processor to succeed [4].

2. PRELIMINARIES

In this paper, all of the input graphs are finite with no loops or multiple edges (the edges have two common end vertices). However, during the process of han-dling an input graph by means of some graph operations, we allow the graphs appearing in the process to contain multiple edges. We use standard graph theoreti-cal terminology compatible with [7]. Given a graph G=(V, E), let n= |V| and m= |E|. Let G(V$), V$V, be the subgraph of G induced by V$. Let (a, b) denote an undirected edge with end vertices a and b, and let a  b denote a directed edge (or an arc) from a to b. An induced path is a subgraph induced by a vertex set [v1, v2,..., vk], such that (vi, vi+1) # E for all 1ik&1, and there is no edge joining

(3)

File: DISTL2 145403 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 3257 Signs: 2480 . Length: 52 pic 10 pts, 222 mm

function \: V  [1,..., n] satisfying \(s)=1, \(t)=n, and for each v # V&[s, t], there exist adjacent vertices v1and v2 such that \(v1)<\(v)<\(v2).

An undirected graph G is called chordal if every cycle of length greater than three has a chord, that is, an edge joining two nonconsecutive vertices of the cycle. Equivalently, G does not contain an induced subgraph isomorphic to a k-cycle Ck

for k>3.

A 2-tree is defined recursively as follows: (1) A single edge is a 2-tree.

(2) Given any 2-tree G, let (x, y) be an edge of G. Adding a new vertex z, and the two edges (x, z) and ( y, z) produces a 2-tree.

An ordering of the vertex set V, say v1, v2,..., vn, is called a perfect elimination

order (PEO) of G if for i1, vi and its adjacent vertices form a clique in

G([vi, vi+1,..., vn]). It is well known that a graph is chordal if and only if it has a

PEO [15]. The recursive definition of 2-trees implies that they have the PEO property. Hence, 2-trees are chordal graphs.

Partial 2-trees are simply subgraphs of 2-trees. The following lemma provides a characterization of partial 2-trees.

Lemma 1 [27]. Partial 2-trees are exactly those graphs having no subgraph homeomorphic toK4.

Series-parallel (SP) graphs are defined recursively as follows.

(1) A graph consisting of two vertices u and v, and a single edge (u, v) is a primitive SP graph with terminals u and v.

(2) If G1 and G2 are two-terminal SP graphs with terminals [u1, v1] and

[u2, v2], respectively, then the graph obtained by either of the following two

opera-tions is an SP graph.

(a) The series composition of G1and G2: identifying v1with u2and specifying

u1 and v2 as the terminals of the resulting graph.

(b) The parallel composition of G1 and G2: identifying u1 with u2 and v1 with v2, and specifying u1 and v1 as the terminals of the resulting graph.

Lemma 2 [10]. Let G be a biconnected undirected graph. G is an SP graph if and only if it contains no subgraph homeomorphic to K4.

From Lemma 1 and Lemma 2, we have:

Lemma 3. G is a partial 2-tree if and only if each block of G is an SP graph. A characterization of SP graphs can be obtained by using the following defini-tions of two inverse operadefini-tions of series and parallel composidefini-tions. Suppose that the degree of a vertex w in G is two; the series reduction of two edges in a series, e1=(u, w) and e2=(w, v), is an operation of replacing e1 and e2 with a new edge

(4)

File: DISTL2 145404 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 3449 Signs: 2957 . Length: 52 pic 10 pts, 222 mm

an operation of replacing the two edges with a new edge e=(u, v). The following lemmas give characterizations of SP graphs based on the above reductions.

Lemma 4 [10, 17]. G is an SP graph if and only if G can be reduced to a single edge by a sequence of series and parallel reductions.

Lemma 5 [17]. G is a biconnected SP graph if and only if G can be reduced to any edge of G by a sequence of series and parallel reductions.

It is well known that SP graphs are a class of decomposable graphs which can be decomposed into a set of primitive graphs by using a certain set of composing rules [6]. The decomposition structure of an SP graph can be represented by a decomposition tree.

A decomposition tree T of an SP graph is defined as follows.

(1) The tree consisting of a single node labeled e=(u, v) is a decomposition tree of the primitive SP graph G=([u, v], [(u, v)]).

(2) Let G be the SP graph generated by a composition of two SP graphs, G1

and G2. Then, the decomposition tree T of G is the tree with the root r labeled by

an appropriate composition (S or P, depending on which composition is applied to generate G) and with the roots of T1 and T2as children of r, where T1and T2are

decomposition trees of G1 and G2, respectively.

It is easy to see that 2-trees are biconnected SP graphs. Thus, each 2-tree can be represented by a decomposition tree, which is useful for solving the K-terminal reliability problem in our algorithm.

In this paper, we make use of the binary tree contraction technique described in [1] to reduce a binary tree to the root node by using a sequence of independent vertex removals. This technique can be regarded as a general method for scheduling parallel computations on trees and has been applied to some problems on graphs (including cographs, SP graphs, etc.) and to the evaluation of binary arithmetic computation trees [1, 17]. This technique recursively applies two operations, Prune and Bypass, to a given binary tree. Prune(v) is an operation which removes a leaf node v from the current tree, and Bypass(u) is an operation (which follows a Prune operation) which removes a node u with exactly one child w and then lets the parent of u become the new parent of w.

The algorithm initially numbers the leaves in a left to right order and then repeats the following steps. In each step, the operation pairs Prune and Bypass work only on the leaves with odd index and their parents. Hence, these operation pairs can be performed independently and can delete about half of the leaves and their parents on the binary tree in each step. Therefore, the tree will be reduced to a three-node tree after repeating the steps in Wlog nX times.

Lemma 6 [1]. If the Prune operation and Bypass operation can be performed by one processor in constant time, the binary tree contraction algorithm can be implemented in O(log n) time with O(nlog n) processors on an EREW PRAM, where n is the number of nodes in the input binary tree.

(5)

File: DISTL2 145405 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 3216 Signs: 2448 . Length: 52 pic 10 pts, 222 mm

3. A PARALLEL STRATEGY FOR COMPUTING R(GK) IN 2-TREES

Wald and Colbourn [26] developed a linear time sequential algorithm to solve the K-terminal reliability problem in partial 2-trees. They first transform an arbitrary partial 2-tree into a 2-tree by adding dummy edges with probability measure zero. Then, by reversing a recursive construction process for the given 2-tree G (i.e., repeatedly deleting a vertex with degree two until the remaining graph is a single edge), they use the following method to compute R(GK): when a vertex

with degree two is removed from G, they summarize the information about the tri-angle [x, y, z], where y is the vertex with degree two, on the arcs x  z and z  x prior to deleting y. (Note that two arcs x  z and z  x may have different associated probability measures.) With each arc :=x  z, there are six associated probability measures which summarize the probabilities examined in a subgraph S which has so far been reduced to the arc :. In order to make this paper self-con-tained, we will briefly introduce the probability measures:

1. sc(:) is the probability of obtaining a subgraph of S connecting all the specified vertices K in S in addition to both x and z;

2. dc(:) is the probability of obtaining a subgraph of S in which each specified vertex is connected to x or to z, but there is no path from x to z;

3. yn(:) is the probability of obtaining a subgraph of S not containing z in which all the specified vertices are connected to x;

4. ny(:) is the probability of obtaining a subgraph of S not containing x in which all the specified vertices are connected to z;

5. nn(:) is the probability of obtaining a subgraph of S not containing x or z in which all the specified vertices are connected to one another;

6. none(:) is the probability that S contains no specified vertices.

The initial measures for each arc :=x  z corresponding to an edge e=(x, z) are as follows:

1. sc(:)=Pro(e). 2. dc(:)=1&Pro(e).

3. yn(:)=0 if z # K, 1&Pro(e) otherwise. 4. ny(:)=0 if x # K, 1&Pro(e) otherwise. 5. nn(:)=0.

6. none(:)=0 if x # K or z # K, 1 otherwise.

Let [x, y, z] be a triangle and y be the vertex of degree two. Let L=x  y, R= y  z, M=x  z. Before deleting y, the probabilities are updated for M by using six equations:

1. sc(M )=sc(M ) } (sc(L) } sc(R)+sc(L) } dc(R)+dc(L) } sc(R)+yn(L) } ny(R)) +dc(M ) } sc(L) } sc(R).

2. dc(M )=dc(M ) } (sc(L) } dc(R)+dc(L) } sc(R)+ yn(L) } ny(R)). 3. yn(M )= yn(M ) } (sc(L) } yn(R)+ yn(L) } none(R)).

(6)

File: DISTL2 145406 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 3868 Signs: 3191 . Length: 52 pic 10 pts, 222 mm

4. ny(M )=ny(M ) } (ny(L) } sc(R)+none(L) } ny(R)).

5. nn(M )=nn(M ) } none(L) } none(R)+none(M ) } (nn(L) } none(R) +none(L) } nn(R)+ny(L) } yn(R)).

6. none(M )=none(M ) } none(L) } none(R).

These measures are computed symmetrically for z  x. We repeatedly execute the above process until G is reduced to a single edge (x, y) with arcs :=x  y and its reverse ;= y  x. Finally, the probability R(GK) is taken to be sc(:)+ yn(:)+

ny(:)+nn(:). Note that the same probability can be obtained from ;.

Observing a reduction process generated in the sequential algorithm, we can easily see that the reduction of removing a degree-two vertex is composed of two consecutive reductions: one series reduction, followed by one parallel reduction (for convenience, we call such a reduction a 2-tree reduction). On the other hand, given a decomposition tree T of a 2-tree G, we can also find a set of reducing sequences 2=[$1, $2,..., $k], where each $ican reduce G to a single edge. (We call $ia reducing

sequence corresponding to T.) Consider the following scheme: find some internal node3 + in T whose two children are leaves representing two edges e

1 and e2 of G.

Then, apply some appropriate reduction to e1 and e2 according to the label (P or

S) of +. By the definition of reduction, e1and e2are replaced by a new edge e. Thus, the original graph G becomes another ``smaller'' graph and has the decomposition tree obtained from T by replacing the subtree rooted at + with the new leaf node &e. Clearly, if we repeatedly execute the above scheme, then G can be finally reduced to a single edge. However, during a reduction process generated from T, we cannot ensure that each series reduction will always be followed by a parallel reduction. In Fig. 1, there are two reducing sequences $1=S1, S2, P3, P4 and

$2=S2, S1, P3, P4 corresponding to T. Neither of the sequences is a sequence of 2-tree reductions.

From another point of view, given a reducing sequence $ which can reduce G to a single edge, we can construct a unique decomposition tree T corresponding to $. The construction of T follows the process that reduces G to a single edge by $ [17]. During the reduction process, each edge is associated with a tree structure, and when the reduction process terminates, the tree associated with the single remaining edge is a decomposition tree of G. At the beginning, each edge e of G is associated with a tree consisting of a single node labeled e. When a series (respectively, parallel) reduction is applied to two edges, e1 and e2, we create a new node +

labeled S (respectively, P) and let the trees associated with e1and e2be the children

of +.

Combining the points of the above discussion, we know that any decomposition tree representing G corresponds to a set of reducing sequences. Moreover, since each reducing sequence corresponds to a unique decomposition tree, the set of all the reducing sequences can be partitioned into several disjoint subsets so that each

3To avoid unnecessary confusion, we use Greek letters to denote the vertices of T in order to

dis-tinguish them from the vertices of G; and, throughout this paper, we call the vertices of T ``nodes'' and call those of G ``vertices''.

(7)

File: 740J 145407 . By:SD . Date:19:06:98 . Time:10:40 LOP8M. V8.B. Page 01:01 Codes: 2654 Signs: 1967 . Length: 52 pic 10 pts, 222 mm

FIG. 1. A decomposition tree T of G corresponding to a reducing sequence $=S1, S2, P3, P4.

subset consists of those reducing sequences corresponding to the same decomposi-tion tree. In particular, if T corresponds to a sequence of 2-tree reducdecomposi-tions, we call T a canonical tree. By definition, each 2-tree contains a canonical tree as its decom-position tree. However, not every decomdecom-position tree is canonical. For example, the tree shown in Fig. 1 is not canonical. In order to apply the tree contraction techni-que to compute R(GK) efficiently, our method (described in section 3.3) requires

that the given decomposition tree be canonical. In the following, we will describe some properties of canonical trees and give a method for transforming any decom-position tree into a canonical one.

3.1. Properties of Canonical Trees

Suppose that T is a decomposition tree of a 2-tree G. For each internal node & of T, let T(&) denote the subtree of T with & as the root, and let G(&) denote the subgraph of G with T(&) as its decomposition tree. The following results give some characterizations of T which are useful for constructing canonical trees.

Lemma 7. Suppose that T is a decomposition tree of a 2-tree G. There is no S node & in T such that one child + of & is also an S node

Proof. Assume that & and + are both S nodes. Let | be the other child of &. By definition, G(&) is an SP graph, with two terminals a and b, obtained by applying a series composition to G(+) and G(|) with terminals [a, b$] and [b$, b], respec-tively. Similarly, G(+) is obtained from two SP graphs G1 and G2 with terminals

[a, a$] and [a$, b$], respectively, by means of a series composition. Clearly, we can find three induced paths of G1, G2, and G(|) which are between a, a$; a$, b$; and

b$, b, respectively. Since G is biconnected, there exists another induced path between a and b passing through no vertices of G1, G2, and G(|). Hence, there is a cycle

(8)

File: DISTL2 145408 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 3642 Signs: 3117 . Length: 52 pic 10 pts, 222 mm

C contributed by the above four induced paths. Moreover, by observing the process of generating G(&) from T(&), we can find that there is no chord in C. Thus, C is an induced cycle with a length of at least four, which contradicts that G is a 2-tree. K

Lemma 8. Suppose that T is a decomposition tree of a 2-tree G. T is a canonical tree if and only if each P node of T has two children: one is an S node, and the other is a P node or a leaf node.

Proof. We will first prove the if part. If each P node satisfies the condition described in this lemma, we can show by induction on k, the number of P nodes, that T corresponds to a sequence of 2-tree reductions. The base case for T contain-ing a scontain-ingle node representcontain-ing a primitive 2-tree is trivially correct. Assume that the lemma is correct when the number of P nodes is less than k. Now, suppose that T has k P nodes. Consider a P node & with the largest level in T (the level of & is defined as the distance between & and the root of T ). By the assumption of this lemma and the selection rule of &, the vertex & has two children: one is an S node +, and the other is a leaf node representing an edge of G. Clearly, each child of + is neither a P node (by the selection rule of &) nor an S node (by Lemma 7); thus, both children of + are leaf nodes. Hence, T(&) corresponds to a 2-tree reduction which can reduce a triangle G(&) to an edge e. By replacing T(&) in T with a node representing e, we can further find a 2-tree reducing sequence from the resulting tree, which can reduce the graph G&G(&)+e to an edge by the induction hypothesis. Therefore, T corresponds to a 2-tree reducing sequence; thus, it is a canonical tree.

As for the only if part, consider a canonical tree of G. By definition, the tree corresponds to a 2-tree reducing sequence. Based on the scheme for constructing the unique decomposition tree from a reducing sequence, it is clear that the constructed tree of the 2-tree reducing sequence has the desired structure characterizations. K

A t-fan is a 2-tree with the vertex set V=[x, y1, y2,..., yt, z] and the edge set

E=[(x, z), (x, y1), ( y1, z), (x, y2), ( y2, z),..., (x, yt), ( yt, z)]. The graph shown in

Fig. 1 is a 2-fan.

Lemma 9. Suppose that T is a decomposition tree of a 2-tree G. If T contains no P node whose parent is an S node, then T is a decomposition tree of a t-fan.

Proof. By the assumption and Lemma 7, each S node contains no P or S node as a child. Hence, the two children of each S node in T are both leaves. Let & be the root of T, and let x and z be the two terminals of G(&)=G. Note that & must be a P node since G is biconnected. We will further show that the two children of each S node represent two edges (x, y) and ( y, z) of G.

Assume that the two children of an S node + represent edges (x$, y) and ( y, z$) with either x${x or z${z. Without loss of generality, assume that x${x. Notice that x$ is a terminal of G(+) but not a terminal of G(&). By the composition process of generating G(&) from G(+), a series composition must be worked on x$. This implies that the node + has an ancestor | in T(&) which is an S node. If |= par(+),

(9)

File: DISTL2 145409 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 3724 Signs: 2844 . Length: 52 pic 10 pts, 222 mm

this contradicts that G is a 2-tree by Lemma 7. Hence, we conclude that there is some P node whose parent is the S node |, which contradicts the assumption.

Let : be a P node with the largest level in T(&). Then, one of the children of : must be an S node (otherwise, G contains multiple edges). From the above result, we know that the corresponding parallel composition of : must apply to two sub-graphs of G with terminals x and z. By induction on the number of P nodes, it can be shown that each P node in T(&) has the same property. Hence, G is a t-fan, where t is the number of S nodes of T(&). K

3.2. An Algorithm for Constructing a Canonical Tree

In the following, we shall develop an algorithm which can transform an arbitrary decomposition tree into a canonical tree. Before proceeding to the description of the algorithm, we will give some definitions.

Let sib(&) (respectively, par(&)) denote the sibling (respectively, parent) of & for each internal node & of T. Recall that each S node & represents an SP graph G(&) which is constructed by applying a series composition to two SP graphs G1and G2.

By definition, there exists a vertex of G(&) which is a terminal of both G1and G2. We call such a vertex the joint-vertex of G(&).

Algorithm ConstructaCanonicalTree

Input: An arbitrary decomposition tree T of a given 2-tree. Output: A canonical tree T $.

Step 1. For each S node & of T, find, in parallel, the joint-vertex and the two terminals of G(&).

Step 2. For each S node & of T with joint-vertex y and two terminals x and z, construct, in parallel, a tree-structure t&as follows: make a P node r as the root of

t&; let the edge (x, z) and the three-node subtree, obtained by making an S node with two children (x, y), ( y, z), be the two children of r. We call t&the

tree-struc-ture corresponding to (x, z).

V Note that each t& is a decomposition tree corresponding to a 2-tree reduction.

Such a reduction can reduce the triangle [x, y, z] to edge (x, z). V Step 3.  V Construct a canonical tree from a set of tree-structures V

3-1. For each edge e of G, find, in parallel, the k (k0) tree-structures corresponding to e. If k2, assign an arbitrary order 1,..., k to those tree-structures. Let t&idenote the tree-structure corresponding to e with order i (note that t&i

con-tains a leaf node +erepresenting edge e). Then, replace +eof t&iwith the

tree-struc-ture t&i+1for all 1ik&1.

V After execution of step 3-1, the resulting trees form a forest F. Each tree-structure in F is a decomposition tree of some t-fan. Moreover, for each edge in G, there exits at most one tree-structure in F corresponding to it. V

3-2. For each leaf &e of the tree-structures in F, replace, in parallel, &ewith

the unique tree-structure which corresponds to e (exclusive of the one containing &e) if such a tree-structure exists in F.

(10)

File: 740J 145410 . By:SD . Date:19:06:98 . Time:10:41 LOP8M. V8.B. Page 01:01 Codes: 2070 Signs: 1506 . Length: 52 pic 10 pts, 222 mm

Figure 2 shows an example of constructing a canonical tree of a 2-tree G with six vertices. The decomposition tree shown in Fig. 2(a) contains four S nodes. Thus, after executing Step 2, four tree-structures t&, t+, t|, t{are generated as shown in

Fig. 2(b). Each dashed arrow in Fig. 2(b) represents a replacement executed in Step 3. For example, since t& and t+ correspond to the same edge (a, b), a replacement

is executed in Step 3-1. Now, we will show the correctness of the algorithm. Now, we will show the correctness of the algorithm.

Theorem 1. Given an arbitrary decomposition tree T of a 2-tree G, algorithm ConstructaCanonicalTree can correctly construct a canonical tree T$ of G.

Proof. We will prove this by induction on k, the number of the S nodes of T. The base case (k=0) for T containing a single node which represents a primitive 2-tree (an edge) is trivially correct. Assume that the theorem is correct when the number of S nodes is less than k. Now, suppose that T contains k S nodes.

If the structure of T satisfies the conditions of Lemma 9, then T is a decomposi-tion tree of a t-fan. Clearly, by executing Steps 1, 2, and 3-1 of the algorithm, a canonical tree will be constructed correctly by Lemma 8.

Otherwise, assume that T does not satisfy the condition of Lemma 9. Hence, there exists an S node with one child & which is a P node. Clearly, G(&) contains

FIG. 2. (a) A 2-tree G with its decomposition tree T. (b) A canonical tree T $ can be constructed by our algorithm.

(11)

File: DISTL2 145411 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 4059 Signs: 3621 . Length: 52 pic 10 pts, 222 mm

no induced four cycle; hence, G(&) is chordal and a biconnected SP, which implies that it is a non-primitive 2-tree with the decomposition tree T(&). Let a and b be the two terminals of G(&). We can easily observe that (a, b) is an edge of G(&). Moreover, since par(&) is an S node, there is no other S node + in T&T(&) (i.e., by removing T(&) from T ) with a and b as the two terminals of G(+). For the time being, we can assume that the S nodes in T(&) and T&T(&) are manipulated separately by the algorithm since any two tree-structures generated for an S node in T(&) and another S node in T&T(&) cannot correspond to the same edge. Now, both T(&) and T&T(&) contain less than k S nodes. By the induction hypothesis, our algorithm can construct a canonical tree T1 of G(&) and a canonical tree T2of

G&G(&)+(a, b). Note that T1 must correspond to edge (a, b) and that T2 has a leaf representing (a, b). Therefore, after execution of Step 3-2, a canonical tree T $ of G will be generated by replacing (a, b) in T2with T1. K

To achieve efficient parallel implementation of this algorithm, we first transform the given 2-tree (an SP graph) into a directed SP (DSP) graph. The definition of DSP graphs is similar to that of SP graphs except that two terminals of each DSP are considered to be ordered as left and right terminals; the left and right terminals of the primitive DSP ([a, b], [a  b]) are a and b, respectively; the series composi-tion of two DSP graphs is operated by identifying the left terminal of one graph with the right of the other; the parallel composition is operated by identifying the left (respectively, right) terminal of one graph with the left (respectively, right) of the other. The definition of decomposition trees of DSP graphs is similar to that of SP graphs. The transformation can be done by using the algorithm presented in [12] to compute an st numbering: First, select the end vertices of an arbitrary edge of G as s and t, assign an st numbering \ to G, and then transform G into a directed graph by replacing each edge (a, b) with arc a  b if \(a)<\(b). Let G9\

denote such a directed graph. The transformation takes O(log n) time with C(m, n) processors on a CRCW PRAM. He [17] has shown that G9\is a DSP graph. From

now on, we sometimes may regard the given 2-tree (or partial 2-tree in the following sections) as such a DSP graph if an st numbering is given, and we may use the notation G instead of G9\for convenience whenever no ambiguity occurs.

Eppstein [11] developed a parallel algorithm for recognizing DSP graphs and constructing their decomposition trees in O(log n) time with C(m, n) processors on a CRCW PRAM. We utilize Eppstein's algorithm to construct a decomposition tree T for the given ``directed'' 2-tree and use T as the input decomposition tree of our algorithm. The constructed tree T has a property which is crucial for implementing Step 1: For each internal node & of T with two children + and |, the left (respectively, right) terminal of G(&) is the minimum (respectively, maximum) st number of ter-minals of G(+) and G(|). (This property is obvious since the DSP is constructed according to the s-t numbering.)

In the following, we will first describe a bottom-up sequential algorithm to imple-ment Step 1 and then describe its parallel impleimple-mentation. Suppose that T is a decomposition tree of a given 2-tree G. Initially, we maintain an ordered pair ( a, b) for each leaf of T, where a and b are the st numbers of the left and right terminals of a primitive 2-tree, respectively (thus, a<b). The algorithm processes T

(12)

File: DISTL2 145412 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 3787 Signs: 3253 . Length: 52 pic 10 pts, 222 mm

from the leaves to the root # level by level: For each internal node & which has two children + and sib(+) associated with the ordered pairs ( a, b) and ( c, d), respec-tively, maintain an ordered pair ( min(a, c), max(b, d)) for &. We repeatedly execute the above scheme until the root # is processed. Thus, for each node &, the two ter-minals (and the joint-vertex as well) of G(&) can be obtained from the above algo-rithm. The correctness of the above algorithm can be easily proved by induction on the number of vertices of G.

To implement in parallel the above computation, we initially maintain an ordered pair ( a, b) for each leaf of T and assign, for each internal node & of T, an ordered pair ( , &). During execution of tree contraction for contracting some leaf & and par(&)=+ (i.e., a prune operation on &, followed by a bypass operation on +), we assume that ( a, b), ( e, f ), and (c, d) are ordered pairs of +, &, and sib(&), respectively. After executing the contraction, the ordered pair ( min-(min(a, e), c), max(max(b, f ), d )) is maintained for sib(&). It is easy to verify that the above computation satisfies the conditions of applying tree contraction (i.e., the binary operators min and max are associative [18]). After executing the above algorithm, the root # of T will be associated with an ordered pair containing two elements, which are the two terminals of G(#)=G. By modifying slightly the tree contraction algorithm, the desired ordered pair for each internal node of T can be computed without increasing the time-processor complexity of the algorithm [1]. Hence, Step 1 can be done correctly in O(log n) time with O(nlog n) processors on an EREW PRAM by Lemma 6.

Clearly, Step 2 can be done in O(1) time with O(k) processors, where k is the number of S nodes in T. This can be simulated in O(log k) time with O(klog k) processors based on Brent's theorem [8]. Throughout this paper, in all the implementations which take O(1) time with O(k) processors, Brent's theorem can be applied to achieve the above time-processor complexity.

As for the implementation of Step 3-1, we first remove leaves and those edges (+, &) from T where + is a child of & and & is an S node. Let T be the resulting forest. According to Lemma 7 and the proof in Lemma 9, we can see that the nodes of each tree in T are exactly those nodes having the same terminal pair. For each tree in T, we can assign an order to the S nodes of the tree by first finding an order (any order such as preorder or postorder) of the nodes in the tree and then using a prefix-sums computation. Both the ordering operation and the prefix-sums com-putation can be solved optimally [18]. With these orders, Step 3-1 can be implemented in O(1) time with O(m) processors. Hence, the bottleneck is the operation of finding components of T. Step 3-2 can be implemented in O(1) time with O(m) processors. Combining these results, we have the following theorem.

Theorem 2. The algorithm ConstructaCanonicalTree can be implemented in O(log n) time with C(m, n) processors on a CRCW PRAM.

Corollary 1. A 2-tree G can be correctly recognized in O(log n) time with C(m, n) processors on a CRCW PRAM. Moreover, its perfect elimination ordering can be computed within the same bounds.

(13)

File: DISTL2 145413 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 3863 Signs: 3251 . Length: 52 pic 10 pts, 222 mm

Proof. Based on the algorithm presented in [11] and the property that each 2-tree contains exactly 2n&3 edges [14], we can easily recognize a 2-tree by checking whether an input graph is a biconnected partial 2-tree with 2n&3 edges. The time-processor complexity is bounded by the recognition algorithm in [11], which takes O(log n) time with C(m, n) processors on a CRCW PRAM. Moreover, after execut-ing the recognition algorithm, a decomposition tree T of G can be constructed. By implementing Step 1 of the algorithm ConstructaCanonicalTree, we can com-pute, for each S node of T, its joint-vertex. Then, a perfect elimination ordering of G can be computed in the following way: First, traverse T in postorder and assign to each node of T a postorder number. Then, order the joint-vertices of the S nodes in T from 1 to n&2 according to their post-ordered numbers. Finally, after assign-ing arbitrarily two numbers n&1 and n to the remainassign-ing unordered vertices in G, we have a PEO of G. (Note that each vertex is the joint-vertex of some S node in T except for the two terminals u and v of G, where (u, v) is an edge of G.) The correctness can be easily shown by induction on the number of S nodes of T. Clearly, the above method can be implemented by using the EulerTour technique and parallel prefixsums computation [18]. K

Adhar and Peng [2] presented a parallel algorithm for k-tree recognition by using Klein's algorithm [19] to compute a perfect elimination order for chordal graphs (note that each k-tree is chordal) [19]. It takes O(log2n) time with

O(m+n) processors on a CRCW PRAM. Hence, the above result shows that the recognition and the computation of a PEO for k-trees can be improved when k=2.

3.3. Rules for Computing R(GK)

From the sequential algorithm described at the beginning of Section 3, we observe that each undirected edge (x, z) is initially associated with two probability measures for two arcs x  z and z  x. During each removal of degree-2 vertex y of a triangle [x, y, z], the corresponding probability measures are summarized for arcs x  z and z  x. As a matter of fact, we can in advance orient the edges of G in some way to make G become a directed graph G9. Then, G9 can be reduced to one arc by repeatedly removing a degree-2 vertex (in-degree=out-degree=1) y of a triangle [x, y, z] (with the arcs x  y, y  z, and x  z) until one arc remains. Hence, for each edge of G, we may summarize its probability measures only once, which reduces by half the number of computations of the sequential algorithm. Given an undirected 2-tree G, such an orientation can be achieved by using an st numbering. (We have described the orientation in the implementation of the algo-rithm ConstructaCanonicalTree.) The correctness of the above method can be easily verified by induction on the number of vertices of G.

Once a canonical tree T is constructed, we can compute R(GK) of a 2-tree by

dividing each 2-tree reduction into one series reduction, followed by one parallel reduction. When a series reduction is applied to two edges, e1=x  y and

e2= y  z, to form the edge e3=x  z, we use Rule A (described below) to

(14)

File: DISTL2 145414 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 2603 Signs: 1709 . Length: 52 pic 10 pts, 222 mm

sequential algorithm in [26]) in e3. When a parallel reduction is applied to two

edges e1=e2=x  y, we use Rule B to summarize the probability measures for the

reduced edge x  y.

Let [x, y, z] be a triangle and y be a vertex of degree two, and let L=x  y and R= y  z. The initial measures for each arc e=a  b are defined as follows: sc1=Pro(e); sc2=0; dc=1&Pro(e); yn=0 if b # K or 1 otherwise; ny=0 if a # K

or 1 otherwise; nn1=nn2=0 and none=0 if a # K or b # K, 1 otherwise. Now, we

can formalize both rules as follows: Rule A:

1. sc1(m*)=sc1(L) } sc1(R)+sc1(L) } dc(R)+dc(L) } sc1(R)+ yn(L) } ny(R)

2. sc2(m*)=sc1(L) } sc1(R)

3. dc(m*)=sc1(L) } dc(R)+dc(L) } sc1(R)+ yn(L) } ny(R)

4. yn(m*)=sc1(L) } yn(R)+ yn(L) } none(R)

5. ny(m*)=ny(L) } sc1(R)+none(L) } ny(R)

6. nn1(m*)=none(L) } none(R)

7. nn2(m*)=nn2(L) } none(R)+none(L) } nn2(R)+ny(L) } yn(R)

8. none(m*)=none(L) } none(R),

where m*=x  z is the edge formed by applying a series reduction to edges L and R. Rule B:

1. sc1(M )=sc1(M ) } sc1(m*)+dc(M ) } sc2(m*)

2. sc2(M )=0

3. dc(M )=dc(M ) } dc(m*) 4. yn(M )= yn(M ) } yn(m*) 5. ny(M )=ny(M ) } ny(m*) 6. nn1(M )=0

7. nn2(M )=nn2(M ) } nn1(m*)+none(M ) } nn2(m*)

8. none(M )=none(M ) } none(m*),

where M is an edge of G or an edge formed by applying a parallel reduction, and m* is an edge formed by applying a series reduction.

Finally, when the given 2-tree has been reduced to an edge e, R(GK) is taken to

be sc1(e)+ yn(e)+ny(e)+nn2(e). A bottom-up sequential implementation for

com-puting R(GK) by applying rules A and B on a canonical tree of G is obvious.

Detailed parallel implementation for computing R(GK) by means of tree

contrac-tion is described in the Appendix, and we have the following result: Theorem 3. R(G

K) in 2-trees can be solved in O(log n) time with C(m, n)

(15)

File: DISTL2 145415 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 3289 Signs: 2462 . Length: 52 pic 10 pts, 222 mm

4. A PARALLEL STRATEGY FOR COMPUTING R(Gk)

IN PARTIAL 2-TREES

In this section, we will extend the result described in Section 3 to solve the K-terminal reliability problem in partial 2-trees. The strategy is to first transform a given connected partial 2-tree into a biconnected one and to further transform it into a 2-tree. Thus, the algorithm we have developed in Section 3 can be applied to the resulting 2-tree.

4.1. Transform a Connected Partial 2-Tree into a Biconnected One

In this subsection, we will present a parallel algorithm modified from the sequen-tial algorithm in [26] to transform a connected parsequen-tial 2-tree into a biconnected one by adding dummy edges each with a probability measure of zero. Before presenting the algorithm, we need the following definitions.

Suppose that a1, a2, ..., akare the cut vertices of G and that B1, B2, ..., Blare the

blocks of G. The block tree BT [17] is defined as follows. The vertex set of BT is a1, a2,..., ak, b1, b2,..., bl, and (ai, bj) is an edge of BT if and only if ai is a vertex

of Bj. In addition, we call each bi a block-vertex of BT. It can be shown that BT

is a tree [3]. Let BT$ be the rooted tree formed by selecting one block-vertex brof

BT as the root and assigning directions to the edges. Then, for each block vertex bi (i{r), there is a unique directed path P from bi to the root br. If bj is the first

block-vertex of BT$ encountered when we traverse path P from bi, we call Bj

(respectively, Bi) the parent block (respectively, a child block ) of Bi (respectively,

Bj). In particular, par(Bi) denotes the parent block of Biand we call the block with

no child block the leaf block. Algorithm BecomeBiconnected Input: A connected partial 2-tree. Output: A biconnected partial 2-tree.

Step 1. Find the blocks B1, B2, ..., Bkof a connected partial 2-tree G.

Step 2. V Prepare to add dummy edges V 2-1. Construct the block tree BT of G.

2-2. Transform BT into a rooted tree BT$ by selecting an arbitrary block-vertex bras the root.

V Steps 2-3 and 3 are executed in parallel for each block Bi(i=1,..., k). V

2-3. Find the parent block of Biusing BT $.

Step 3. Arbitrarily select one edge e=(v, w) of Biand an edge (u, v) of par(Bi),

where v is the cut vertex connecting Bito par(Bi). Then, add a dummy edge (w, u)

to G with probability zero.

The resulting graph is a biconnected partial 2-tree since it contains no cut vertex and no homeomorph of K4 is introduced after adding the dummy edges.

(16)

File: DISTL2 145416 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 3382 Signs: 2621 . Length: 52 pic 10 pts, 222 mm

The processor-time complexity of the algorithm is analyzed as follows. In Step 1, finding the blocks of G takes O(log n) time with C(m, n) processors on a CRCW PRAM [12, 24]. In Step 2-1, the block tree BT can be constructed in O(1) time with O(m) processors [17]. Step 2-2 constructs the rooted tree BT$ from BT by using the EulerTour technique described in [18]. It takes O(log k) time with O(klog k) processors on an EREW PRAM, where k is the number of blocks of G. In Step 2-3, the parent block Bjof Bi (1ik) can be found by using BT$ since

bj= par( par(bi)). This can be done in constant time with O(k) processors. In

Step 3, the cut vertex v in Biconnecting to par(Bi) can be determined in O(1) time.

Thus, the selection of some edge of Bi(1ik) and addition of dummy edges can

be done in constant time with O(k) processors. Hence, we have the following theorem.

Theorem 4. Algorithm BecomeBiconnected can correctly transform a connected partial 2-tree G into a biconnected partial 2-tree in O(log n) time with C(m, n) processors on a CRCW PRAM.

4.2. Transform a Biconnected Partial 2-Tree into a 2-Tree

In this subsection, we will present a parallel algorithm to add dummy edges each with probability measure of zero on a given biconnected partial 2-tree G to trans-form it into a 2-tree.

Algorithm Become2-Tree

Input: A biconnected partial 2-tree G with its decomposition tree T. Output: A 2-tree G$ with its decomposition tree T $.

Step 1. Duplicate T to obtain another decomposition tree T $.

V Initially, T $=T. After execution of the algorithm, T$ is a decomposition tree of a 2-tree G$ transformed from G. V

Step 2. For each S node & of T find, in parallel, the two terminals of G(&). Step 3. For each group of S nodes having the same pair of terminals, arbitrarily mark an S node in that group.

Step 4. For each marked S node & with terminals a and b, if (a, b) is not an edge, add it to G and update T $ as follows: Let += par(&). Create a leaf node &e

(corresponding to the edge e=(a, b)) and a P node |, and let & and &e be two

children of | and par(|)=+.

The correctness of the above algorithm can be easily shown by induction on the number of S nodes of T. Now, we will analyze the time-processor complexity of the algorithm.

Step 1 is trivial to implement. In Step 2, the complexity of finding two terminals of each S node has been analyzed in the algorithm ConstructaCanonicalTree. In Step 3, to find the number of S nodes having the same pair of terminals, we can use a similar technique for implementing Step 3-1 of the algorithm Construct aCanonicalTree. Hence, this step needs O(log n) time with C(m, n) processors

(17)

File: DISTL2 145417 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 3493 Signs: 2931 . Length: 52 pic 10 pts, 222 mm

on a CRCW PRAM. In Step 4, checking the existence of edges and adding dummy edges to G can be done in O(1) time with O(k) processors on a CREW PRAM by maintaining an additional data structure, where k is the number of S nodes of T. The addition of these dummy edges and dummy P nodes takes O(1) time with O(k) processors on an EREW PRAM. Therefore, we have the following theorem.

Theorem 5. The algorithm Become2-Tree can correctly transform a bicon-nected partial 2-tree into a 2-tree in O(log n) time with C(m, n) processors on a CRCW PRAM.

After adding the dummy edges, a given biconnected partial 2-tree can be trans-formed into a 2-tree. Thus, the algorithm developed in Section 3 can be used to compute R(GK) for biconnected partial 2-trees, which takes O(log n) time with

C(m, n) processors on a CRCW PRAM.

From the above result and the algorithm developed in Section 4.1, we have the following theorem.

Theorem 6. The K-terminal reliability in partial 2-trees can be solved in O(log n) time with C(m, n) processors on a CRCW PRAM.

5. FINDING MOST VITAL EDGES WITH RESPECT TO K-TERMINAL RELIABILITY

In this section, we will deal with the problem of finding most vital edges with respect to K-terminal reliability in partial 2-trees. The most vital edge is the edge whose deletion yields the largest decrease in K-terminal reliability. Wang and Hsu [28] have presented a linear-time sequential algorithm for finding most vital edges with respect to K-terminal reliability in SP graphs. However, this method seems to be difficult to parallelize to achieve efficient implementation. In the following, we will use a different strategy to develop a parallel algorithm for finding such an edge in partial 2-trees.

Let Pro(G) denote the eight probability measures of G corresponding to sc1, sc2,

dc, yn, ny, nn1, nn2, and none (refer to section 3.3). For convenience, we let

``prob-ability measures'' represent the above eight terms. The main idea of the algorithm is to first compute a special form of the probability measure Pro(G, H ) for some subgraph HG, where Pro(G, H ) is represented by the function f : R8[ R8 such

that once Pro(H ) is known, the probability measures Pro(G) can be computed immediately by using Pro(H ) as input to the function Pro(G, H ). Assume that H is the graph obtained by applying some composition to subgraphs H1and H2of G

(for convenience, we denote H=H1b H2, where b may represent a series or a

parallel composition). By evaluating Pro(H2) in advance (based on a method which

will be described later), we can further transform the original function Pro(G, H ) into another function Pro(G, H1) with the unknown value Pro(H1). Then, we can

repeatedly execute the above process to make the ``unknown'' part become smaller until Pro(G, e) (for convenience, we use the term Pro(G, e) instead of Pro(G, Ge),

(18)

File: DISTL2 145418 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 2979 Signs: 2073 . Length: 52 pic 10 pts, 222 mm

Pro(e)=0 in the computation of Pro(G, e), then R(GK&e) can be obtained

immediately. Now, we will describe in detail our parallel algorithm in four phases. Phase 1. Summarize the probability measures Pro(G(&)) for each internal node &. As described in Section 3, our algorithm computes eight probability measures for the root of T to obtain the final result R(GK)=sc1+ yn+ny+nn2. By modifying

slightly the tree contraction algorithm, the probability measures for all the nodes of T can be computed without increasing the time-processor complexity of the algorithm; this is achieved by reversing the vertex elimination process in the tree contraction algorithm by using some pointers of the bypassed nodes [1].

Phase 2. Compute Pro(G( par(&)), G(&)) for each nonroot node &. In this phase, a copy of Pro(G(&)) computed in Phase 1 is transferred to sib(&) for each internal node & (thus, & can obtain Pro(sib(&)) from sib(&)). Let a=sc1, b=sc2,..., h=none

be the eight probability measures G(sib(&)) computed in Phase 1. We make eight variables xi(for all 1i8) represent eight probability measures, corresponding to

sc1, sc2,..., none, of G(&). Let the left and right terminals (refer to the description of

the implementation of the algorithm ConstructaCanonicalTree in Section 3.2) of G( par(&)) be q1 and q3, respectively, and let the joint-vertex of G( par(&)) be q2 if

par(&) is an S node. We compute Pro(G( par(&)), G(&)) as follows.

Case 1. par(&) is an S node, and the two terminals of G(&) are q1 and q2 (the

case for q2and q3 being that the two terminals of G(&) can be computed similarly). Use Rule A defined in Section 3 to compute eight components of the function Pro(G( par(&)), G(&)) corresponding to sc1, sc2, ..., none as follows:

fsc1=(a+c) } x1+a } x3+e } x4 fsc2=a } x1 fdc=c } x1+a } x3+e } x4 fyn=d } x1+h } x4 fny=a } x5+e } x8 fnn 1=h } x8 fnn2=h } x7+g } x8+d } x5 fnone=h } x8.

Case 2. par(&) is a P node. Use Rule B defined in Section 3 to compute Pro(G( par(&)), G(&)) for & according to the following subcases.

Case 2.1. & is a leaf node or a P node: fsc1=a } x1+b } x3

fsc2=0

fdc=c } x3

fyn=d } x4 fny=e } x5

(19)

File: DISTL2 145419 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 3131 Signs: 2331 . Length: 52 pic 10 pts, 222 mm

fnn1=0

fnn2= f } x7+ g } x8

fnone=h } x8.

Case 2.2. & is an S node: fsc1=a } x1+c } x2 fsc2=0 fdc=c } x3 fyn=d } x4 fny=e } x5 fnn1=0 fnn2=g } x6+h } x7 fnone=h } x8.

Phase 3. Compute Pro(G, G(&)) for each nonroot node & of T. In this phase, we make use of the function Pro(G( par(&)), G(&)) obtained in Phase 2 to compute Pro(G, G(&)). Let Pro(G( par(&)), G(&)) and Pro(G( par( par(&))), G( par(&))) be two functions computed in Phase 2 for & and par(&), respectively. Then, the function Pro(G( par( par(&))), G(&)) for & can be computed by providing Pro(G( par(&)), G(&)) (composed of eight functions corresponding to sc1, sc2,..., none) as an input

of Pro(G( par( par(&))), G( par(&))). For the sake of brief description, we call the above operation a substitution of &. It is easy to verify that each of the eight com-ponents of the function Pro(G( par( par(&))), G(&)) is still a polynomial of eight variables such that the polynomial is expressed as the sum of degree one sub-polynomials. In the following, we will apply the two-pass parallel tree contraction technique to compute Pro(G, G(&)).

The first pass, namely forward pass, is the standard tree contraction process which repeatedly contracts a given binary tree until a three-node tree remains. Dur-ing the execution of this pass, when some leaf node +eand its parent are contracted,

we execute a substitution for sib(+e). For convenience, let sib(+e)=+, par(+e)=&,

and par( par(+e))=|. Through substitution, the function computed for + is

Pro(G(|), G(+)) (see Fig. 3(a)). After the computation of this pass, the resulting tree consists of the root # with the two children, denoted by &eand &e$, which are

two leaves of T, respectively. Moreover, the functions computed for &eand &e$ are Pro(G, G(&e))=Pro(G, e), and Pro(G, e$).

The second pass, namely the backward pass, is the reverse of the tree contraction algorithm; that is, it restores the three-node tree to the original tree T. Since in the forward pass, +eis contracted before its parent &, & will be restored before +ein the

backward pass. During the execution of this pass, when nodes & and +eare restored

consecutively, we perform the following operation.

Case 1. |{#. We first execute a substitution for & and then execute one for +e.

(20)

File: 740J 145420 . By:SD . Date:19:06:98 . Time:10:41 LOP8M. V8.B. Page 01:01 Codes: 1681 Signs: 1165 . Length: 52 pic 10 pts, 222 mm

FIGURE 3

(this result can be observed from the process of computation), the functions Pro(G, G(&)) and Pro(G, G(+e))=Pro(G, e) are computed for & and +e after the

above operation, respectively (see Fig. 3(b)).

Case 2. |=#. We only execute a substitution for +e during the process of

restoring & and +e. Note that the function Pro(G(#), G(&))=Pro(G, G(&)) has been

computed for par(+e) in Phase 2. Thus, the function computed for +e after this

operation is Pro(G, e).

We can show by induction that after T is restored completely, the function Pro(G, G(&)) will be computed for each nonroot node &.

Phase 4. Evaluate R(GK&e) for each edge e. Since Pro(G, G(&e)) for each leaf

node &e of T has been computed in Phase 3, for each &e representing an edge

e=(a, b) of G, we let Pro(e)=0 and set the following values from the equations defined in Section 3 as sc1=Pro(e)=0; sc2=0; dc=1&Pro(e)=1; yn=0 if b # K

or 1 otherwise; ny=0 if a # K or 1 otherwise; nn1

=nn2

=0 and none=0 if a # K or b # K, 1 otherwise. Then, we use these values to evaluate Pro(G, e) and obtain R(GK&e) as sc

1

+ yn+ny+nn2

. Hence, the most vital edge is the edge with the smallest reliability value.

(21)

File: DISTL2 145421 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 3170 Signs: 2620 . Length: 52 pic 10 pts, 222 mm

The correctness of the algorithm is straightforward from the computation of those functions described in the previous phases. We will only analyze the time-processor complexity of the algorithm.

Phase 1 takes O(log n) time with O(nlog n) processors on an EREW PRAM. In Phase 2, each internal node & of T sends its label (S or P) to its children. Then, each nonroot node sends its probability measures (computed in Phase 1) to its sibling. Clearly, the computation of this phase can be done in O(log n) time with O(nlog n) processors.

In Phase 3, it is not difficult to verify that the operation ``substitution'' takes con-stant time with one processor. Since each computation of each component of the function Pro(G, H) remains a sum of degree one polynomials (at most eight terms) during the whole computation, this phase needs O(log n) time with O(nlog n) pro-cessors on an EREW PRAM by Lemma 6.

In Phase 4, the problem of finding the smallest reliability-function value among all the leaves of T can be easily solved in O(log n) time with O(nlog n) processors on a CRCW PRAM [18]. Combining the previous results and this algorithm, we have the following theorem.

Theorem 7. The most vital edge with respect to the K-terminal reliability of a partial 2-tree can be found correctly by the algorithm in O(log n) time with C(m, n) processors on a CRCW PRAM.

CONCLUSIONS

In this paper, we have developed some parallel algorithms for computing K-terminal reliability in 2-trees and partial 2-trees. Moreover, we have also solved the problem of finding most vital edges in partial 2-trees. One contribution of this paper has been to provide a systematic way to construct a canonical tree for a given 2-tree. In addition to computing K-terminal reliability, there are some other problems on 2-trees, such as finding Steiner trees [27], and finding biconnected Steiner minimal networks [30], which need to summarize some useful information during the process of reducing G by a 2-tree reducing sequences. By providing a canonical tree of a given 2-tree, these problems can be solved using our strategy in a similar way. Moreover, they can also be solved on partial 2-trees by using our transformation method.

APPENDIX

This Appendix describes in detail the implementation of tree contraction in the measurement of R(Gk) in 2-trees.

Given a canonical tree T we initially assign an identity matrix A&with size 8_8

to each node & of T, and the probability measures represented by a matrix p&ewith

size 8_1 to each leaf node &erepresenting an edge e of G. The matrices A&and p&e

(22)

File: DISTL2 145422 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 2889 Signs: 1483 . Length: 52 pic 10 pts, 222 mm

A&= sc1 1 0 0 0 0 0 0 0 sc2 0 1 0 0 0 0 0 0 dc 0 0 1 0 0 0 0 0 yn 0 0 0 1 0 0 0 0 ny 0 0 0 0 1 0 0 0 nn1 0 0 0 0 0 1 0 0 nn2 0 0 0 0 0 0 1 0 none 0 0 0 0 0 0 0 1 p& e= sc1(e) sc2(e) dc(e) yn(e) ny(e) nn1(e) nn2(e) none(e)

Initially, we let sc2(e) and nn1(e) be zero and let sc1(e)=sc(e) and nn2(e)=nn(e);

the other values are the same as in the equations defined in Section 3.

Assume that &eis some leaf node which will be pruned during execution of the

tree contraction algorithm. In the following cases, we will describe the method for reserving useful information on sib(&e) when &eand par(&e)=+ are contracted. We

build a matrix for + to reserve the probability measures of G(&e)=e, and this

matrix will be combined with the matrices of + and sib(&e) by means of matrix

multiplication.

We will only describe the method for building a matrix AS for series reduction

(i.e., + is an S node). The matrix AP for parallel reduction can be obtained in a

similar way. Let the left and right terminals of G(+) be q1 and q3, respectively, and

let the joint-vertex of G(+) be q2. Assume that the two terminals of G(&e) are q1and

q2 (the case that q2 and q3 are the two terminals of G(&e) can be computed similarly). We build AS for + as follows. Let ai, 1i8, denote the (1, i) entry of

AS, and let bi, ci, ..., hi denote (2, i), (3, i), ..., (8, i) entries of AS, respectively. The

elements in AS are derived from Rule A defined in Section 3. Since

sc1(m*)=sc1(L) } sc1(R)+sc1(L) } dc(R)+dc(L) } sc1(R)+ yn(L) } ny(R)

(23)

File: DISTL2 145423 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 2616 Signs: 977 . Length: 52 pic 10 pts, 222 mm

we let

a1=sc1(L)+dc(L), a3=sc1(L), and a5= yn(L).

Similarly, we define the other elements of AS as follows:

sc2(m*)=sc1(L) } sc1(R)=b

1} sc1(R)

dc(m*)=sc1(L) } dc(R)+dc(L) } sc1(R)+yn(L) } ny(R)

=c1} sc1(R)+c3} dc(R)+c5} ny(R)

yn(m*)=sc1(L) } yn(R)+yn(L) } none(R)=d

4 } yn(R)+d8} none(R)

ny(m*)=ny(L) } sc1(R)+none(L) } ny(R)=e

1} sc1(R)+e5} ny(R)

nn1(m*)=none(L) } none(R)= f

8} none(R)

nn2(m*)=nn2(L) } none(R)+none(L) } nn2(R)+ny(L) } yn(R)

= g4} yn(R)+ g7} nn2(R)+ g8} none(R)

none(m*)=none(L) } none(R)=h8} none(R), where L=(q1, q2) and R=(q2, q3).

Then, AS is obtained as follows:

AS= sc1 a 1 0 a3 0 a5 0 0 0 sc2 b 1 0 0 0 0 0 0 0 dc c1 0 c3 0 c5 0 0 0 yn 0 0 0 d4 0 0 0 d8 ny e1 0 0 0 e5 0 0 0 nn1 0 0 0 0 0 0 0 f 8 nn2 0 0 0 g 4 0 0 g7 g8 none 0 0 0 0 0 0 0 h8

Now, we will describe the two procedures Prune(&) and Bypass(+), which are used in the parallel tree contraction algorithm to compute R(GK).

Procedure Prune(&)

V compute the matrix A+ for + after & is pruned *

p& A&} p&; V compute the probability measures of G(&) *

Case the node type of + begin

(24)

File: DISTL2 145424 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 5871 Signs: 1975 . Length: 52 pic 10 pts, 222 mm

case 1: + is an S node

Compute ASfor + from p&;

A+ A+} AS;

case 2: + is a P node

Compute AP for + from p&;

A+ A+} AP;

endV end-of-case V Delete &;

end.

Procedure Bypass(+)

V compute the matrix Asib(&) for sib(&) after + is bypassed V

begin

Asib(&) A+} Asib(&);

par(sib(&))  par(+); Delete +;

end.

Since the procedures Prune and Bypass can be carried out in constant time with one processor, this algorithm can be executed in O(log n) time with O(nlog n) pro-cessors on an EREW PRAM by Lemma 6.

REFERENCES

1. K. Abrahamson, N. Dadoun, D. G. Kirkpatrick, and T. Przytycka, A simple parallel tree contrac-tion algorithm, J. Algorithms 10 (1989), 287302.

2. G. S. Adhar and S. Peng, Parallel algorithms for k-tree recognition and its applications. Proceedings of the 27 annual Hawaii international conference on system science, IEEE Computer Society, Los Alamitos, CA, 1994, 194201.

3. A. V. Aho, J. E. Hopcroft, and J. D. Ullman, ``The Design and Analysis of Computer Algorithms,'' AddisonWesley, Reading, MA, 1974.

4. S. G. Akl, ``The Design and Analysis of Parallel Algorithms,'' PrenticeHall, Englewood Cliffs, NJ, 1989.

5. M. O. Ball, Complexity of network reliability computations, Networks 10 (1980), 153165. 6. M, W. Bern, E. L. Lawler, and A. L. Wong, Linear-time computation of optimal subgraphs of

decomposable graphs, J. Algorithms 8, 2 (1987), 216235.

7. J. A. Bondy and U. S. R. Murty, ``Graph Theory with Applications,'' North-Holland, New York, 1980. 8. R. Brent, The parallel evaluation of general arithmetic expressions, J. Assoc. Comput. Mach. 21, 2

(1974), 201206.

9. R. Cole and U. Vishkin, Approximate parallel scheduling, II: applications to logarithmic-time optimal parallel graph algorithms, Inform. Comput. 92 (1991), 147.

10. R. J. Duffin, Topology of series parallel networks, J. Math Anal. Appl. 10 (1965), 303318. 11. D. Eppstein, Parallel recognition of series-parallel graphs, Inform. Comput. 98 (1992), 4155.

(25)

File: DISTL2 145425 . By:DS . Date:30:06:98 . Time:14:10 LOP8M. V8.B. Page 01:01 Codes: 7927 Signs: 2536 . Length: 52 pic 10 pts, 222 mm

12. D. Fussell, V. Ramachandran, and R. Thurimella, Finding triconnected components by local replacement, SIAM J. Comput. 22, 3 (1993), 587616.

13. M. R. Garey and D. S. Johnson, ``Computers and Intractability: A Guide to the Theory of NP Completeness,'' Freeman, San Francisco, 1979.

14. D. Garnot and D. Skorin-Kapov, NC algorithms for recognizing partial 2-trees and 3-trees, SIAM J. Discrete Math. 4, 3 (1991), 342354.

15. M. C. Golumbic, ``Algorithmic Graph Theory and Perfect Graphs,'' Academic Press, San Diego, 1980.

16. E. Hare, S. Hedetniemi, R. Laskar, K. Peters, and T. Wimer, Linear-time computability of com-binatorial problems on generalized series-parallel graphs, in ``Discrete Algorithms and Complexity,'' 437455, Academic Press, San Diego, 1987.

17. X. He, Efficient parallel algorithms for series parallel graphs, J. Algorithms 12 (1991), 409430. 18. J. JaJa, ``An Introduction to Parallel Algorithms,'' AddisonWesley, Reading, MA, 1992.

19. P. N. Klein, Efficient parallel algorithms for chordal graphs, SIAM J. Comput. 25, 4 (1996), 797827.

20. T. Politof and A. Satyanarayana, Efficient algorithms for reliability analysis of planar networks-survey, IEEE Trans. on Reliability 35, 3 (1986), 252258.

21. J. S. Provan and M. O. Ball, The complexity of counting and of computing the probability that a graph is connected, SIAM J. Comput. 12 (1983), 777788.

22. J. S. Provan, The complexity of reliability computations in planar and acyclic graphs, SIAM J. Comput. 15 (1986), 694702.

23. A. Satyanarayana and R. K. Wood, A linear-time algorithm for computing K-terminal reliability in serial-parallel networks, SIAM J. Comput. 14 (1985), 818832.

24. R. E. Tarjan and U. Viskin, An efficient parallel biconnectivity algorithm, SIAM J. Comput. 14, 862874.

25. L. G. Valiant, The complexity of enumeration and reliability problems, SIAM J. Comput. 8 (1979), 410421.

26. J. A. Wald and C. J. Colbourn, Steiner trees in probabilistic networks, Microelectron. Reliability 23, 5 (1983), 837840.

27. J. A. Wald and C. J. Colbourn, Steiner trees, partial 2-trees and minimum IFI networks, Networks 13 (1983), 159167.

28. P. F. Wang and L. H. Hsu, Finding the most vital edge with respect to K-terminal reliability in series-parallel networks, Comput. and Indust. Engrg. 25, (1993), 457460.

29. T. V. Wimer and S. T. Hedetniemi, K-terminal recursive families of graphs, Congr. Numer. 63 (1988), 161176.

30. P. Winter, Generalized Steiner problem in series-parallel networks, J. Algorithms 7 (1986), 549566.

數據

FIG. 1. A decomposition tree T of G corresponding to a reducing sequence $=S 1 , S 2 , P 3 , P 4 .
Figure 2 shows an example of constructing a canonical tree of a 2-tree G with six vertices

參考文獻

相關文件

In summary, the main contribution of this paper is to propose a new family of smoothing functions and correct a flaw in an algorithm studied in [13], which is used to guarantee

A clever and simplifying strategy: pairing up all the rays coming through the slit and then finding what conditions cause the waves of the rays in each pair to cancel each other.

In order to solve the problems mentioned above, the following chapters intend to make a study of the structure and system of The Significance of Kuangyin Sūtra, then to have

The Model-Driven Simulation (MDS) derives performance information based on the application model by analyzing the data flow, working set, cache utilization, work- load, degree

• For novice writers, a good strategy is imitation: choose a well-written paper that is of a similar flavor, analyze its organization, and sketch an organization for your results

• Definition: A binary tree is a finite set of nodes that is either empty or consists of a root and two disjoint binary trees called the left subtree and t he right subtree2.

As n increases, not only does the fixed locality bound of five become increasingly negligible relative to the size of the search space, but the probability that a random

ƒ Regardless of terminal or network logins, the file descriptors 0, 1, 2 of a login shell is connected to a terminal device or a pseudo- terminal device. ƒ Login does