# Reliability Evaluation for Clustered WSNs under Malware Propagation
## 5 Reliability Evaluation Method
### Evaluating Reliability of a Clustered WSN  
We aim to perform reliability evaluations for clustered WSNs due to their popularity. Figure 2 illustrates the topology of a clustered WSN. Coordinating cluster heads (CHs) control the topology where each CH guides a different cluster of sensor nodes. Such an architecture leads to a two-tier hierarchy where the upper tier comprises CHs and the lower tier comprises sensor nodes. Sensor nodes in specific regions transmit their sensed data to the responsible CH that manages the nodes. The responsible CH collects the data, which are transmitted to the single base station via other CHs. In this way, we can relate each cluster to a parallel system and each set of clusters to a serial system. Therefore, any route from a sensor node to the base station can be naturally regarded as a serial-parallel path. Since there are various routes through which sensed data can be transferred, a clustered WSN can be mapped correspondingly to a parallel-serial-parallel system where each sensor node fails independently. Each cluster operates if at least one of its sensor nodes works normally. However, for any route, all of its clusters must work normally for proper operation. As a result, we can evaluate the reliability of a clustered WSN based on the MTTF of a sensor node from the perspective of classical reliability theory.  
Since each cluster is a parallel system, the reliability of a cluster at time \(t\), \(Reliability_{cluster}(t)\), can be computed as:  
\[Reliability_{cluster}(t)=1-\prod_{nodeCluster}(1-Reliability_{node}(t)) \tag{33}\]  
Moreover, any route composed of clusters is a serial system, and thus the reliability of a route at time \(t\), \(Reliability_{route}(t)\), can be computed as:  
\[Reliability_{route}(t)=\prod_{clusterroute}Reliability_{cluster}(t) \tag{34}\]  
Finally, a clustered WSN composed of available routes is a parallel system. Therefore, the reliability of a clustered WSN at time \(t\), \(Reliability(t)\), is:  
\[Reliability(t)=1-\prod_{route}(1-Reliability_{route}(t)) \tag{35}\]  
So far, we have developed a method of reliability evaluation for clustered WSNs under epidemic-malware propagation conditions. In practice, we suggest using the proposed method in off-line mode, since performing on-line reliability evaluation for clustered WSNs is very difficult. First, we define our strategic game mathematically and solve it analytically. We integrate the results of the game with the transition probability upon infection of a sensor node from which we compute the MTTF of a sensor node. As soon as the topology of a clustered WSN is determined based on the actual requirements, we can find the number of sensor nodes in a cluster, the number of clusters in a route, and the number of routes in a clustered WSN. Based on these numbers, we can compute the reliability of a clustered WSN from Equation (35). In fact, our way is popular in the field of using the game theoretical approaches, which is easy to realize.  
Figure 2: Topology of a clustered WSN, where \(n\) denotes the number of clusters in a route.