Journal of Applied Mathematics

Volume 2013 (2013), Article ID 743908, 11 pages

http://dx.doi.org/10.1155/2013/743908

## On the 2-MRS Problem in a Tree with Unreliable Edges

^{1}Zhejiang University of Water Resources and Electric Power, Hangzhou, Zhejiang 310018, China^{2}School of Science, Hangzhou Dianzi University, Hangzhou, Zhejiang 310018, China^{3}Institute of Operational Research and Cybernetics, Hangzhou Dianzi University, Hangzhou, Zhejiang 310018, China

Received 27 June 2013; Revised 5 September 2013; Accepted 6 September 2013

Academic Editor: Han H. Choi

Copyright © 2013 Wei Ding et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

This paper extends the well-known most reliable source (1-MRS) problem in unreliable graphs to the 2-most reliable source (2-MRS) problem. Two kinds of reachable probability models of node pair in unreliable graphs are considered, that is, the superior probability and united probability. The 2-MRS problem aims to find a node pair in the graph from which the expected number of reachable nodes or the minimum reachability is maximized. It has many important applications in large-scale unreliable computer or communication networks. The #P-hardness of the 2-MRS problem in general graphs follows directly from that of the 1-MRS problem. This paper deals with four models of the 2-MRS problem in unreliable trees where every edge has an independent working probability and devises a cubic-time and quadratic-space dynamic programming algorithm, respectively, for each model.

#### 1. Introduction

A computer network or communication network is commonly denoted by an undirected graph , where is the node set, each of which represents a processing or switching element, and is the edge set, each of which represents a communication link [1, 2]. Given any two different nodes and , the communication between and is achieved by a -to- path. Network failures may frequently happen to links or nodes [3, 4]. Such a network is called *unreliable* or *probabilistic*. In the past decade, a large number of network reliability problems have been extensively studied [5–20]. Many of them can be reduced to the problem of finding an optimal location for placing a server in an unreliable network [7–12, 14, 15, 17–20]. In addition, the most reliable route problem has been studied in [9, 14, 19] and its delay-constrained version has been studied in [21]. Recently, the problem of placing servers [22] and the problem of assigning links [23] in probabilistic wireless networks have been considered. Also, the continuous data collection schemes have been proposed in probabilistic wireless sensor networks (WSNs) [24, 25].

Given an unreliable graph with nodes and edges, we call a *reachable* node of (or call reachable from ) if can reach correctly. The probability of successful communication from to is called the *reachable probability* of to . The *sum reachability* of a node refers to the expected number of reachable nodes from it. The node with a maximum sum reachability is called a *sum-max most reliable source* (Sum-Max 1-MRS) of the graph. The Sum-Max 1-MRS problem has caused a lot of researchers’ interests; see [7–12, 14, 15, 17, 20]. The *minimum reachability* of a node refers to its minimum reachable probability to another node. The node maximizing its minimum reachability is called a *min-max most reliable source* (Min-Max 1-MRS) of the graph. The Min-Max 1-MRS problem has been studied in [9, 20]. The Sum-Max 1-MRS and Min-Max 1-MRS are collectively called a 1-MRS for short. In addition, we refer readers to [18, 19] for the *1-center problem* in unreliable graphs and related algorithms. Obviously, both 1-MRS and 1-center problems are a good location for placing a server in unreliable graphs.

It is well known that the 1-MRS problem and 1-center problem are both #P-hard in general graphs [3, 4, 18]. However, they are tractable under the most reliable route policy. Helander and Melachrinoudis presented a polynomial time algorithm [14], and Ding gave an -time algorithm [9] for the 1-MRS problem. Santiváñez et al. designed a polynomial time algorithm for the 1-center problem [19]. Moreover, both the 1-MRS problem and 1-center problem are also tractable in several types of sparse networks. For tree graphs with unreliable edges, Melachrinoudis and Helander designed a quadratic time algorithm [15], and Xue designed a linear time algorithm for the 1-MRS problem [20]. Santivanez and Melachrinoudis gave a linear time algorithm for the 1-center problem [18]. Ding and Xue considered the 1-MRS problem in the tree graphs with unreliable nodes and devised a linear time algorithm using the complementary dynamic programming method [10]. For ring graphs, Ding gave a quadratic time algorithm [8]. For ring-tree graphs, Ding and Xue considered an underlying topology of a strip, presented a polynomial time divide-and-conquer algorithm [11], considered an underlying topology of a tree, and presented a fast parallel algorithm based on the complementary dynamic programming [12]. For series-parallel graphs, Colbourn and Xue devised a linear time dynamic programming algorithm [7].

As networks grow rapidly in size, they become increasingly vulnerable to failures. Therefore, a single server can no longer satisfy the requirement of service from the whole network. In this scenario, we suggest to place at least two servers on unreliable networks with a large size. The rest of the paper focuses on the case of placing two servers and extends the 1-MRS problem to the 2-MRS problem, including *sum-max 2-most reliable source* (Sum-Max 2-MRS) and *min-max 2-most reliable source* (Min-Max 2-MRS). Given any a node pair , the probability of and reaching another node successfully is called the *reachable probability* of to . The paper considers two types of reachable probability models of node pair, that is, the *superior probability* and *united probability*, formally defined in Section 2.2. Under both probability models, a cubic-time and quadratic-space algorithm is presented, respectively, for finding a Sum-Max 2-MRS and a Min-Max 2-MRS on trees with unreliable edges. Note that this paper is the first one to propose and study the 2-MRS problem.

The remainder of this paper is organized as follows. In Section 2, we define notations and the 2-MRS problem formally and show several fundamental lemmas. We present a cubic-time algorithm, respectively, for the Sum-Max 2-MRS problem in Section 3 and the Min-Max 2-MRS problem in Section 4 on tree graphs with unreliable edges. In Section 5, we give an example for illustrating our algorithms. In Section 6, we conclude the paper with some future research topics.

#### 2. Preliminaries

##### 2.1. Notations

Let be an undirected connected graph, where is the node set, is the edge set, and each edge has a weight representing the working probability on . Suppose that all edges have an independent working probability and all nodes are immune to failures. Let be a node pair of . We use to denote a simple path in connecting and and also use to denote the event that works correctly for simplicity of presentation. Let denote the probability of working correctly and the probability of reaching among . Specifically, when is just an edge in . Note that works correctly if and only if all edges of work correctly simultaneously. Let and denote the set of nodes and edges on , respectively. So,

Let be an undirected tree graph, where is the node set, is the edge set, and every edge has a probability weight as defined above. For any of , there exists a unique path in connecting and . Thus, it always holds that in . Let when . An unrooted tree can be transformed into a rooted tree by designating any node as the root. Without any loss of generality, we pick out any node and transform into a tree rooted at , denoted by . Clearly, and . For any , we use to denote the set of the children of in and to denote the subtree of rooted at . Let denote the set of nodes in and the set of nodes outside . Specifically, and when is a leaf of . For any , we use to denote the parent of in and to denote the set of ancestors of in . Specifically, when and . For any , we use to denote the child of on in . Let denote the set of children of in other than ; that is, . Let . Suppose that is located at the 0th level in . So, has levels in total. Let , , denote the set of nodes on the -level of . Also, we use (resp., ) to denote the set of leaves of (resp., ). Clearly, is equal to if is a leaf of and if is not a leaf.

##### 2.2. Problem Statements

Given any of and any , the maximum in the reachable probability of to and that of to is called the *superior probability* of to , denoted by . The probability of to to , or both is called the *united probability* of to , denoted by . The superior probability and united probability are collectively called the *reachable probability* of node pair.

*Problem 1. *Given an undirected connected network , where every edge has a weight representing the working probability on , the objective is to find a node pair in such that the *sum reachability* (resp., *minimum reachability*) of the node pair is maximized.

The *sum reachability* of is referred to as the expected number of reachable nodes in from , denoted by . The optimal solution of Problem 1 with the objective of maximizing the sum reachability of node pair is called *Sum-Max 2-MRS* of , denoted by . We have

The *minimum reachability* of is referred to as the minimum reachable probability of , denoted by . The optimal solution of Problem 1 with the aim of maximizing the minimum reachability of node pair is called *Min-Max 2-MRS *of , denoted by . We have

The Sum-Max 2-MRS problem and Min-Max 2-MRS problem are collectively called the *2-MRS problem*. Based on the #P-hardness of the 1-MRS problem in general graphs [3, 4], we conclude that the 2-MRS problem in general graphs is also #P-hard. However the 1-MRS problem in tree graphs is tractable [10, 15, 20]. In the remainder of this paper, we will deal with the 2-MRS problem in tree graphs. All the notations and their explanations used in the paper are listed in Table 2.

##### 2.3. Fundamental Lemmas

Let denote the union of two disjoint sets and . Lemma 2 shows the decomposition scheme at of for any of , see Figure 1. The proof is straightforward and omitted here.

Lemma 2. *Given any of , one has
**
in which
*

Lemma 3. *Given any tree rooted at , one has,
*

* Proof. *Let be a tree rooted at with an arbitrary topology and a line with the same number of nodes as . First, we prove that . In fact, can always be derived from in the following way. Let denote the current line and set initially. We take away the lowest node of and attach it to another node one by one. Every time we take away the lowest node of , we set the rest of to the current line. So, we are sure to obtain a series of trees rooted at . Suppose that we get trees, in order. Let and , . Given any , is derived from by moving the lowest node of in . The new level in at which is located is lower than the previous level in . So, . Therefore, . Note that and , . We have
Therefore, for any .

Lemma 4. *Given any tree rooted at , one has,
*

* Proof. *It follows directly from , for all and , that .

On one hand,
where the equality holds if and only if all , , are equal. Let be a star rooted at , say, a special case of . On the other hand, we prove that for any . Let and . We label all the nodes in by numbers . Let , . Then we build the following restricted optimization problem:
Without loss of generality, we suppose that . By taking into the above objective function, we obtain a new unrestricted optimization problem
We conclude that, for every ,
Thus, and . This implies that and the tree rooted at satisfying the equality is just .

Lemma 5. *Given any of , one has
*

* Proof. *First of all, for any two edge-disjoint paths and on , we prove that and are independent. Suppose that contains edges and contains edges . It is obvious that . Since all of edges are independent, we conclude that
For any , comprises two edge-disjoint subpaths and . Therefore, .

Lemma 6. *Given any of and ,*(i)*if , then
*(ii)*if , then
*(iii)* if , where and , then
*

* Proof. *(i) When , it follows directly from the definition of that . We see that can be partitioned at into two edge-disjoint subpaths and . Lemma 5 implies that and are independent. The definition of means that the value of is equal to the probability of . So,

(ii) When , is composed of two edge-disjoint subpaths and . It follows from Lemma 5 that . So,
We see that works correctly if and only if and work correctly simultaneously. So, . Thus,

(iii) When , where and , we observe that , , consists of two edge-disjoint subpaths and . Also, comprises two edge-disjoint subpaths and as well. We derive that from Lemma 5. So,

We see that , , works correctly if and only if and work correctly simultaneously. So, . Thus,

#### 3. Algorithm for Finding a Sum-Max 2-MRS

*Definition 7. *Given and of , one lets , , denote the sum reachability in of . In addition, one lets (resp., ) denote the sum reachability in (resp., ) of .

Theorem 8. *Given any of , if , then one gets
*

* Proof. *It follows directly from the definition of given in Definition 7 that . We further derive from (2) that . By (6) in Lemma 2 together with the definitions of and , we conclude that

Theorem 9. *Given any of , if , then one gets
*

*Proof. *The combination of the definition of and (21) in Lemma 6 yields that . According to (7) in Lemma 2, for any , it is obvious that if and otherwise there must be a child of if such that belongs to . By Lemma 5, we obtain . Therefore, for all , we have

The definition of means . According to (8) in Lemma 2, for any , we are sure that is either in or in , where is a child other than of some node in . We can use (19) when and (20) when to compute if and use (22) otherwise. Thus, for all , we have

From (3), we conclude that

We can compute in the following way: for any , we first compute for all using (28) and then find the maximum among values of . We finally get by determining the maximum of the above maximums. This is essentially the main framework of our dynamic programming algorithm called SUM-MAX, shown in Algorithm 1. The key task is to compute all the values of . We see from Theorem 10 that the essence of computing is to compute and , and further from Theorem 9 that we can compute by (30) and by (31). Specifically, we derive from when is a leaf of and from when . Therefore, for any , we can first compute all the values of , , level by level from the bottom of to the top and afterward compute all the values of , , level by level likewise. Based on (31), we can accumulate the value of from to generation by generation for reducing the space.

In order to facilitate algorithm SUM-MAX working level by level, we need to transform into a rooted tree at every beforehand. For this purpose, we devise a preprocessing procedure called PREP. The major idea of procedure PREP is described roughly as follows: we use the *depth-first search* (DFS) method to traverse . DFS starts from . Let initially. When DFS reaches a new node via the edge , we set and compute . This process is repeated until DFS ends. DFS with as the origin produces a tree rooted at the origin, say, . All the times DFS’s obtain all the values of , for all , , which makes preparations for computing , , and further for any and . In addition, DFS also finds the set of all the leaves of , say, .

Theorem 10. *Given an undirected tree , where each edge has an independent working probability , algorithm SUM-MAX can find a Sum-Max 2-MRS of correctly with a time complexity of and a space complexity of . *

*Proof. *First, we analyze the time complexity of SUM-MAX. Step 0 takes time. Step 1 runs times DFS in total. In every running (i.e., for every ), Step 1 spends time to traverse and store , time to record , time to compute for each , and at most time to determine . So, Step 1 takes time in all. Next, SUM-MAX runs Step 2, Step 3, and Step 4 in order for every . Step 2 and Step 3 are both based on the bottom-up dynamic programming. Step 2 computes all the values of , , which takes time by (11). Step 3 computes all the values of , , the time complexity of which is by (9). Step 4 spends time to compute all the values of , . Therefore, the time complexity of SUM-MAX is at most .

Next, we discuss the space complexity of SUM-MAX. Step 0 occupies space. For every , Step 1 requires space to store , space to store all , , and , respectively, and at most space to store . Thus, Step 1 occupies space in total. For every , Step 2 requires space to store all the values of , ; Step 3 requires space to store , , which dominates the space complexity of Step 3, and Step 4 requires space to store , . Therefore, the space complexity of SUM-MAX is .

#### 4. Algorithm for Finding a Min-Max 2-MRS

*Definition 11. *Given and of , one lets , denote the minimum reachability in of . Also, one uses, (resp., ) to denote the minimum reachability in (resp., ) of .

Theorem 12. *Given any of , if , then one gets
*

* Proof. *We first derive from the definition of in Definition 11 that and further from (4) that . Combining (6) in Lemma 2 and the definitions of and , we conclude that

Theorem 13. *Given any of , if , then one gets
*

* Proof. *From the definition of and (21) in Lemma 6, we get that . Combining (7) in Lemmas 2 and 5, we conclude that

We derive from the definition of . Combining (8) in Lemma 2 and (22) in Lemma 6, we conclude that

From (5), we conclude that Observe that we can compute in the same way as computing . Therefore, we can devise a dynamic programming algorithm called MIN-MAX to find a min-max 2-MRS of based on the framework of SUM-MAX. The detailed presentation of MIN-MAX is omitted here and its major procedure is described as follows. Step 0 and Step 1 of MIN-MAX are same as those of SUM-MAX, which spends time and requires space in total. Let For every , Step 2 of MIN-MAX computes all , , by (37) bottom-up on which takes time and requires space. Also, Step 2 computes all , , by (42) which takes time and requires space. By (12), we conclude that Hence, the time complexity of Step 2 is . Also, we conclude by (11) that the space complexity of Step 2 is . By (38), we conclude that For every , Step 3 of MIN-MAX computes using the method of comparing generation by generation amongst . In every comparison, Step 3 first computes and then by (44). So, Step 3 spends time and requires space for every . Hence, Step 3 spends time by Lemma 3 and requires space. Step 4 of MIN-MAX is same as that of SUM-MAX. Therefore, we obtain Theorem 14.

Theorem 14. * Given an undirected tree , where each edge has an independent working probability , algorithm MIN-MAX can find a Min-Max 2-MRS of correctly with a time complexity of and a space complexity of . *

#### 5. Numerical Results

In this section, we give an example tree with 35 nodes shown in Figure 2 for illustrating algorithms SUM-MAX and MIN-MAX. The decimal associated with every edge of the tree represents its operational probability. All the nodes are labeled by numbers in order. For ease of view and comparison, the data output by algorithms are corrected to four decimal places and listed in Table 1. We first introduce the notations shown in the first line of Table 1. Let And then by (34) Similarly, let And then by (41)

From Table 1, it is easy to see that the maximum in the third column is and thus is the unique Sum-Max 2-MRS of the tree under the superior probability. The maximum in the fifth column is and thus is the unique Sum-Max 2-MRS of the tree under the united probability. Likewise, we can see easily that the maximum in the seventh column is and thus there are three pairs of Min-Max 2-MRS of the tree under the superior probability, that is, The maximum in the ninth column is and thus is the unique Min-Max 2-MRS of the tree under the united probability.

#### 6. Discussions and Future Works

This paper suggested the models of superior probability and united probability of node pair and studied two kinds of 2-MRS problem (i.e., Sum-Max 2-MRS and Min-Max 2-MRS) in a tree with each edge having an independent working probability and all the nodes being immune to failures. The paper presents -time and -space algorithm for finding a Sum-Max 2-MRS of the tree and -time and -space algorithm for finding a Min-Max 2-MRS. It is also interesting to study the 2-MRS problem in a series-parallel graph; see [7]. Two servers involved in the paper work synchronously. In a number of practical scenarios, however, one of two servers works and the other gets ready. In the case, we can first find the two most reachable nodes using the algorithms in [10, 20] and then placing two servers optimally by placing the working server at the most reachable node and the backup one at the second most reachable node.

When we are given a large-scale graph, we need to place more than two servers to supply synchronous service for the whole network. It is of interest to study the *-MRS problem* with . It seems that our method proposed in the paper cannot be directly generalized to the -MRS problem. Thus new ideas are required.

#### References

- J. A. Bondy and U. S. R. Murty,
*Graph Theory with Applications*, Macmillan, London, UK, 1976. View at MathSciNet - D. B. West,
*Introduction to Graph Theory*, Prentice Hall, Upper Saddle River, NJ, USA, 1996. View at MathSciNet - C. J. Colbourn,
*The Combinatorics of Network Reliability*, International Series of Monographs on Computer Science, Oxford University Press, New York, NY, USA, 1987. View at MathSciNet - D. R. Shier,
*Network Reliability and Algebraic Structures*, Oxford Science Publications, Oxford University Press, New York, NY, USA, 1991. View at MathSciNet - M. O. Ball and F. L. Lin, “Reliability model applied to emergency service vehicle location,”
*Operations Research*, vol. 41, no. 1, pp. 18–36, 1993. View at Google Scholar · View at Scopus - M. O. Ball, J. S. Provan, and D. R. Shier, “Reliability covering problems,”
*Networks*, vol. 21, no. 3, pp. 345–357, 1991. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - C. J. Colbourn and G. Xue, “A linear time algorithm for computing the most reliable source on a series-parallel graph with unreliable edges,”
*Theoretical Computer Science*, vol. 209, no. 1-2, pp. 331–345, 1998. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet · View at Scopus - W. Ding, “Computing the most reliable source on stochastic ring networks,” in
*Proceedings of the WRI World Congress on Software Engineering (WCSE '09)*, vol. 1, pp. 345–347, Xiamen, China, May 2009. View at Publisher · View at Google Scholar · View at Scopus - W. Ding, “Extended most reliable source on an unreliable general network,” in
*Proceedings of the International Conference on Internet Computing and Information Services (ICICIS '11)*, pp. 529–533, Hong Kong, China, September 2011. View at Publisher · View at Google Scholar · View at Scopus - W. Ding and G. Xue, “A linear time algorithm for computing a most reliable source on a tree network with faulty nodes,”
*Theoretical Computer Science*, vol. 412, no. 3, pp. 225–232, 2011. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet · View at Scopus - W. Ding and G. Xue, “A divide-and-conquer algorithm for finding a most reliable source on a ring-embedded tree network with unreliable edges,”
*Discrete Mathematics, Algorithms and Applications*, vol. 3, no. 4, pp. 503–516, 2011. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - W. Ding and G. Xue, “A fast parallel algorithm for finding a most reliable source on a general ring-tree graph with unreliable edges,” in
*Combinatorial Optimization and Applications*, vol. 6831 of*Lecture Notes in Computer Science*, pp. 98–112, Springer, Heidelberg, Germany, 2011. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - H. A. Eiselt, M. Gendreau, and G. Laporte, “Location of facilities on a network subject to a single-edge failure,”
*Networks*, vol. 22, no. 3, pp. 231–246, 1992. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - M. E. Helander and E. Melachrinoudis, “Facility location and reliable route planning in hazardous material transportation,”
*Transportation Science*, vol. 31, no. 3, pp. 216–226, 1997. View at Google Scholar · View at Scopus - E. Melachrinoudis and M. E. Helander, “A single facility location problem on a tree with unreliable edges,”
*Networks*, vol. 27, no. 3, pp. 219–237, 1996. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - P. B. Mirchandani and A. R. Odoni, “Locations of medians on stochastic networks,”
*Transportation Science*, vol. 13, no. 2, pp. 85–97, 1979. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - L. D. Nel and C. J. Colbourn,
*Locating a Broadcast Facility in an Unreliable Network*, vol. 28, INFOR, 1990. - J. Santivanez and E. Melachrinoudis, “Location of a reliable center on a tree network,”
*Operational Research*, vol. 7, no. 3, pp. 419–445, 2007. View at Publisher · View at Google Scholar - J. Santiváñez, E. Melachrinoudis, and M. E. Helander, “Network location of a reliable center using the most reliable route policy,”
*Computers and Operations Research*, vol. 36, no. 5, pp. 1437–1460, 2009. View at Publisher · View at Google Scholar · View at Scopus - G. Xue, “Linear time algorithms for computing the most reliable source on an unreliable tree network,”
*Networks*, vol. 30, no. 1, pp. 37–45, 1997. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet · View at Scopus - Y. Xiao, K. Thulasiraman, X. Fang, D. Yang, and G. Xue, “Computing a most probable delay constrained path: NP-hardness and approximation schemes,”
*IEEE Transactions on Computers*, vol. 61, no. 5, pp. 738–744, 2012. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - D. Yang, X. Fang, and G. Xue, “ESPN: efficient server placement in probabilistic networks with budget constraint,” in
*Proceedings of the IEEE INFOCOM 2011*, pp. 1269–1277, Shanghai, China, April 2011. View at Publisher · View at Google Scholar · View at Scopus - F. J. Berchmans, W. K. Hon, A. C. Y. Huang, C. S. Liu, E. Lo, and D. K. Y. Yau, “Optimizing link assignment to enhance service in probabilistic network,” in
*Proceedings of the 7th Annual IEEE Communications Society Conference on Sensor, Mesh and Ad Hoc Communications and Networks (SECON '10)*, Boston, Mass, USA, June 2010. View at Publisher · View at Google Scholar · View at Scopus - S. Ji, R. Beyah, and Z. Cai, “Snapshot and continuous data collection in probabilistic wireless sensor networks,”
*IEEE Transactions on Mobile Computing*, 2013. View at Publisher · View at Google Scholar - S. Ji, J. He, Y. Pan, and Y. Li, “Continuous data aggregation and capacity in probabilistic wireless sensor netwroks,”
*Journal of Parallel and Distributed Computing*, vol. 73, no. 6, pp. 729–745, 2013. View at Publisher · View at Google Scholar