Decision Diagram Based Symbolic Algorithm for Evaluating the Reliability of a Multistate Flow Network

. Evaluating the reliability of Multistate Flow Network (MFN) is an NP-hard problem. Ordered binary decision diagram (OBDD) or variants thereof, such as multivalued decision diagram (MDD), are compact and efficient data structures suitable for dealing with large-scale problems. Two symbolic algorithms for evaluating the reliability of MFN, MFN OBDD and MFN MDD, are proposed in this paper. In the algorithms, several operating functions are defined to prune the generated decision diagrams. Thereby the state space of capacity combinations is further compressed and the operational complexity of the decision diagrams is further reduced. Meanwhile, the related theoretical proofs and complexity analysis are carried out. Experimental results show the following: (1) compared to the existing decomposition algorithm, the proposed algorithms take less memory space and fewer loops. (2) The number of nodes and the number of variables of MDD generated in MFN MDD algorithm are much smaller than those of OBDD built in the MFN OBDD algorithm. (3) In two cases with the same number of arcs, the proposed algorithms are more suitable for calculating the reliability of sparse networks.


Introduction
With the development of science and technology, network models have been applied to many systems in various fields, such as computer networking, communication, transportation, gas and oil production, power transmission, and logistics [1][2][3].In the real world, many systems/networks have been abstracted as multistate systems (MSSs) [4][5][6], multistate networks (MSNs) [7][8][9], or stochastic flow networks (SFNs) [10][11][12].The components (transmission lines or nodes) of the MSN have several states (failure, working perfectly, and demotion work), so each state of the components is usually modeled to a certain capacity with a probability.The MSNs that satisfy the conservation law are denoted multistate flow networks (MFNs), which are more adaptive to real-word network models [3,[13][14][15][16].
Network failures can be disastrous and losses great, so network reliability evaluation has become a major prerequisite to ensure proper functioning of a network [3,9].Network reliability is defined as the probability that a required amount of flow (such as data, power, etc.) is transmitted successfully from source node  to sink node t [3].The reliability evaluation of a network is NP-hard problem [9].A lot of algorithms have been provided based on some assumptions, including inclusion and exclusion method [10][11][12], and sum of disjoint products method [13].These algorithms can provide an exact value of reliability, but they are limited to the enumeration of the variable combinations.Some approximation algorithms, like the upper and lower bound method [2], Monte Carlo simulation [17], and so forth possess relatively high efficiency but cannot get an exact value.Decision diagrams (DDs) have the advantages of high compactness and operability and of being able to express variable combinations implicitly and are thus one of the more feasible strategies to alleviate the problem of combinatorial explosion.Moreover, DDs can obtain an exact result with Shannon expansion or the extended form.Therefore, the decision diagram has been frequently used to evaluate network reliability because of the aforementioned advantages [18][19][20][21][22][23][24].These algorithms are mainly for evaluating the reliability of the networks with two-state component [18] or a single path transmission [19][20][21][22][23].

Mathematical Problems in Engineering
For a multistate flow network, most existing reliability evaluation algorithms are based on the set of minimal cuts/ paths [24,25], and generating the set of minimal cuts/paths is another NP-hard problem [1,26].Jane and Laih have studied the reliability computation of two-terminal MFNs using a decomposition algorithm, which is better than the exhaustive enumeration method with a lower space complexity, with the prior requirement that the state vectors (d flows) satisfy the demand without minimal cuts/paths [1,7].For the case of maximum flow and minimum cost, Terruggia and Bobbio presented a multivalued decision diagram (MDD) based method, which takes full advantage of the operation technology of multivalued decision diagrams so that the reliability evaluation of a MFN is simple and efficient, with a set of minimal cuts [24].
Thus, for calculating the reliability of a MFN, we attempt to propose an exact algorithm that simultaneously solves the following problems: (1) avoid searching for all minimal cuts/paths, and (2) alleviate enumerating the state space as far as possible.In view of this, first, we extend the formal definition of the MFN model to implement symbolic algorithms in this paper, and next two decision diagram based exact algorithms, MFN OBDD and MFN MDD, are proposed.A state vector (flow(d)) that satisfies the flow requirement is obtained by using the maximum flow algorithm in a constructed virtual network in the proposed algorithms, without locating all minimal cuts/paths.In MFN OBDD, the ordered binary decision diagram (OBDD) structure and its operation technology are introduced, a capacity/state of each arc is represented by a Boolean variable, and four operating functions are defined.The reliability of a MFN is then described and solved accurately.The MDD structure with multibranch and operation technology is introduced; each arc is denoted by a multivalue variable, and three operating functions are defined in MFN MDD.The correctness and efficiency of the algorithm are verified by experiments.Compared to the spatial decomposition algorithm of Jane and Laih [1], the proposed algorithms, which lower the computational complexity, do not require enumerating and decomposing the state space of the components.
The remainder of this article is organized as follows.In Section 2, an extended formal MFN model and a definition of MFN reliability are provided.In Section 3, elementary knowledge of OBDD and MDD is reviewed.In Section 4, the OBDD-based algorithm, MFN OBDD, and the MDD-based algorithm, MFN MDD, are proposed, and both their computational and storage complexity are analyzed.In Section 5, computational experiments are presented, and comparisons between the proposed algorithms and the decomposition algorithm of Jane and Laih are made.Conclusions are finally drawn in Section 6.

Multistate Flow Network
Model and Reliability An important property of MFN is that each node satisfies the flow conservation law.For a node, the total amount of traffic input is equal to the total output flow.Thus, the flow from the source into the network is equal to the output from the sink.
In this paper, network  must satisfy the following assumptions: (1) Each vertex is perfectly reliable.For the unreliable vertex case, vertexes and arcs can be treated as components of the same type.
(2) The capacity of each arc is stochastic with a given probability distribution.
(3) The capacities of different arcs are stochastically independent.
The vector of capacities c = ( 1 ,  2 , . . .,   ) denotes the state vector of the network where   ≤ C  is the state of   .(c) denotes the maximum flow from  to .Vector c is satisfiable for a specified demand  if (c) ≥ ; otherwise it is unsatisfiable.A satisfiable flow(d) can be obtained by Lemma 1.
Lemma 1 (see [1]).Given a MFN,  = (, , , , , , , , ), and a satisfiable state vector flow (d)   In this paper, we study the reliability evolution of a MFN with a demand .Then the MFN's reliability is defined as follows.
Definition 2. For a MFN  with demand  from source  to sink , the probability of the state space corresponding to the satisfiable vectors of the network with  is the reliability of the MFN.That is, the reliability of  is (2)

Ordered Binary Decision Diagram and Multivalued Decision Diagram
In this section, we review the concept of ordered binary decision diagrams (OBDD) and Multivalued Decision Diagram (MDD).An OBDD is a directed acyclic tree for Shannon decomposition and provides a compact, canonical, and efficiently manipulative representation for Boolean functions.A MDD is an extension of an OBDD.

Ordered Binary Decision
where  ∈ ,   is the complement of  (if  = 0,   = 1; else if  = 1,   = 0),  1 =  =1 , and  2 =  =0 .A BDD has two terminal nodes that correspond to Boolean constants, 0 and 1, respectively.Each nonterminal node denotes a Boolean variable  with two branches corresponding to the Boolean expressions  1 of  = 1 and  2 of  = 0 for Shannon decomposition.Then each nonterminal node in BDD represents an ite(x,  1 , and  2 ) and it is different from the others.
An ordered binary decision diagram (OBDD) is a BDD with a constant order for Boolean variables.The order of the Boolean variables from root to terminal is descending or increasing.Some operations can be defined between two OBDDs with the same variable order, and a new compact OBDD with the same variable order is obtained by an operation.
For example, Figure 1 shows the complete binary tree (Figure 1(a)) and the OBDD (Figure 1(b)) for the Boolean expression  =  1 ⋅ 2 +  1 ⋅ 3 with the variable order Π :  3 ≻  2 ≻  1 .Obviously, the OBDD stores the same information with fewer nodes.If we trace the path shows the OBDD for expression  =  1 ⋅  2 +   2 ⋅  3 with the same variable order, and Figure 1(d) shows the new OBDD obtained by an operation "⋅" (conjunctive, And) between the two OBDDs.

Multivalued Decision Diagram.
A multivalued discrete function  denotes the operation with  multivalued variables { 1 ,  2 , . . .,   } mapping to the range R. where If  denotes an expression on  = { 1 ,  2 , . . .,   }, the case format of a MDD is defined as where  ∈ .A MDD has  = |R| terminal nodes that correspond to the constants, { 0 ,  1 , . . .,  −1 }, respectively, and each nonterminal node denotes a variable  with |D  | branches corresponding to the expressions  = .Then each nonterminal node in a MDD represents a case format.
Similar to an OBDD, a new compact MDD is obtained by an operation between two different MDDs with the same variable order, and Property 1 is applicable for an OBDD or MDD.For example, Figure 2 shows the complete tree (Figure 2 In fact, the MDD can be further simplified.For  * , if  *  > 0 satisfies the requirement, terminal nodes 2 and 6 can be combined in one node 1 (True).This process will be used in our algorithm.
Property 1. Applying the operation for a nonnull OBDD (or MDD) W and  will unite the intersecting spaces.

Symbolic Algorithms for MFN Reliability Evaluation
Because of the efficient data structures of decision diagrams, we take advantage of a decision diagram to evaluate the reliability of a MFN defined in Section 2. We present the MFN OBDD algorithm based on OBDD in Section 4.1 and the MFN MDD algorithm based on MDD in Section 4.2.An example of the proposed algorithms is given in Section 4.3 and the complexity analysis of the algorithms is provided in Section 4.4.It is worth declaring that we are not discussing the decision diagram variables order, because it is an independent NP-hard problem.In this paper, the variables order is determined by the indexes of the edges and the edge states.

OBDD-Based Algorithm MFN OBDD for Reliability Evaluation.
The OBDD is used to study two-state system because of the two branches of the nodes in an OBDD.In this section, we propose an OBDD-based algorithm, MFN OBDD, for the reliability evaluation of a MFN.The method for variable encoding refers to Zang et al. 's algorithm [19]; that is, each state of an arc is represented by a Boolean variable.
The algorithm MFN OBDD is comprised of two major parts: (1) generation of the OBDD that implicitly expresses all of the state vectors that satisfy the demand d, without listing the vectors; and (2) calculation of the reliability of the MFN by using the defined specific function and traversing the obtained OBDD.The steps of MFN OBDD are performed as follows.
Step 2.3.Use   1 OBDD with a null initialization to save the OBDD of the state space Ω, and generate   1 OBDD by a function as created in the following formula: where "⋅" between  1 OBDD and  2 OBDD denotes a basic operation of BDD, that is called And, usually equivalent to conjunctive.
Step 3. The final OBDD is stored in d OBDD, and the initialization is null.d OBDD is generated with a function as the following: 1, ( OBDD = 1) ∨ (  1 OBDD = 1) , 0, otherwise.Step 5. Obtain the OBDD that implicitly expresses all the state vectors satisfying the demand .Then construct a specific function, which is implemented with Lemma 3 and the Proof, with the state probability to traverse d OBDD, and the reliability of  is obtained.
In algorithm MFN OBDD above, Steps 1-4 generate the OBDD that implicitly expresses all the state vectors satisfying the demand d, and Step 5 calculates the MFN reliability.
Proof.In algorithm MFN OBDD, we note that  , is a Boolean variable that has two branches, but the probability of  , is fixed and unique.So we write a function which can be explained as a virtual probability distribution of  , .Thus, the following deduction is produced: That is, we can calculate the reliability of MFN OBDD with this deduction when d OBDD is traversed; Rel() = ( = 1).Therefore, the lemma is proved.

MDD-Based Algorithm MFN MDD for Reliability Evaluation.
A MDD with multibranches has often been used for reliability evaluation of multistate networks.Here, a MDDbased algorithm, MFN MDD, is proposed for evaluating the MFN reliability.In algorithm MFN MDD, each arc is represented by a multivalued variable.
The algorithm MFN MDD consists mainly of two parts: (1) construction of the MDD that implicitly expresses all of the state vectors satisfying the demand , without listing the vectors, and (2) obtaining the MFN reliability by traversing the MDD.The steps in executing algorithm MFN MDD are as follows.
Step 1.Let each arc   be a MDD variable.The variable order is specified by Step 2. It is the same as Step 2 in algorithm MFN OBDD, and we obtain the flow(d) 1 and the space Ω.The MDD of Ω is generated following Steps 2.1 and 2.2.
Step 2.1.In order to simplify the format of MDD, generate the MDD with only two terminal nodes (0, 1) of arc   , named   MDD, with a defined operation.The MDD is generated according to the following rules: Step 2.2.According to the variable order Π  , the MDD, named   1 MDD, is constructed relying on the operation defined with following formula: where "⋅" between  1 MDD and  2 MDD denotes a basic operation of MDD, similar to BDD, that is called And, usually equivalent to conjunctive.
Step 3. Generate the result MDD, named d MDD with a null initialization, with the operation function defined in the following formula: 1, ( MDD = 1) ∨ (  1 MDD = 1) , 0, otherwise, (16) where "+" between d MDD and   1 MDD denotes another basic operation of MDD, that is called Or, usually equivalent to disjunctive. Step where (  ) =  denotes that   is in the state of  with capacity  , , then the reliability can be calculated by a formula as where  , is the probability of  , .
and because the root is   , we traverse d MDD starting with   above.Thus, the exact reliability is obtained, and thus the lemma is proved.

Illustrated Example.
A multistate computer network described in [1,7] is depicted in Figure 3 and is used to illustrate the proposed algorithms MFN OBDD and MFN MDD.The data of the arcs are shown in Table 1.Vertex 1 is the source, and vertex 4 is the sink.The demand from  to  reached 3; that is,  = 3.

Algorithm MFN MDD Process.
For the example depicted in Figure 3, steps in executing algorithm MFN MDD are as follows: (1) each arc is a multistate variable, and the variable order is specified with A flow, flow(3) 1 = (2, 1, 0, 0, 2, 1), is obtained.(3) For each variable,   MDD is constructed.In Figure 7, MDDs of  1 - 6 are shown.(4) According to the variable order,   1 MDD shown in Figure 8(a) is generated using operation And; then, , and the OBDD is the same as that depicted in Figure 8(a).( 5 For the proposed MFN MDD algorithm, Steps 2.1-2.2take ( ⋅ || +  ⋅ ( − 1)/2) time; and looping of Steps 2-4 take (( 3 +⋅||+(−1)/2+||  )⋅#) time.Theorem 1 in [17] states that it takes (||  /) to traverse the d MDD in the worst case, so the computational complexity of MFN MDD is (( For the decomposition algorithm of [1], the while . . .do loop repeats unspecified times # 1 , and it takes another # 2 stateBDD(a 1 , c 1,0 , 2) = 0 c 1,0 = 0 < 2 time because the number of flow(d) is unspecified.Thus, the algorithm takes ( 3 ⋅ # 1 ⋅ # 2 ) at least.Obviously, the proposed algorithms have certain advantages.The state vectors are stored in the decision diagrams (OBDDs or MDDs), which are tree date structures for the algorithm proposed in this paper.In the worst case, the OBDD takes (2 ⋅|| ) storage space in MFN OBDD, and the MDD takes (||  ) storage space in MFN MDD.And the decomposition algorithm of [1] requires ( ⋅ ∏  =1   ) memory space in the worst case.However, because of the implicit expression in a decision diagram, the number of nodes is far less than the number in the worst case.

Experimental Results
In this paper, the algorithm MFN OBDD is implemented based on the software package CUDD developed at the University of Colorado [27], while the algorithm MFN MDD is programmed using the MDD package MEDDLY developed at Iowa State University.Both of the proposed algorithms are executed on a workstation running in Ubuntu 14.04 with 3.3 GHz, with 4 GB of RAM.
Figure 10 depicts a multistate network with 12 vertexes and 21 arcs from [1].Vertex 1 is the source and vertex 12 is the sink.Each arc has three states with probabilities as specified  in Table 3. Table 4 shows the experimental results for both the proposed algorithms and the decomposition algorithm of [1] with demand  ranging from 1 to 5. Studying Table 4 leads us to conclude the following: (1) For the same demand, the number of decision diagram nodes generated in the MFN MDD algorithm is less than the collections of [1] and MFN OBDD's nodes is and no more than 65.When demand is small, for example,  = 1, 2, 3, the collections generated in the algorithm in [1] are less than MFN OBDD's nodes, but more than MFN OBDD's nodes when demand is large ( = 4, 5).In addition, the number of nodes in MFN MDD is far less than the collections number 1: collection is the main data structure of the algorithm in [1].It contains the lower bound of edge state vector, the upper bound of edge state vector, the edge state flow vector, the vector of nonzero state edges, and two constants.
in [1].However, according to the size of defined collection or node in different algorithms, the storage space is ordered as [1] > MFN OBDD > MFN MDD.
(2) The CPU time for executing the proposed algorithms increases with increasing d, and the CPU time for executing the MFN MDD algorithm is less than that for the MFN OBDD algorithm.The execution efficiency of MFN MDD algorithm is higher than the algorithm in [1] with a small demand ( = 1, 2).And in other cases, the execution efficiency of proposed algorithm is slightly lower than the algorithm in [1].
(3) The loops number of proposed algorithms depend on the demand .In most cases, it is much smaller than the loops number of the decomposition algorithm in [1].
In order to analyze the proposed algorithms, we select four more networks generated randomly; three of them, depicted in Figures 11(a)-11(c), are from [14], and that depicted in Figure 11(d) is from [1].In this experiment, we specify that each arc of the five networks (including Figure 10) has three capacities, 0, 1, and 3, and the probabilities of states 0, 1, and 3 for each arc are 0.05, 0.25, and 0.70, respectively.Moreover, the demand is  = 3.Table 5 lists the experimental results for the proposed algorithms.Two conclusions can be drawn from studying Table 5: (1) For the same network, the number of nodes and the number of variables of the DD generated in  the MFN MDD algorithm are both less than that of MFN OBDD.The MFN OBDD algorithm takes more CPU time to run.Because a state is a Boolean variable in the MFN OBDD algorithm and the MFN MDD algorithm makes an arc into a multivalue variable, the DD generated in the MFN OBDD algorithm has a larger scale, thus leading to the conclusions described directly above.
(2) If the number of arcs is fixed and the number of vertexes is increased, such as in the networks depicted in Figures 11(b), 11(c), and 7, the experiments show that the number of nodes generated in either MFN OBDD or MFN MDD algorithm decreases.The CPU time also decreases.Therefore, in the case of the same arc number, both of the proposed algorithms have more advantages for sparse networks.

Conclusions
In this paper, we have extended the definition of a MFN model and have proposed the MFN OBDD algorithm based on BDD and the MFN MDD algorithm based on MDD to solve the problems in evaluating MFN reliability.The algorithms were applied to a simple MFN, and the attendant processes verified the feasibility of the algorithms.Experiments were carried out on five different networks, and the results show that (1) for the same network, the MFN OBDD algorithm is more effective than the algorithm presented in [1] in terms of storage; in addition, due to the multibranch nature of a MDD, the storage efficiency of the MFN MDD algorithm is better than that of the MFN OBDD algorithm; (2) the runtime and the variables number of generated decision diagram in MFN MDD algorithm are both less than those of the MFN OBDD algorithm; (3) the storage space and CPU time of the proposed algorithms depend on the demand; and (4) the proposed algorithms have more advantages for sparse networks with the same number of arcs.The correctness, accuracy, and validity of the proposed algorithms were verified by the experiments.Furthermore, it would be worthwhile to improve the efficiency of algorithms' implementation.
4. Loop to execute Steps 2 and 3 until all flow(d) i is searched the same as in Step 4 in algorithm MFN OBDD, and a flow flow()  =    ( 1 ,  2 , . . .,   ) = (  At this point, d MDD obtained can implicitly express all of the state vectors satisfying the demand .Then, a specific function is constructed with Lemma 4 and the Proof with the state probability to traverse d MDD, and the reliability of  is obtained.

Table 1 :
Data of arcs of Figure3.

Table 2 :
Boolean variables of arcs of Figure3.

Table 3 :
States and probabilities of arcs for Figure10.

Table 4 :
Experimental results for different algorithms.

Table 5 :
Experimental results for proposed algorithms.