Linear-time algorithms for computing the reliability of bipartite and (#⩽2) star distributed computing systems

Linear-time algorithms for computing the reliability of bipartite and (#⩽2) star distributed computing systems

Available online at www.sciencedirect.com Computers & Operations Research 30 (2003) 1697 – 1712 www.elsevier.com/locate/dsw Linear-time algorithms ...

187KB Sizes 0 Downloads 62 Views

Available online at www.sciencedirect.com

Computers & Operations Research 30 (2003) 1697 – 1712

www.elsevier.com/locate/dsw

Linear-time algorithms for computing the reliability of bipartite and (# 6 2) star distributed computing systems Min-Sheng Lin Department of Electrical Engineering, National Taipei University of Technology, 1. Sec. 3, Chung-Hsiao E. Rd., Taipei 106, Taiwan Received 1 December 2001; received in revised form 1 June 2002

Abstract Let S = (V; F) denote a distributed computing system with star topology, where V is the set of nodes of S and F is the set of 0les distributed in V . The problem of computing the reliability of S has been shown to be #P-complete. Therefore, all known exact algorithms for this problem have exponential time complexity. This study presents two linear-time algorithms to compute the reliability of two restricted subclasses of S. The 0rst algorithm runs in O(|F|) when the 0le distribution is limited to being bipartite and non-separable. The second algorithm runs in O(|V |), when each 0le is allocated to at most two distinct nodes and each node contains at most two distinct records. If the failure and working probabilities of every node are identical, then the computation can be accelerated to O(log(|V |)) time by means of the Fibonacci number and the Lucas number. Scope and purpose The star topology has become increasingly popular in distributed computing systems as it o6ers higher reliability, lower installation cost, and more 7exibility than other topologies. The computation of the reliability of star distributed computing systems is shown to be #P-complete. Therefore, computing the reliability of such a system is intractable. This article presents two fast linear-time algorithms to compute the reliability of two restricted subclasses of star distributed computing systems. ? 2003 Elsevier Science Ltd. All rights reserved. Keywords: Reliability; Distributed computing systems; #P-complete; Linear-time algorithms

1. Introduction A distributed computing system [1,2] includes processing elements (nodes), communication links (edges), programs and data 0les (0les). These resources are interconnected by a communication E-mail address: [email protected] (M.-S. Lin). 0305-0548/03/$ - see front matter ? 2003 Elsevier Science Ltd. All rights reserved. PII: S 0 3 0 5 - 0 5 4 8 ( 0 2 ) 0 0 1 0 0 - 4

1698

M.-S. Lin / Computers & Operations Research 30 (2003) 1697 – 1712

Nomenclature D = (V; F) V F v p(v) q(v) f f(v) f(V ∗ ) v(f) v(F ∗ ) c(v) Rel(·)

a DCS set of nodes set of 0les component of V probability that node v works probability that node v fails (≡ 1 − p(v)) component of F set of 0les available at node v  set of 0les available at the nodes of V ∗ ⊆ V (f(V ∗ ) ≡ v∈V ∗ f(v)) set of nodes containing 0le f  set of nodes containing the 0les of F ∗ ⊆ F(v(F ∗ ) ≡ f∈F ∗ v(f)) cardinality of f(v)(c(v) ≡ |f(v)|) reliability of (·)

Abbreviations DCS S-DCS BS-DCS (# 6 2)-S-DCS NSFD

distributed computed system star distributed computing system bipartite star distributed computing system (# 6 2) star distributed computing system non-separable 0le distribution

network that dictates the 7ow of information between processing elements. Successful execution of a program, requires that communication between the processing elements that contain the program and other processing elements that include related data 0les be operational. The reliability of the distributed computing system is de0ned as the probability that a program will be successfully executed [3–7]. This reliability varies according to (1) the topology of the distributed computing system, (2) the failure (or working) probability of the communication links and processing elements, and (3) the 0le distributed among the processing elements. This paper considers only cases in which the topology of the distributed computing system is restricted to star topology. In a star distributed computing system, each processing element is directly connected to a common central node, called the hub. The hub acts as a repeater: the hub repeats the signal on the outgoing line to each processing element, whenever a single processing element transmits. The star topology has become increasingly popular in distributed computing systems as it o6ers higher reliability, lower installation cost, and more 7exibility than other topologies, such as ring or bus topologies. However, Lin and Chen [8] demonstrated, for the 0rst time, that computing the reliability of distributed computing systems is intractable (#P-complete), even when the topology is restricted to star topology. Valiant [9] introduced the class of #P-complete problems. The class #P includes problems that involve counting accessing computations for problems in NP; the class of #P-complete problems includes the hardest problems in #P. As widely recognized, all known exact algorithms for solving these problems have exponential time complexity, making unlikely the development of eIcient algorithms for this class

M.-S. Lin / Computers & Operations Research 30 (2003) 1697 – 1712

1699

of problems. However, this complexity can be mitigated by considering only a limited subclass of #P-complete problems. A speci0c solvable case for star distributed computing systems was identi0ed, in which the 0les are distributed according to a consecutive property [10]. The computational complexity of this solvable case is O(|F|2 + |V | |F|), where |V | is the number of nodes and |F| is the number of distinct 0les. Chang et al. [11] presented another special case which can be solved in polynomial time O(|V | |F|2 ) such that each node in the star distributed computing system contains exactly two distinct 0les and satis0es the semi-lattices property. This work focuses on the following two restricted subclasses of star distributed computing systems. Class I. A bipartite star distributed computing system B = (X; Y; F), where X and Y are two disjoint sets of nodes and F is the set of 0les. A bipartite star distributed computing system is a star distributed computing system in which each 0le is available at exact two distinct nodes and the two distinct nodes are selected from two disjoint sets of nodes, X and Y . Class II. A (# 6 2) star distributed computing system T = (V; F), where V is the set of nodes and F is the set of 0les. A (# 6 2) star distributed computing system is a star distributed computing system such that each 0le in F is allocated to at most two distinct nodes and each node contains at most two distinct 0les. The rest of this paper is organized as follows. Section 2 shows that the computation of the reliability of a bipartite star distributed computing system remains #P-complete. However, a linear time algorithm in O(|F|) time is presented to compute the reliability of a bipartite star distributed computing system when the 0le distribution satis0es the speci0c non-separable requirement. Section 3 proposes another linear time algorithm in O(|V |) time to compute the reliability of a (# 6 2) star distributed computing system. Section 4 discusses a special case of a (# 6 2) star distributed computing system, for which the reliability can be computed in O(log(|V |)) time. Section 5 concludes. Assumptions 1. The central nodes (hubs) of the S-DCS and BS-DCS are perfect. 2. The communication links (edges) of the S-DCS and BS-DCS are perfect. 3. The processing elements (nodes) of S-DCS and BS-DCS are s-independent and either work or fail with known probabilities. 4. No pair of 0les are allocated to the same nodes; that is, ∀i =j [v(fi ) = v(fj )]. Denition 1.1. {D1 ; D2 ; : : : ; Dr } is a partition of S-DCS D = (V; F) if and only if ∀i =j [f(Vi) ∩ f(Vj ) = ∅]; where Vi is the set of nodes in Di .

r

i=1

Vi = V and

Remark 1.1. If {D1 ; D2 ; : : : ; Dr } is a partition of S-DCS D; then Rel(D) = Rel(D1 ) · Rel(D2 ) · : : : · Rel(Dr ): Denition 1.2. A 5le spanning tree is a tree whose nodes hold all 0les in F. Denition 1.3. A minimal 5le spanning tree is one which contains no other 0le spanning tree as a subset.

1700

M.-S. Lin / Computers & Operations Research 30 (2003) 1697 – 1712

Remark 1.2. Let D be a DCS; then Rel(D) = Prob{at least one minimal 0le spanning tree of D is operational} = Prob{at least one 0le spanning tree of D is operational}: 2. A linear-time algorithm for computing the reliability of BS-DCS with non-separable le distribution property Notation (for BS-DCS) B = (X; Y; F) a BS-DCS, where X and Y are two disjoint sets of nodes m number of nodes in X n number of nodes in Y f = x; y a 0le, f, available at nodes x and y, where x ∈ X and y ∈ Y ; that is, v(f) = {x; y} for 0le f ∈ F N (x) set of nodes of Y which contain at least one 0le available at node x N (x) ≡ {y | there exists a 0le f ∈ F such that f = x; y} N (y) set of nodes of X which contain at least one 0le available at node y N (y) ≡ {x | there exists a 0le f ∈ F such that f = x; y} Remark 2.1. |N (v)| = c(v) = |f(v)|. Remark 2.2. If a 0le f = x; y ∈ F; then x ∈ N (y) and y ∈ N (x). Lin and Chen [8] demonstrated that computing the reliability of S-DCS is #P-complete even when only two copies of each 0le are present. This property is derived by transforming the problem of counting the number of node covers—a known #P-complete problem—into the problem of computing the reliability of S-DCS. Notably, the problem of counting the number of node covers remains #P-complete even when restricted to bipartite graphs [12]. Consequently, computation of the reliability of BS-DCS is #P-complete and intractable. Nonetheless, an eIcient algorithm may exist for computing the reliability of BS-DCS with certain restricted 0le distributions. This section presents a linear-time algorithm to compute the reliability of BS-DCS with a non-separable 0le distribution. Denition 2.1. A BS-DCS B = (X; Y; F) has a non-separable 5le distribution (NSFD) property if and only if no x; x∗ ∈ X and y; y∗ ∈ Y exist; such that x; y; x∗ ; y∗  ∈ F but x; y∗ ; x∗ ; y ∈ F: The following indicates that the reliability of a BS-DCS B=(X; Y; F) with NSFD can be computed in O(|F|). Without loss of generality, the BS-DCS B is assumed to be a connected component, since if B can be partitioned into many connected components, then the reliability of B may be calculated by considering Remark 1.1.

M.-S. Lin / Computers & Operations Research 30 (2003) 1697 – 1712

1701

Two sequences of nodes are introduced to characterized BS-DCSs with NSFD. The sequences are characterized by the number of 0les contained in each node. Denition 2.2. The X -sequence of the nodes in X is [x1 ; x2 ; : : : ; xm ] given by; |f(x1 )| 6 |f(x2 )| 6 · · · 6 |f(xm )| ⇔ c(x1 ) 6 c(x2 ) 6 · · · 6 c(xm ) ⇔ N (x1 ) 6 N (x2 ) 6 · · · 6 N (xm ):

(2.1)

Denition 2.3. The Y -sequence of the nodes in Y is [y1 ; y2 ; : : : ; yn ] given by; |f(y1 )| ¿ |f(y2 )| ¿ · · · ¿ |f(yn )| ⇔ c(y1 ) ¿ c(y2 ) ¿ · · · (yn ) ⇔ N (y1 ) ¿ N (y2 ) ¿ · · · ¿ N (yn ):

(2.2)

The X -sequence and Y -sequence in Eqs. (2.1) and (2.2) yield the following properties, corollaries, and theorems. Property 2.1. N (xi ) = {yk | 1 6 k 6 c(xi )}; for each xi ∈ X . Proof. Remark 2.1 states that the cardinality of N (xi ) is c(xi ); so if there exists a node yk ; for 1 6 k 6 c(xi ); such that yk ∈ N (xi ); then there must exist yl ∈ N (xi ) for l ¿ c(xi ). Since k 6 c(xi ) ¡ l; the ordering of the Y -sequence implies that c(yk ) ¿ c(yl ). Speci0cally; yk ∈ N (xi ) and yl ∈ N (xi ) implies N (yk ) = N (yl ). Hence; given N (yk ) = N (yl ) and c(yk ) ¿ c(yl ); there must exist a node xj such that xj ∈ N (yk ) and xj ∈ N (yl ). Now; yk ∈ N (xi ); yl ∈ N (xi ); xj ∈ N (yk ); and xj ∈ N (yl ); therefore xi ; yk  ∈ F; xi ; yl  ∈ F; xj ; yk  ∈ F; and xj ; yl  ∈ F; which results contradict De0nition 2.1. Property 2.2. N (yk ) = {xi | m − c(yk ) + 1 6 i 6 m}; for each yk ∈ Y . Proof. Similar to the proof of Property 2.1. Corollary 2.1. N (xi ) ⊆ N (xj ); for 1 6 i 6 j 6 m. Proof. Trivial; from the ordering of the X -sequence and Property 2.1. Corollary 2.2. N (yk ) ⊇ N (yl ); for 1 6 k 6 l 6 n. Proof. Trivial; from the ordering of the Y -sequence and Property 2.2. Corollary 2.3. N (xm ) = Y and N (y1 ) = X . Proof. Trivial; by Corollaries 2.1 and 2.2. Lemma 2.1. Let M be a minimal 5le spanning tree of a BS-DCS with NSFD. Consider the ordering of X -sequence in Eq. (2.1). If xi ∈ M ; then xj ∈ M ; for i 6 j 6 m.

1702

M.-S. Lin / Computers & Operations Research 30 (2003) 1697 – 1712

Proof. Suppose xj ∈ M . Since i 6 j; by Corollary 2.1; N (xi ) ⊆ N (xj ). The following cases are distinguished. Case 1: N (xi ) = N (xj ). Since node xi ∈ M and M is a minimal 0le spanning tree, there must exist a node yk ∈ N (xi ), that is a 0le xi ; yk  ∈ F, such that yk ∈ M . For N (xi ) = N (xj ) and xi ; yk  ∈ F, there exists a 0le xj ; yk  ∈ F. Since neither nodes xj nor yk are in M , the 0le xj ; yk  is not covered by M . Thus, M is not a (minimal) 0le spanning tree, and a contradiction is thus established. Case 2: N (xi ) ⊂ N (xj ). Since N (xi ) ⊂ N (xj ), there must exist a node yl such that yl ∈ N (xj ) and yl ∈ N (xi ); that is xj ; yl  ∈ F and xi ; yl  ∈ F. Since node xi ∈ M , there must exist a node yk such that yk ∈ N (xi ) and yk ∈ M . Therefore, xi ; yk  ∈ F; xj ; yl  ∈ F, and xi ; yl  ∈ F. By De0nition 2.1, there must exist a 0le xj ; yk  ∈ F. However, neither nodes xj nor yk are in M , and the 0le xj ; yk  is not covered by M . Thus, M is not a (minimal) 0le spanning tree, and a contradiction is thus established. Lemma 2.2. Let M be a minimal 5le spanning tree of a BS-DCS with NSFD. Consider the ordering of the Y -sequence in Eq. (2.2). If yk ∈ M ; then yl ∈ M ; for 1 6 l 6 k. Proof. Similar to the proof of Lemma 2.1. Theorem 2.2. Let M be a minimal 5le spanning tree of a BS-DCS with NSFD. Then; the nodes of M are consecutive with respect to the ordering sequence [x1 ; x2 ; : : : ; xm ; y1 ; y2 ; : : : ; yn ]:

(2.3)

Therefore; if both nodes xi and yk ∈ M ; then the consecutive nodes {xi+1 ; : : : ; xm ; y1 ; y2 ; : : : ; yk −1 } are also in M . Proof. This theorem directly follows from Lemmas 2.1 and 2.2. By Theorem 2.2, a BS-DCS B=(X; Y; F) with NSFD can be viewed as a linear DCS D=(V; E; F), where V is the set of nodes, E is the set of edges, such that V = {v1 ; v2 ; : : : ; vm ; vm+1 ; vm+2 : : : ; vm+n } ≡ {x1 ; x2 ; : : : ; xm ; y1 ; y2 ; : : : ; yn }; E = {vi vi+1 | for 1 6 i 6 m + n − 1};  for 1 6 i 6 m; f(xi ) f(vi ) = f(yi−m ) for m + 1 6 i 6 m + n and

 p(vi ) =

p(xi )

for 1 6 i 6 m;

p(yi−m ) for m + 1 6 i 6 m + n:

(2.4)

Lin et al. [13] demonstrated that a linear DCS with m + n nodes is an example of a generalization of linear consecutive k-out-of-m + n:G systems, referred to as linear Con=k ∗ =m + n:G systems.

M.-S. Lin / Computers & Operations Research 30 (2003) 1697 – 1712

1703

A linear Con=k ∗ =m + n:G system has m + n ordered components {v1 ; v2 ; : : : ; vm+n| } and works if and only if there exists a component vt and k(vt ) − 1 (or more) subsequent components that all work, where k(vt ) is a function of vt . Thus, k(vt ) is the minimum number of consecutive nodes originating from nodes vt which constitute a 0le spanning tree of a linear DCS. Given the values of all k(vt ), Lin et al. [13] presented a linear time algorithm in O(m + n) time to compute the reliability of the linear Con=k ∗ =m + n:G system by the following recursive expression.   g(i; j) t+k(vt )−1   [1 − R(i; t − 2)]q(vt −1 ) p(vs ) R(i; j) = R(i; j − 1) + t=g(i; j −1)+1

s=t

for 1 6 i 6 j 6 m + n

(2.5)

with the boundary condition R(i; j)=0 for i ¿ j and q(vi )=1 for i ¡ 1: R(i; j) denotes the reliability of the linear Con=k ∗ =m + n:G system, considering only the nodes from vi to vj : g(i; j) denotes the number of 0le spanning trees that make the system work, considering only the nodes from vi to vj ; that is g(i; j) ≡ |{t | t + k(vt ) − 1 6 j; for t ¿ i}|. Therefore, the reliability of a BS-DCS with NSFD can be derived from the values of all k(vt ) by computing the value of R(1; m + n) in Eq. (2.5). The following describes how to obtain the values of all k(vt ), for 1 6 t 6 m + n; in a BS-DCS with NSFD. Theorem 2.3. Given a BS-DCS B = (X; Y; F) with NSFD; for each xt ∈ X ; there exists no 5le f = xi ; yk  ∈ F such that i ¡ t and k ¿ c(xt −1 ). Proof. Assume there exists a 0le f = xi ; yk  ∈ F such that i ¡ t and k ¿ c(xt −1 ). Since xi ; yk  ∈ F and k ¿ c(xt −1 ); N (xi ) can be expressed as {y1 ; y2 ; : : : ; yc(xt−1 ) ; : : : ; yk ; : : :}. By Property 2.1; N (xt −1 )= {y1 ; y2 ; : : : ; yc(xt−1 ) }; so N (xt −1 ) ⊂ N (xi ). By Corollary 2.1; N (xt −1 ) ⊂ N (xi ) implies t − 1 ¡ i (or t 6 i); contradicting the assumption; i ¡ t. Theorem 2.3 states that {xt ; xt+1 ; : : : ; xm ; y1 ; y2 ; : : : ; yc(xt−1 ) }, for 1 6 t 6 m, is a 0le spanning tree of a BS-DCS with NSFD. Moreover, yc(xt−1 ) ∈ N (xt −1 ) implies the 0le xt −1 ; yc(xt−1 )  ∈ F, so {xt ; xt+1 ; : : : ; xm ; y1 ; y2 ; : : : ; yc(xt−1 ) }−{yc(xt−1 ) } is not a 0le spanning tree. Consequently, for a BS-DCS with NSFD, the minimum number of consecutive nodes, beginning with node nodes xt , that form a 0le spanning tree is k(xt ) = |{xt ; xt+1 ; : : : ; xm ; y1 ; y2 ; : : : ; yc(xt−1 ) }| = m − t + 1 + c(xt −1 )

for 1 6 t 6 m:

Thus, for the corresponding linear DCS, k(vt ) = m − t + 1 + c(vt −1 )

for 1 6 t 6 m

(2.6)

with the boundary condition c(v0 ) = 0. Furthermore, k(y1 ) = |{y1 ; y2 ; : : : ; yn }| = n can be easily shown. By Corollary 2.3, since N (y1 ) = X; {yt ; yt+1 ; : : : ; yn } is not a 0le spanning tree, for 2 6 t 6 n. Thus, k(yt ) = ∞, for 2 6 t 6 n. So, for the corresponding linear DCS,  n for t = m + 1; k(vt ) = (2.7) ∞ for m + 2 6 t 6 m + n:

1704

M.-S. Lin / Computers & Operations Research 30 (2003) 1697 – 1712

By Corollary 2.3, since N (xm ) = Y implies that c(vm ) = c(xm ) = |Y | = n. Thus, Eqs. (2.6) and (2.7) can be combined as  m − t + 1 + c(vt −1 ) for 1 6 t 6 m + 1; (2.8) k(vt ) = ∞ for m + 2 6 t 6 m + n with the boundary condition c(v0 ) = 0. Using the above results, the algorithm for computing the reliability of BS-DCS with NSFD is formally described below. Algorithm A1 Input: A BS-DCS B = (X; Y; F) with NSFD, where X = {x1 ; x2 ; : : : ; xm } and Y = {y1 ; y2 ; : : : ; yn } are disjoint sets of nodes and F = {x; y| if a 0le f is available at both nodes x and y} Output: Reliability of B begin Step 1: For each f = xi ; yk  in F do c(xi ) ← c(xi ) + 1;

c(yk ) ← c(yk ) + 1;

Step 2: Reorder the nodes according to the sequences in Eqs. (2.1) and (2.2). Step 3: Construct a linear DCS as Eq. (2.4), which can be considered as a linear Con=k ∗ =m + n:G system. Step 4: Compute the values of all k(vt ), for 1 6 t 6 m + n, by Eq. (2.8). Step 5: Apply the Eq. (2.5) to obtain the reliability. end Algorithm A1 2.1. Complexity analysis Step 1 requires O(|F|) time. In Step 2, the sequences can be ordered speci0ed in Eqs. (2.1) and (2.2) in O(m) and O(n) time, respectively, using a radix or bucket sort. Steps 3 and 4 both require O(m + n) time. Step 5 applies Eq. (2.5) which takes O(m + n) time to compute the reliability [13]. Hence, implementing algorithm A1 takes O(m + n + |F|) time overall, which is linear related to the size of BS-DCS. Notably, 2 6 m + n 6 2|F| since each 0le is available at exact two distinct nodes for BS-DCS. Thus, the computational complexity of O(m + n + |F|) can be reduced to O(3 · |F|). 2.2. Experiments Algorithm A1 was implemented using Perl programming language and run on an Intel Pentium-III=550 PC under a Linux operating system. All BS-DCSs with NSFD are generated randomly and all nodes are assumed to have the same operating probability 0.999. The computational results are shown in Table 1. The plot in Fig. 1 shows the execution time of algorithm A1 as a linear function of the number of 0les. Fig. 2 illustrates the reliability performance against the numbers of 0les.

M.-S. Lin / Computers & Operations Research 30 (2003) 1697 – 1712

1705

Table 1 Computational results for algorithm A1 |F|

Execution time (s)

Reliability

|F|

Execution time (s)

Reliability

137,500 300,000 525,000 812,500 1,162,500 1,575,000 2,050,000 2,587,500 3,187,500 3,850,000

0.47 1.03 1.83 2.80 4.03 5.45 7.13 9.07 11.45 13.55

0.90226 0.81779 0.72652 0.63560 0.54934 0.47013 0.39908 0.33645 0.28200 0.23517

4,757,000 5,362,500 6,212,500 7,125,000 8,100,000 9,137,500 10,237,500 11,400,000 12,625,000 13,912,500

16.01 19.16 22.31 25.73 30.34 33.21 38.38 42.78 48.20 54.25

0.19525 0.16149 0.13311 0.10938 0.08963 0.05976 0.05976 0.04864 0.03952 0.03205

Fig. 1. Execution time against the number of 0les for algorithm A1.

Fig. 2. Reliability against the number of 0les in a BS-DCS with NSFD.

1706

M.-S. Lin / Computers & Operations Research 30 (2003) 1697 – 1712

3. A linear-time algorithm for computing the reliability of (# 6 2)-S-DCSs Another subclass of S-DCS, (# 6 2)-S-DCS, is now considered. A (# 6 2)-S-DCS T = (V; F) is a star distributed computing system such that each 0le in F is allocated to at most two distinct nodes of V and each node in V contains at most two distinct 0les of F. First, let any (# 6 2)-S-DCS T = (V; F) be partitioned into two S-DCSs as follows: T1 = (V1 ; F1 );

where F1 = {f | f is available at exact one node of V } and V1 = v(F1 )

T2 = (V2 ; F2 );

where V2 = V − V1 and F2 = F − f(V1 ):

and (3.1)

By Remark 1.1, Rel(T ) = Rel(T1 )Rel(T2 )

(3.2)

and that the following can be easily shown.  Rel(T1 ) = p(v):

(3.3)

v ∈ V1

Given T2 = (V2 ; F2 ), construct the graph G(T2 ) whose vertices correspond to vertices of V2 and whose edges are de0ned in such a way that an edge connects nodes v and v∗ if and only if v and v∗ share at least one of the 0les in F2 . Without loss of generality, assume that G(T2 ) is a connected component, since the reliability of G(T2 ) may be calculated considering Remark 1.1 if G(T2 ) can be partitioned into many connected components. G(T2 ) is either a linear path or a cycle, since T2 is the S-DCS such that each 0le is available at exactly two distinct nodes and each node contains at most two distinct 0les. Assume G(T2 ) has the ordered linear sequence [v1 ; v2 ; : : : ; vn ], where vi denotes the ith node of G(T2 ) and n is the number of nodes in G(T2 ). Let Fx (i; j) (Rx (i; j) ≡ 1 − Fx (i; j)) represent the failure (working) probability of G(T2 ), considering only the nodes from vi to vj , where x = L or C depending on whether G(T2 ) is a linear path or a cycle. Notably, FL (1; n) (RL (1; n)) denotes the failure (working) probability of T2 when G(T2 ) is a linear path and FC (1; n)(RC (1; n)) denotes the failure (working) probability of T2 when G(T2 ) is a cycle. Clearly, the S-DCS T2 fails if and only if at least two adjacent nodes fail in G(T2 ). Therefore, the S-DCS T2 can be viewed as a linear (or circular) consecutive-2-out-of-n:F system. A consecutive-k-out-of-n:F system, denoted by Con=k=n:F, is an ordered linear sequence of n components that fails if and only if at least k consecutive components in the system fail. A Con=k=n:F system can be either linear or circular, depending on whether the components are arranged in a line or a circle. By de0nition, a generalization of a Con=k=n:F system, denoted by Con=k ∗ =n:F, is just the mirror image of a Con=k ∗ =n:G system described in Section 2 and [13]. Therefore, the failure probability of a Con=k ∗ =n:F system A is equal to the working probability of a Con=k ∗ =n:G system B if the failure probability of component vi in A is equal to the working probability of component vi in B for all i and if both A and B have the same k(vi ) and n. When the mirror image between Con=k ∗ =n:G and Con=k ∗ =n:F is considered, and k(vt ) = 2 is set for all t, and gj = j − i is set for 2 6 j 6 n, Eq. (2.5) yields the following equation: FL (i; j) = FL (i; j − 1) + {1 − FL (i; j − 3)}p(vj−2 )q(vj−1 )q(vj )

for 1 6 i 6 j 6 n

with the boundary conditions FL (i; j) = 0 for i ¿ j and p(vi ) = 1 for i ¡ 1.

(3.4)

M.-S. Lin / Computers & Operations Research 30 (2003) 1697 – 1712

1707

Since RL (i; j) = 1 − FL (i; j) for all i and j, RL (i; j) = RL (i; j − 1) − RL (i; j − 3)p(vj−2 )q(vj−1 )q(vj )

for 1 6 j 6 n

(3.5)

with the boundary conditions RL (i; j) = 1 for i ¿ j and p(vi ) = 1 for i ¡ 1. Similarly, if G(T2 ) is a cycle, the failure probability of G(T2 ) can be derived by the equation proposed in [13] as follows. FC (1; n) = p(vn )FL (1; n − 1) + q(vn )p(vn−1 )p(v1 )FL (2; n − 2)

(3.6)

RC (1; n) = p(vn )RL (1; n − 1) + q(vn )p(vn−1 )p(v1 )RL (2; n − 2):

(3.7)

and The complete algorithm for computing the reliability of (# 6 2)-S-DCSs is as follows. Algorithm A2 Input: A (# 6 2)-S-DCS T = (V; F), where V is the set of nodes and F is the set of 0les. v(f): the set of nodes which contains 0le f f(v): the set of 0les available at node v Output: the reliability of T begin Step 1: = ∗ Partition T into T1 = (V1 ; F1 ) and T2 = (V2 ; F2 ) as Eq. (3.1). *= (a) Let F1 bethe set: {f| if |v(f)| = 1}. (b) Let V1 = f∈F1 v(f).  (c) Let V2 = V − V1 and F2 = F − v∈V1 f(v). Step 2: = ∗ Compute the reliability of T1 = (V1 ; F1 ) as Eq. (3.2). *=  (a) Rel(T1 ) = v∈V1 p(v); Step 3: = ∗ Compute the reliability of T2 = (V2 ; F2 ). *= (a) Construct G(T2 ) for T2 . (b) If G(T2 ) is a linear path then Rel(T2 ) can be calculated as RL (1; n) Eq. (3.5). (c) If G(T2 ) is a cycle then Rel(T2 ) can be calculated as RC (1; n) by Eq. (3.7). ∗ Step 4: = Compute the reliability of T by Eq. (3.2). *= (a) Rel(T ) = Rel(T1 )Rel(T2 ). (b) Output(Rel(T )). end Algorithm A2 3.1. Complexity analysis Steps 1(a) and (b) both take O(|F|) time to determine F1 and V1 . Step 1(c) takes O(|V | + |F|) time to obtain V1 and F2 . Step 2(a) requires O(|V |) time to calculate Rel(T1 ). Step 3(a) constructs G(T2 ) in O(|V | + |F|). Both Eqs. (3.5) and (3.7) can be calculated in O(|V | + |F|) time for Steps 3(b) and (c). Both Steps 4(a) and (b) require constant time. Thus, the total time from Steps

1708

M.-S. Lin / Computers & Operations Research 30 (2003) 1697 – 1712

Table 2 Computational results for algorithm A2 |V |

Execution time (s)

Reliability

|V |

Execution time (s)

Reliability

10,000 20,000 30,000 40,000 50,000 60,000 70,000 80,000 90,000 100,000

1.12 2.23 3.37 4.48 5.62 6.76 7.88 9.04 10.16 11.29

0.99006 0.98022 0.97047 0.96083 0.95128 0.94182 0.93246 0.92319 0.91401 0.90493

110,000 120,000 130,000 140,000 150,000 160,000 170,000 180,000 190,000 200,000

12.38 13.54 14.65 15.73 16.93 18.00 19.28 20.33 21.48 22.50

0.89593 0.88703 0.87821 0.86948 0.86084 0.85228 0.84381 0.83542 0.82712 0.81889

Fig. 3. Execution time against the number of nodes for algorithm A2.

1– 4 is O(|V | + |F|), which is linearly related to the size of T = (V; F). Notably, the computational complexity of O(|V | + |F|) can be reduced to O(2|V |), since |F| 6 |V | 6 2|F| for the class of (# 6 2)-S-DCS. 3.2. Experiments Algorithm A2 was implemented using Perl programming language and run on an Intel Pentium-III=550 PC under a Linux operating system. All (# 6 2)-S-DCSs are generated randomly and all nodes are assumed to have the same operating probability 0.999. The output data are given in Table 2. The plot in Fig. 3 displays the execution time of algorithm A2 as a linear function of the number of nodes. Fig. 4 shows the reliability performance against the number of nodes.

M.-S. Lin / Computers & Operations Research 30 (2003) 1697 – 1712

1709

Fig. 4. System reliability against the number of nodes in a (# 6 2)-S-DCS.

4. A special case of (# 6 2)-S-DCSs This section considers a special case of (# 6 2)-S-DCSs. Given a (# 6 2)-S-DCS T = (V; F), assume, 1. Each 0le is allocated in exactly two distinct nodes and each node contains at most two distinct 0les, 2. The failure and working probabilities are identical for each node; that is p(v) = q(v) = 12 for each node v ∈ V , and 3. G(T ), the graph constructed in Section 3, is a connected component. By assumption 1, T can be considered as the partition T2 in Section 3. Thus, the reliability of T can be easily calculated using Eqs. (3.5) or (3.7). The following corollaries state some interesting properties of T . Corollary 4.1. If G(T ) is a linear path with n nodes; then 2j RL (1; j) = 2j−1 RL (1; j − 1) + 2j−2 RL (1; j − 2) for 2 6 j 6 n

(4.1)

with the boundary conditions RL (1; 0) = RL (1; 1) = 1. Proof. For j = k; assume 2k RL (1; k) = 2k −1 RL (1; k − 1) + 2k −2 RL (1; k − 2): In Eq. (3.5), let i = 1; j = k + 1, and p(vi ) =

1 2

for each vi . Then,

RL (1; k + 1) = RL (1; k) − RL (1; k − 2)2−3 : Thus, 2k+1 RL (1; k + 1) = 2k+1 RL (1; k) − RL (1; k − 2)2k −2 = 2k RL (1; k) + 2k RL (1; k) − RL (1; k − 2)2k −2

(4.2)

1710

M.-S. Lin / Computers & Operations Research 30 (2003) 1697 – 1712

(by Eq: (4:2)) = 2k RL (1; k) + 2k −1 RL (1; k − 1) + 2k −2 RL (1; k − 2) − RL (1; k − 2)2k −2 = 2k RL (1; k) + 2k −1 RL (1; k − 1): The theorem follows by induction. Notably, some initial values of Eq. (4.1) are 20 RL (1; 0) = 1;

21 RL (1; 1) = 2;

22 RL (1; 2) = 3;

23 RL (1; 3) = 5;

24 RL (1; 4) = 8;

25 RL (1; 5) = 13; : : : : The Fibonacci numbers are obtained. Thus, Eq. (4.1) can be rewritten as 2j RL (1; j) = Fib(j + 2), where Fib(k) denotes the kth number in the Fibonacci series, and the following corollary is obtained. Corollary 4.2. If G(T ) is a linear path with n nodes; then the reliability of T can be expressed as Rel(T ) = RL (1; n) = 2−n Fib(n + 2): Since

(4.3)

   

√ k

√ k  √ k    1 1+ 5 1+ 5 1 1− 5 = round √ ; Fib(k) = √ −   5  2 2 2 5

Eq. (4.3) can be rewritten as  

√ n+2   n  1 1+ 5 1 Rel(T ) = : round √   5 2 2

(4.4)

Before investigating the case in which G(T2 ) is a cycle, the de0nition of the Lucas series is given as follows. Denition 4.1. The Lucas series is very similar to the Fibonacci series; but starts with 2 and 1 instead of Fibonacci’s 0 and 1. Let Lus(k) denote the kth number in the Lucas series. Remark 4.1. Lus(k) = Fib(k + 1) + Fib(k − 1). Corollary 4.3. If G(T ) is a cycle with n nodes. Then; the reliability of T can be expressed as Rel(T ) = RC (1; n) = 2−n Lus(n):

(4.5)

M.-S. Lin / Computers & Operations Research 30 (2003) 1697 – 1712

Proof. In Eq. (3.7); let p(vi ) =

1 2

1711

for each vi . Then;

RC (1; n) = 12 RL (1; n − 1) + 18 RL (2; n − 2) = 12 RL (1; n − 1) + 18 RL (1; n − 3): From Eq. (4.3); RL (1; n − 1) = Fib(n + 1)2−(n−1) and RL (1; n − 3) = Fib(n − 1)2−(n−3) . Therefore; RC (1; n) = 2−n {Fib(n + 1) + Fib(n − 1)}:

(4.6)

The theorem follows by Remark 4.1. Since  

√ k √ k  √ k

 1− 5 1+ 5 1+ 5 ; + = round Lus(k) =   2 2 2 Eq. (4.6) can be rewritten as 

√ n   n 1 1+ 5 Rel(T ) = : round 2 2

(4.7)

4.1. Complexity analysis Clearly, both Eqs. (4.4) and (4.7) require O(n) multiplications to yield the value of the exponential term, xn . However, a signi0cantly faster method exists to calculate xn in Eqs. (4.4) and (4.7) that only requires O(log(n)) = O(log(|V |)) multiplications as follows. function fast power(x; n) if (n = 0) return 1; if n is odd, return x∗ fast power(x; n − 1); if n is even, return fast power(x2 ; n=2); end function fast power 5. Conclusions This study shows that the computation of the reliability of bipartite star distributed computing systems is #P-complete, implying computing the reliability of such a system is intractable. However, one solvable case of bipartite star distributed computing systems is identi0ed, in which 0les are distributed according to a non-separable property. This restricted subclass of bipartite star distributed computing systems can be viewed as a generalization of linear consecutive k-out-of-m+n:G systems, and its reliability can be computed in O(|F|) time, where m + n is the number of nodes and |F| is the number of 0les in the system. A further restricted subclass of star distributed computing systems, namely (# 6 2) star distributed computing systems, is identi0ed, in which each 0le is allocated to at most two distinct nodes, and each node contains at most two distinct 0les. This restricted subclass can be viewed as one of linear or circular consecutive k-out-of-n:F systems and its reliability can be computed in O(|V |) time, where |V | = n is the number of nodes. A special case of (# 6 2) star

1712

M.-S. Lin / Computers & Operations Research 30 (2003) 1697 – 1712

distributed computing systems was presented, in which each 0le is allocated to exactly two distinct nodes, and each node contains at most two distinct 0les and the failure and working probabilities of each node are identical. The reliability of this special case is related to the Fibonacci number and the Lucas number and it can be computed in O(log(|V |)) time. References [1] Enslow P. What is a distributed data processing system. Computer 1978;11(1):13–21. [2] Garcia-Molina J. Reliability issues for fully replicated distributed database. IEEE Transactions on Computers 1982;16:34–42. [3] Kumar A, Rai S, Agrawal DP. On computer communication network reliability under program execution constraints. IEEE JSAC 1988;6:1393–9. [4] Kumar VKP, Hariri S, Raghavendra CS. Distributed program reliability analysis. IEEE Transactions on Software Engineering 1986;SE-12:42–50. [5] Chen DJ, Huang TH. Reliability analysis of distributed systems based on a fast reliability algorithm. IEEE Transactions on Parallel and Distributes System 1992;3(2):139–53. [6] Lin MS, Chen DJ. General graph reduction methods for the reliability analysis of distributed systems. The computer Journal 1993;36(7):631–44. [7] Chen DJ, Lin MS. On distributed computing systems reliability analysis under program constraints. IEEE Transactions on Computers 1994;16(1):87–97. [8] Lin MS, Chen DJ. The computational complexity of the reliability problem on distributed systems. Information Processing Letters 1997;64:143–7. [9] Valiant LG. The complexity of enumeration and reliability problems. SIAM Journal on Computing 1979;8:410–21. [10] Lin MS, Chang MS, Chen DJ. Distributed-program reliability-analysis: complexity and eIcient algorithms. IEEE Transactions on Reliability 1999;48(1):87–95. [11] Chang MS, Chen DJ, Lin MS, Ku KL. The distributed program reliability analysis on star topologies. Computers & Operations Research 2000;27(2):129–42. [12] Provan JS, Ball MO. The complexity of counting cuts and computing the probability that a graph is connected. SIAM Journal on Computers 1983;12:777–88. [13] Lin MS, Chang MS, Chen DJ. A generalization of consecutive k-out-of-n:G systems. IEICE Transactions on Information and Systems 2000;E83-D(6):1309–13. Min-Sheng Lin received his MS (1991) and Ph.D. (1994) in Computer Science & Information Engineering from National Chiao Tung University (Hsin Chu, Taiwan). He is currently an associate professor at National Taipei University of Technology (Taipei, Taiwan). His research interests include reliability and performance evaluation of distributed computing systems.