A genetic algorithm for the arrival probability in the stochastic networks

A genetic algorithm is presented to find the arrival probability in a directed acyclic network with stochastic parameters, that gives more reliability of transmission flow in delay sensitive networks. Some sub-networks are extracted from the original network, and a connection is established between the original source node and the original destination node by randomly selecting some local source and the local destination nodes. The connections are sorted according to their arrival probabilities and the best established connection is determined with the maximum arrival probability. There is an established discrete time Markov chain in the network. The arrival probability to a given destination node from a given source node in the network is defined as the multi-step transition probability of the absorbtion in the final state of the established Markov chain. The proposed method is applicable on large stochastic networks, where the previous methods were not. The effectiveness of the proposed method is illustrated by some numerical results with perfect fitness values of the proposed genetic algorithm.

paper is a directed acyclic stochastic network with known discrete distribution probabilities of leaving or waiting in nodes.
Our criterion to evaluation of the connections from the source node toward the destination node in the network is presented as the arrival probability, which is obtained by the established discrete time Markov chain (DTMC) in the network. Liu (2010) applied models according to the decision criteria and converted them into deterministic programming problems. Hutson and Shier (2009) and Rasteiro and Anjo (2004) determined the path with maximum expected value of a utility function. Fan et al. (2005) proposed a procedure for dynamic routing policies. Nie and Fan (2006) formulated the stochastic on-time arrival problem with dynamic programming, and Fan et al. (2005) minimized the expected travel time. In this paper, the maximum arrival probability from a given source node to a given destination node is computed according to known discrete distribution probabilities of leaving or waiting in nodes, and a DTMC stochastic process is used to model the problem rather than dynamic programming or stochastic programming. Kulkarni (1986) developed a method based on a continuous time Markov chain (CTMC) to compute the distribution function of the shortest path length. Azaron and Modarres (2005) applied Kulkarni's method to queuing networks. Thomas and White (2007) modeled the problem of constructing a minimum expected total cost route as a Markov decision process. They wanted to respond to dissipated congestion over time according to some known probability distribution. From the static viewpoint, our studied model is related to the dynamic time-evolving networks recently studied by Shang (2015a, b), however problems addressed are from a different field.
The stochastic topology of networks motivated us to consider the arrival probability from the source node toward the destination node. So, the arcs of the network could be congested probably, that it is commonly happen in communication and transportation networks where the connecting arcs of some nodes are unable to transmit flow. The stochastic topology of the network causes several unstable connections between nodes; however, the physical topology of the network determines possible and impossible connections between pairs of nodes. The leaving distribution probability from one node toward another node is known as the probability that their connected arc to be uncongested. A DTMC with an absorbing state is established and the transition matrix is obtained. Two conditions at any state of the established DTMC are assumed: departing from the current state to a new state when a larger labeled node is visited in the original network, or waiting in the current state with expecting better conditions. Then, the probability of arrival the destination node from the source node is computed as the multi-step transition probability from the initial state to the absorbing state in DTMC.
The proposed method applies DTMC and a genetic algorithm is produced to obtain an acceptable solution, that it applies small locally created state spaces instead of the original large state space. The computed arrival probability describes the overall situation of the network to transmit flow from the source toward the destination; while, the previous works focused on a specific path Liu (2010), Hutson and Shier (2009), Rasteiro and Anjo (2004).
The remain of the paper is organized as follows. Section "The stochastic topology of the network" consists of some preliminary definitions and assumptions for the considered model of the stochastic network. The established DTMC and computational method for the arrival probability is presented in "The established discrete time Markov chain" section. In "A genetic algorithm to find the arrival probability" section, a genetic algorithm is presented to approximate the arrival probability. In section "Numerical results", some implementations of the proposed method on the networks with large size of nodes and arcs are provided.

The stochastic topology of the network
Directed acyclic networks are considered for various applications, some of typical examples are related in the following: citation networks in information sciences, phylogenetic networks in biology, data structures in computer science and engineering, acyclic graphs in pure mathematics, random graphs and Bayesian networks in statistics, and etc. (for more details see Ahuja et al. 1993;Karrer andNewman 2009). Recently, Shang (2014) considered group consensus problems in generic linear multi-agent systems with directed information flow under directed fixed interaction topology and randomly switching, where the underlying networks are governed by a continuous-time Markov process.
Let network G = (N , A), with node set N and arc set A, be a directed acyclic network. Then, we can label nodes in a topological order such that for any (i, j) ∈ A, i < j (Ahuja et al. 1993). The physical topology for any (i, j) ∈ A shows the connection of nodes i, j ∈ N. Actually, the physical topology shows the possibility of communication between nodes in the network. To model the stochastic topology of a network think about the transportation networks, where there are some physical connections between nodes but we cannot traverse anymore toward the destination node because of probable congestion. Network G has a stochastic topology if there are some facilities in the network but it is not possible to use them continuously. So, the existence of any arc (i, j) ∈ A does not mean there is a stable communication between nodes i, j ∈ N all the time (it could be probably congested). For any node i, it is supposed that the uniform distribution probabilities of leaving arcs (i, j) to be uncongested are known. Now, consider the situation that flow arrives in a node but cannot leave because of the stochastic topology (some arcs are congested), then waits for better conditions. There are two options for wait situations: first, waiting in a particular node with expecting some facilities to release from the current situation, which is called option 1, second, traversing some arcs those do not lead to visit a new node, which is called option 2. The stochastic variable of arc (i, j) according to a stochastic topology is shown by x ij . If x ij = 1, it is possible to traverse arc (i, j) and otherwise x ij = 0. The probability that arc (i, j) to be uncongested is q ij = Pr[x ij = 1]. Then, the wait probability in node i, is q ii = 1 − {j:(i,j)∈A} q ij . Figure 1 shows the example network with its topological ordered nodes and it is the initial physical topology of the network. The numbers on arcs show the leaving probabilities q ij . Node 1 is the source node and node 5 is the destination node. It is not possible to traverse arc (1, 4) because it does not exist in the physical topology of the example network. However, the arcs in the physical topology could be congested according to the known distribution probabilities. Kulkarni (1986), Azaron and Modarres (2005) considered an acyclic directed network. They produced a CTMC and in each transition from one state to another possibly more than one node can be added. Then, they computed the length of the shortest path with exponentially distributed arc length. We propose a DTMC with discrete distributed probabilities, such that in each transition only one node can be added, and the wait states are more extended. The discrete time stochastic process {X r , r = 1, 2, 3, ...} is called Markov chain, if it satisfies the following Markov property (see Ross 2006 andThomas andWhite 2007) Any state S l of the established DTMC determines the traversed nodes of the original network. For the example network ( Fig. 1) the created states S i , are shown in Table 1. The conditional probability of next state depends on the current state and independent of the previous states. Let S = {S i , i = 1, 2, 3, ...}, the initial state S 1 = {1} of DTMC contains the single source node and the absorbing state S |S| = {1, 2, ..., |N |} contains all nodes of the network and it is not possible to depart; so, S is a finite state space (it is not possible departing from S |S| ).

The established discrete time Markov chain
For the example network, the absorbing state S 8 = {1, 2, 3, 4, 5} contains all nodes of the network; and the instance state S 4 of the state space S (Table 1) contains nodes {1, 2, 3} and all connected components of the example network, those are constructed by nodes 1, 2 and 3, see Fig. 2.
The final state contains the destination node of the network, where DTMC does not progress anymore (Assumption 1). The states of the established DTMC contain the  traversed nodes of the network, those are reached from some nodes in a previous state (Assumption 2). It is not allowed to return from the last traversed node, however it is possible to wait in the current state. Clearly, a new state is revealed if a leaving arc (i, j) ∈ A is traversed such that the current node i is contained in the current state and the new node j is contained in the new state (Assumption 3). As previously said, the wait states are one of option 1 or option 2. So, following assumptions describe construction of the state space of the established DTMC: 1. By arriving the destination node, the process can traverse neither any node nor any arc (i.e. the absorbing state) 2. The new state is created, if a new node is added to the current state nodes 3. According to the current state, it is allowed to reach only one node during transition to a new state.
Finally, by Assumptions 1, 2 and 3 all possibilities of transmission flow from the source node toward the destination node in the network are examined dynamically. The state space diagram of the established DTMC for the example network is constructed as Fig. 3; the values on arcs show the wait and the transition probabilities.

The transition and the wait probabilities
The transition probabilities p kl satisfy the following conditions • 0 ≤ p kl ≤ 1 for k = 1, 2, ..., |S| and l = 1, 2, ..., |S| • l p kl = 1, for k = 1, 2, ..., |S|. The transition probabilities are elements of matrix P |S|×|S| , where p kl is kth row and lth column of matrix P, and it is called the transition matrix or Markov matrix (Ibe 2009). The transition matrix of the established DTMC in the network is obtained by following theorems. The transition probabilities (except to the absorbing state) are obtained by Theorem 1.
Theorem 1 If p kl is kl element of matrix P, that k � = l, l < |S| and S k = {v 0 = 1, ..., v m } is the current state, then the transition probability from state S k to state S l is computed as follow Proof Since, it is not allowed to traverse from one state to the previous states (Assumption 2), then necessarily p kl = 0, for l < k. Otherwise, suppose l > k, during transition from the current state S k to the new state S l , it should be reached just one node other than the nodes of the current state, so |S l \S k | = 1, v ∈ S k , and w ∈ S l \S k are held by Assumptions 2 and 3. Two components of p kl formula should be computed.
In the last node v m of the current state S k , it is possible to wait in v m with probability q v m v m . Notice, it is not possible to wait in the other nodes v ∈ S k \{v m } because it should be leaved to construct the current state, however it is not necessary for node v m with the largest label (leaving v m leads to a new node, and therefore results in a new state). If w ∈ S l \S k , then one or all of events E vw (i.e. traversing a connecting arc between a node of the current state and another node of the new state) can happen for (v, w) ∈ �, and the arrival probability of node w ∈ S l from the current state S k is equal to The collection probability should be computed because of deferent representations of the new state (for example see Fig. 2). Then, the nodes of the current state v ∈ S k \{v m } (while waiting in v m ) should be prevented from reaching other nodes u / ∈ S k and u � = w (Assumption 3), so arcs (v, u) are not allowed to traverse and they are excluded simulta- ) . The other possibility in node v m that is leaving it toward the new node w ∈ S l \S k with probability q v m w . For example, in the established DTMC of the example network, the transition probability p 47 is computed by the constructed components as shown in Fig. 4; and it is Pr(E 14 ∪ E 24 ) × (1 − q 15 )(1 − q 25 ) × q 33 + q 34 , where Pr(E 14 ∪ E 24 ) = q 14 + q 24 − q 14 q 24 , however q 14 = q 15 = q 25 = 0 as shown in Fig. 1, then p 47 = q 33 × q 24 + q 34 . It is possible to wait in node 3 but not other nodes of the current state S 4 = {1, 2, 3}; where, by traversing arc (2, 4) or (3, 4) the new state S 7 = {1, 2, 3, 4} is revealed.
Theorem 2 describes the transition probabilities to the absorbing state S |S| , and they are the last column of the transition matrix P.
Theorem 2 To compute the transition probability from state S k = {v 0 = 1, ..., v m } to the absorbing state S |S| for k = 1, 2, ..., |S| − 1 , which is k|S| th element of matrix P, suppose v n ∈ S |S| is the given destination node of the network then E vv n denotes the event that arc (v, v n ) ∈ A of the network is traversed during the transition from S k to S |S| .
Proof To compute the transition probabilities p k|S| , for k = 1, 2, ..., |S| − 1 it should be noticed the final state is the absorbing state S |S| = {1, 2, 3, ..., |N |} containing all nodes of the network, and the stochastic process does not progress any more (Assumption 1). So, it is sufficient to consider leaving arcs (v, v n ) from v ∈ S k , the nodes of the current state, toward the destination node v n ∈ S |S| . Then, one or all of events E vv n (i.e. traversing a connecting arc between a node of the current state and the destination node of the absorbing state) can happen and the transition probability from the current state S k to the absorbing state S |S| is totally equal to Pr[ v∈S k ,(v,v n )∈A E vv n ]. The collection probability should be computed because of deferent representations of the states (for example see Fig. 2).
For state S 4 , transition probability p 48 is obtained by Pr(E 15 ∪ E 25 ∪ E 35 ), however q 15 = q 25 = 0, then p 48 = q 35 . The wait probabilities, those are the diagonal elements of the transition matrix P, are obtained by Theorem 3.
Theorem 3 Suppose S k = {v 0 = 1, ..., v m } is the current state, then the wait probability p kk is kth element of matrix P and it is Proof The wait probabilities p kk are the complement probabilities of the transition probabilities from the current state S k , for k = 1, 2, ..., |S| − 1, toward the all The constructed states during transition from S 4 to S 7 departure states S j , for j = k + 1, k + 2, ..., |S|. Then, we have p kk = 1 − |S| j=k+1 p kj , for k = 1, 2, ..., |S| − 1, in other word, they are the diagonal elements of matrix P, those are computed for any row k = 1, 2, ..., |S| − 1 of the transition matrix (see Ibe 2009). The absorbing state S |S| does not have any departure state, so p |S||S| = 1 as the transition matrix P. □

The arrival probability
The arrival probability determines the reliability of connections in the network, and it shows the probability that they are not congested during transmission flow from the source node to the destination node in the network. The arrival probability is defined as multi-step transition probability from the initial state S 1 to the absorbing state S |S| in the established DTMC. According to Assumptions 1, 2 and 3, the state space of DTMC is directed and acyclic (otherwise return to the previous states is allowed). Out-degree of any state is at least one (without loop wait transition arcs consideration), except the absorbing state S |S| , then for any state S k , there is one\multi-step transition from the initial state to the absorbing state that traverses state S k . Consequently, the absorbing state is accessible from the initial state after some finite transitions. Let p kl (r) = Pr[X m+r = S l |X m = S k ] denote the conditional probability that the process will be in state S l after exactly r transitions, given that it is presently in state S k . So, if matrix P(r) is the transition matrix after exactly r transitions, it can be shown that P(r) = P r , and let p kl (r) be klth element in matrix P r (see Ibe 2009). Thus, the arrival probability after exactly r transitions is p 1|S| (r) = Pr[X r = S |S| |X 0 = S 1 ] and it is the 1|S|th element in the matrix P r . For the example network, we want to obtain the probability of the arrival node 5 from node 1. The arrival probability p 18 (r) is obtained as shown by solid line in Fig. 5 after seven transitions. For r sufficiently large, the probabilistic behavior of DTMC becomes independent of the starting state i.e. Pr[X r = S |S| |X 0 = S 1 ] = Pr[X r = S |S| ], that is the multi-step transition probability (Ibe 2009). For the example network, it is 0.9994.

Arrival probability
Transition 8

A genetic algorithm to find the arrival probability
Although it has been shown Markov decision problems could be solved in polynomial time (Papadimitriouc and Tsitsiklis 1987), computations grow exponentially in practice (Littman et al. 1995). The proposed DTMC is very sensitive to the size of the networks (specially the size of the node set), and its constructed state space is grown exponentially (see last column in Table 2). Then, a genetic algorithm is produced to obtain a near optimal solution. So, it is a polynomial time algorithm since it is done over the established DTMC, which has polynomial computation complexity. However, the proposed genetic algorithm applies small locally created state spaces instead of the gigantic large state space.
The proposed genetic algorithm needs to obtain some initial feasible solutions, so the first step is to extract some sub-networks from the original network with local source nodes and destination nodes. Extracting the sub-networks is applied by all operators of the proposed genetic algorithm and it is presented as a basic operator. We need to define three types of operators as described by Sivanandam and Deepa (2008) and Dréo et al. (2006). The initial population operator extracts some sub-networks and their required complement components to establish connections between the original source and destination nodes. Then, the crossover operator tries to obtain new populations from the current initial populations and to replace the worst ones with the best ones. To avoid probable local optimality, the mutation operator extends the search area of selecting local source and destination nodes. Therefore, the sub-networks inherit all characteristics of the original network; they are directed, acyclic and all nodes are reachable from the local source node and the local destination node is reachable form all nodes. A connection is a union of some sub-networks, those the local source node of one is the local destination node of another one and it can transmit flow from the original source node toward the original destination node.

Extracting a sub-network from the original network
Any sub-network from the original network needs a source node that sends flow faster than those nodes their labels are smaller and it should be the smallest index that could be departed from. Also, it needs a destination node which receives flow faster than those nodes their labels are grater and it should be the greatest index that could be arrived. So, consider the following situations: • If node i is a local source node for a sub-network, then the leaving probabilities are changed as below • If node j is a local destination node for a sub-network, then the weights of arcs are changed as below By (1) and (2) we will be able to separate a component of the network; however, there maybe exist some nodes except the local source node with in-degree zero, or some nodes except the local destination node with out-degree zero, they could be determined from the changed arc weight matrix. The node set and the new arc weight matrix for a sub-network are generated as below: Extracting sub-network operator 1. For any node v satisfying (1) and (2) omit node v from the node set and row v and column v form the arc weight matrix. 2. While there exists any zero row k (column k) except the row and the column of the local destination node, omit node k from the current node set and row k and column k from the current arc weight matrix.
Therefore, the operator I guaranties existence of a local source node and a local destination node, and the operator II guaranties connectivity. So, if the local destination node is unreachable from the local source node, then the final arc weight matrix will be an identity matrix of size (|N | − 1) × (|N | − 1), and the current local source and destination nodes should be changed and the extracting operator is repeated. At the end of the extracting operator, for any node i there exists a path from the local source node to any node i of the extracted sub-network, as well as a path from any node i of the extracted network to the local destination node; otherwise, there is a contradiction with the original network characteristics. Except the first column and the last row, there are no zero columns or rows in the weight matrix of the sub-network (the wait probabilities are replaced with the zero diagonal elements of the matrix). For the example network, we suppose the constructed components of the sub-networks have at most three nodes.

The initial population operator
To accomplish a connection between the original source and destination nodes, it is required to produce some complement components. Obviously, there should exist such components those could connect together, otherwise there is not feasible solution for the problem. The proposed genetic algorithm starts with some randomly created initial components; then, mid-components are obtained such that a connection between the original source node and the original destination node is established. For producing complement components, the local destination node of a sub-network and the local source node of another one are selected according to their labels, then a mid-component is created with these successive local source and destination nodes; especially, the original source node and the original destination node are considered as components themselves.

The initial population operator
1. Choose a local source node and a local destination node randomly. 2. Extract the sub-network with local source and destination nodes (initial component). 3. Put the initial local source node as s 0 , and the initial local destination node as d 0 . 4. Create a mid-component between the original source node and s 0 : put s 0 as the local destination node, then select randomly the local source node i for i < s 0 ; if i � = s, then put s 0 = i and repeat. 5. Create a mid-component between d 0 and the original destination node: put d 0 as the local source node, then select randomly the local destination node i for i > d 0 ; if i � = d, then put d 0 = i and repeat.
The connections are sorted according to their fitness values from the worst one to the best one. The fitness value shows the arrival probability from the original source node to the original destination node (see "The arrival probability" section). The initial population operator is ended when the number of the initial populations is satisfied. The implementation of the initial population operator on the extracted sub-networks of the example network creates connections as shown in Fig. 6.

The crossover operator
To produce new populations of the current populations and to improve the current optimality, we define the crossover operator similar to the initial population operator, except that the local source and the destination are selected form the nodes belonging to subnetworks. To produce distinct populations, the algorithm chooses one node from the set Fig. 6 The created connections of the extracted sub-networks π 1 = {the nodes belonging to the initial population i}−{the nodes belonging to the initial population j} and another node from the set π 2 = {the nodes belonging to the initial population j} − {the nodes belonging to the initial population i}, i � = j , if none of them is empty; otherwise, one of the obtained initial populations is the sub-set of the other one and the algorithm extends the search area by the mutation operator.
The crossover operator 1. If none of sets π 1 and π 2 is empty then randomly choose one node belonging to π 1 and one node belonging to π 2 , as the local source node and the local destination node, according to their labels. 2. Extract a sub-network and apply the initial population operator on the new extracted sub-networks.

The mutation operator
To avoid local optimality the mutation operator extends the search area to other parts of the network. So, if the current populations do not change during the crossover operator (one of sets π 1 and π 2 is empty), the mutation operator extends the search area of the local source and destination nodes detection, and it tries to change the current populations and improves the arrival probability.

The mutation operator
1. Select two nodes randomly belonging to N − ({initial population i} {initial population j}) as the local source node and the local destination node. 2. Extract a sub-network and apply the initial population operator on the new extracted sub-networks.

Fitness function
The selection operator through the algorithm is a ranked selection operator. Connections are sorted from the worst one to the best one, then the proposed genetic algorithm replaces the worst one with the new connections of the improved fitness values. After the multi-step transition probabilities of the all components contained in any population were computed, a path is constructed between the original source node and the original destination node through the local destination nodes of the initial population. Then, by the similar process to the original network, the arrival probability is computed for the path and it is recorded as the fitness value of the population. In any iteration, the above process is repeated for the optimal populations with the maximum arrival probabilities. Out-put of the proposed genetic algorithm for the example network is shown by dash line in Fig. 5. The obtained arrival probability is 0.9975 and it is given after 7 transitions, with 5 initial populations and its fitness value is 1.0000.

Numerical results
Some implementations of the proposed method on large networks are presented in this section (see Table 2). The networks are acyclic directed networks and there is a path from each node to the destination node. The leaving and waiting probabilities of nodes are random numbers produced by the uniform distribution probability. Then, the arrival probability is computed for the established DTMC. All of the experiments are coded in MATLAB R2008a and they are performed on Dell Latitude E5500 (Intel(R) Core(TM) 2 Duo CPU 2.53 GHz, 1 GB memory). Any increment in the number of nodes and arcs of the network increases the state space size, consequently. So, the transition matrix and its related computations need gigantic amount of memory (see last column of Table 2) such that it is not easy to find the exact solution. For networks with 10 nodes, the size of the state space is about hundreds, for networks with 20 nodes it is about thousands, and for networks with 30 nodes it is about millions, and so on. Third column of Table 2 shows required nodes to create the sub-networks and the arrival probabilities are obtained with transition numbers.
The implementations of the proposed genetic algorithm according to the arc numbers are shown in Fig. 7. Results show the numbers of the components containing in the constructed sub-networks and the numbers of transitions, both are two most important parameters to obtain the arrival probability by the proposed genetic algorithm.

Conclusion
We considered an established discrete time Markov chain stochastic process over directed acyclic networks. The arrival probability from a given source node to a given destination node was computed according to the probability of transition from the initial state to the absorbing state by multi-step transition probability in DTMC. A genetic algorithm was proposed for large networks, where the state space of the established DTMC grew as rapidly as exponentially. However, the proposed genetic algorithm applied small locally created state spaces instead of the gigantic large state space. Numerical results showed efficiency of the proposed method to obtain the multi-step transition probability that the destination node is accessible for the first time. Extension of described model on the continuous time varying networks, and using the discrete nature of the proposed model to apply meta-heuristic methods and reducing the computations can be considered as future works guidelines. Also, the shortest path problem with recourse where some local decisions are made during routing process and they could be evaluated by the proposed method.
Arc number 800 800 0.8 0.8 Arrival probability Fig. 7 The out-put of the genetic algorithm according to arc number