# Adapting Probabilistic Flooding in Energy Harvesting Wireless Sensor Networks
## 5 Markov Chain Analysis  
In this section, the proposed four-state Markov chain is simplified and analyzed. It is observed from Figure 1 that certain transition probabilities can be merged and omitted. As it is mentioned in Section 3, a node is considered operational if its battery level is above a particular threshold. Thus, an operational node whose battery is being charged (i.e., ON-C) is not expected to transit directly to a non-operational state (i.e., OFF-C, OFF-D). Therefore, the transition probabilities \(p_{1\to 3}\) and \(p_{1\to 4}\) can be omitted. Similarly, the transition probabilities \(p_{4\to 1}\) and \(p_{4\to 2}\) can also be omitted, since a node being in a non-operational state and whose battery is discharging (i.e., OFF-D) first needs to collect a certain amount of energy in order to become operational again. Furthermore, a node that is operational and its battery is discharging (i.e., ON-D) is not expected to become non-operational and charge its battery (i.e., OFF-C) directly, thus \(p_{2\to 3}\) and \(p_{3\to 2}\) can be omitted. It should be mentioned that certain states have been ignored (e.g., energy harvester's charging mechanism failure) in order to keep this model simple and derive tractable analytical expressions regarding the state probabilities. Let \(\alpha\) and \(\beta\) denote the probabilities that a node's battery is charging and discharging, respectively, and it is expected to stay in the particular state. Let also \(\gamma\) denote the probability moving from the state ON-D to the state ON-C. Consequently, \(p_{1\to 1}=p_{3\to 3}=\alpha\), \(p_{2\to 2}=p_{4\to 4}=\beta\) and \(p_{2\to 1}=\gamma\). In order to simplify further, the Markov chain and given that \(\gamma\) corresponds to the probability of moving from a discharging state to a charging mode of operation, analogously, it is assumed that the movement from the charging state OFF-C to the charging state OFF-D is equal to \(1-\gamma\). Eventually, and given that the sum of the transition probabilities for a particular state equals to one, it follows that  
\[p_{1\to 2}=1-\alpha, \tag{1}\]  
\[p_{2\to 4}=1-\beta-\gamma, \tag{2}\]  
\[p_{3\to 1}=\gamma-\alpha, \tag{3}\]\[p_{3\to 4} =1-\gamma, \tag{4}\] \[p_{4\to 3} =1-\beta. \tag{5}\]  
Considering Equations (1)-(5) and the previous assumptions, the proposed four state Markov chain presented in Figure 1 can be simplified to the one presented in Figure 3.  
It is also assumed that the transition probabilities are larger than zero and smaller than one (i.e., \(0<p_{i\to j}<1\) for \(i,j\in\{1,2,3,4\}\)); otherwise, the proposed Markov chain is reduced to a trivial one. Therefore, \(0<1-\beta-\gamma<1\) and \(0<\gamma-\alpha<1\) or, \(\gamma<1-\beta<1+\gamma\) and \(\alpha<\gamma<1+\alpha\), respectively. Since \(0<\gamma<1\), it follows that \(\alpha<\gamma<1-\beta\). Let \(p_{1}\), \(p_{2}\), \(p_{3}\), \(p_{4}\) denote the probability of a node be in state ON-C, ON-D, OFF-C, OFF-D, respectively. Equations (6)-(9) present the analytical expressions of these probabilities as a function of \(\alpha\), \(\beta\) and \(\gamma\). The derivation steps are depicted in the Appendix:  
\[p_{1} =\frac{(1-\beta)^{2}(\gamma-\alpha)}{(2-\alpha-\beta)\Big{(}(1- \beta)(\gamma-\alpha)+(1-\alpha)(1-\beta-\gamma)\Big{)}}, \tag{6}\] \[p_{2} =\frac{(1-\alpha)(1-\beta)(\gamma-\alpha)}{(2-\alpha-\beta)\Big{(} (1-\beta)(\gamma-\alpha)+(1-\alpha)(1-\beta-\gamma)\Big{)}},\] (7) \[p_{3} =\frac{(1-\alpha)(1-\beta-\gamma)(1-\beta)}{(2-\alpha-\beta)\Big{(} (1-\beta)(\gamma-\alpha)+(1-\alpha)(1-\beta-\gamma)\Big{)}},\] (8) \[p_{4} =\frac{(1-\alpha)^{2}(1-\beta-\gamma)}{(2-\alpha-\beta)\Big{(}(1- \beta)(\gamma-\alpha)+(1-\alpha)(1-\beta-\gamma)\Big{)}}. \tag{9}\]  
Figure 4 depicts the probability of a node to be in state ON-C (i.e., \(p_{1}\)) as a function of \(\alpha\), for \(\beta=0.1\) and various values of \(\gamma\). As it is expected, when \(\gamma\) equals to \(\alpha\), it is \(p_{1}=0\).