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

This paper extends the well-known most reliable source (1-MRS) problem in unreliable graphs to the 2-most reliable source (2MRS) 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 fourmodels 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.


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 V, the communication between  and V is achieved by a -to-V 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][6][7][8][9][10][11][12][13][14][15][16][17][18][19][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 V a reachable node of  (or call V reachable from ) if  can reach V correctly.The probability of successful communication from  to V is called the reachable probability of  to V. 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 ( +  2 log )-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 1center 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 minmax 2-most reliable source (Min-Max 2-MRS).Given any a node pair ⟨, V⟩, the probability of  and V reaching another node  successfully is called the reachable probability of ⟨, V⟩ 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.

Preliminaries
2.1.Notations.Let G = (V, E, ) be an undirected connected graph, where V is the node set, E is the edge set, and each edge  ∈ E 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 ⟨, V⟩ be a node pair of G.We use (, V) to denote a simple path in G connecting  and V and also use (, V) to denote the event that (, V) works correctly for simplicity of presentation.Let Pr((, V)) denote the probability of (, V) working correctly and Pr(, V) the probability of  reaching V among G. Specifically, Pr((, V)) = () = (, V) when (, V) is just an edge  = {, V} in G.Note that (, V) works correctly if and only if all edges of (, V) work correctly simultaneously.Let V((, V)) and E((, V)) denote the set of nodes and edges on (, V), 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 ⟨, V⟩ of , there exists a unique path (, V) in  connecting  and V. Thus, it always holds that Pr(, V) = Pr((, V)) in .Let Pr(, ) = 1 when  = V.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 V ∈   , we use   (V) to denote the set of the children of V in   and   (V) to denote the subtree of   rooted at V. Let    (V) denote the set of nodes in   (V) and    (V) the set of nodes outside   (V).Specifically,   (V) = 0 and    (V) = {V} when V is a leaf of   .For any V ∈   , we use   (V) to denote the parent of V in   and Q  (V) to denote the set of ancestors of V in   .Specifically, Suppose that  is located at the 0th level in   .So,   has   + 1 levels in total.Let   (ℎ), ℎ = 0, 1, 2, . . .,   , denote the set of nodes on the ℎ-level of   .Also, we use  (resp.,   ) to denote the set of leaves of  (resp.,   ).Clearly,

Problem Statements.
Given any ⟨  ,   ⟩ of G and any V ∈ V, the maximum in the reachable probability of   to V and that of   to V is called the superior probability of ⟨  ,   ⟩ to V, denoted by F 1 (  ,   ; V).The probability of   to V,   to V, or both is called the united probability of ⟨  ,   ⟩ to V, denoted by F 2 (  ,   ; V).The superior probability and united probability are collectively called the reachable probability of node pair.
Problem 1.Given an undirected connected network G = (V, E, ), where every edge  ∈ E has a weight representing the working probability () on , the objective is to find a node pair in G 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 G from ⟨  ,   ⟩, denoted by E  [  ,   ].The optimal solution of Problem 1 with the objective of maximizing the sum reachability of node pair is called Sum-Max 2-MRS of G, denoted by ⟨ *  ,  *  ⟩.We have The minimum reachability of ⟨  ,   ⟩ is referred to as the minimum reachable probability of ⟨  ,   ⟩, denoted by M  [  ,   ].The optimal solution of Problem 1 with the aim of maximizing the minimum reachability of node pair is called Min-Max 2-MRS of G, 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.

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 ⟨𝑢
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,  1  ,  2  , . . .,    in order.Let  0  =  Δ  and Therefore, for any   .
Step 0  ← 1; Step 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 Q   (  ) = 0 initially.When DFS reaches a new node V via the edge {, V}, we set Q   (V) = Q   () ∪ {} and compute Pr(  , V) = Pr(  , )(, V).This process is repeated until DFS ends.DFS with   as the origin produces a tree rooted at the origin, say,    .All the || times DFSs obtain all the values of Pr(, V), for all , V ∈ ,  ̸ = V, which makes preparations for computing F  (  ,   ; ),  ∈ Q   (  ), and further Y    (  ) for any   ∈  and   ∈    .In addition, DFS also finds the set of all the leaves of    , say,    .
Proof.First, we analyze the time complexity of SUM-MAX.
Next, we discuss the space complexity of SUM-MAX.

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 00, 01, 02, . . ., 34 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 E and thus there are three pairs of Min-Max 2-MRS of the tree under the superior probability, that is, ⟨13, 28⟩ , ⟨13, 29⟩ , ⟨13, 32⟩ .

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 ((1/2)|| 3 )-time and (|| 2 )space algorithm for finding a Sum-Max 2-MRS of the tree and Ω(|| 3 )-time and (|| 2 )-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

Notation
Explanation G = (V, E, ) An undirected connected graph  = (, , ) An undirected tree graph   = (  ,   , ) A rooted version of  with  as the root {, V} An edge of graph ⟨, V⟩ A node pair (, V) A simple path connecting nodes  and V (also, the event that (, V) works correctly) Pr((, V)) The probability of (, V) working correctly Pr(, V) The probability of  reaching V V((, V)) The set of nodes on (, V) E((, V)) The set of edges on (, V)   (V) The set of the children of V in     (V) The subtree of   rooted at V    (V) The set of nodes in   (V)    (V) The set of nodes outside   (V)   (V) The parent of V in   Q  (V) The set of ancestors of V in    V  () The child of  on (, V) in    V  () The set of children of  in   other than  V  () The number of the most ancestors of node in   ℎ The current level of   (ℎ = 1, 2, . . .,   + 1)   (ℎ) The set of nodes on the ℎ-level of The set of leaves of The set of leaves of    ⊕ The union of two disjoint sets  and   = 1 The superior probability  = 2 The united probability F 1 (  ,   ; V) The superior probability of ⟨  ,   ⟩ to V F 2 (  ,   ; V) The with  ≥ 3. It seems that our method proposed in the paper cannot be directly generalized to the -MRS problem.Thus new ideas are required.

Figure 2 :
Figure 2: An example tree with a probability weight on every edge.

1
Use DFS to traverse  with   as the origin, store the resultant rooted tree    , record    (  ) and compute Pr(  ,   ) for all   ∈ , and store    ; if  ≤ || then  ←  + 1; goto Step 1; else  ← 1; goto Step 2; endif Step 2 for ℎ =    ,    − 1, . . ., 1, 0 do for all nodes   on the ℎ-level of    do X    (  ) ← 1; if   ∉    then Compute X    (  ) by (30); else break; endif endfor endfor Step 3 for ℎ =    ,    − 1, . . ., 1, 0 do for all nodes   on the ℎ-level of    do Y    (  ) ← 0; if   ̸ =   then  ←   ;  ← ℎ; while  ≥ 1 do  We can compute E  [ *  ,  *  ] in the following way: for any   ∈ , we first compute E    [  ] for all   ∈    \{  } using (28) and then find the maximum among || − 1 values of E    [  ].We finally get E  [ *  ,  *  ] 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 E    [  ].We see from Theorem 10 that the essence of computing E    [  ] is to compute X    (  ) and Y    (  ), and further from Theorem 9 that we can compute X      (  ) = 0 when   is a leaf of    and Y    (  ) = 0 from Q   (  ) = 0 when   =   .Therefore, for any   ∈ , we can first compute all the values of X    (  ),   ∈    , level by level from the bottom of    to the top and afterward compute all the values of Y    (  ),   ∈    , level by level likewise.Based on (31), we can accumulate the value of Y    (  ) from   to   generation by generation for reducing the space.

Table 1 :
All the major data produced by SUM-MAX and MIN-MAX.