## 6 Analysis
### Network Connectivity  
In this section, we discuss network connectivity including local connectivity and global connectivity. Local connectivity is the probability a node could connect with neighbor nodes within its transmission range. Global connectivity is the ratio of the number of sensor nodes forming the largest isolated connected component in the final key graph \(G\) to the size of the whole network. In node compromise attacks, adversaries usually launch node compromise attacks in order to eavesdrop secure channels in the network, or using key materials revealed from compromised nodes to perform node replication attacks. In this regard, we discuss whether nodes compromised attacks could be used for eavesdropping or not.  
We denote \(A(n_{i},n_{j})\) as \(n_{i}\), \(n_{j}\) are neighboring, \(B(n_{i},n_{j})\) as the two nodes share a pairwise key. The local connectivity could be calculated as.  
\[P_  
\[P(B(n_{i},n_{j})\cap A(n_{i},n_{j}))=\sum_{G_{i}\in\varphi}\sum_{G_{j}\in S(G_{i})}P (n_{i}\in G_{i})P(n_{j}\in G_{j})P(A(n_{i},n_{j})\,\|\,G_{i},G_{j})\]  
Because a sensor node is chosen in a given group with an equal probability, we have the local connectivity can be calculated as  
\[P_{local}=\frac{\sum_{G_{i}\in\varphi G_{j}\in S(G_{i})}\hskip-14.226378 ptP(A(n _{i},n_{j})\,\|\,G_{i},G_{j})}{\sum_{G_{i}\in\varphi G_{j}\in\varphi}\hskip-14.226378 ptP(A(n _{i},n_{j})\,\|\,G_{i},G_{j})}\]  
Denoted \(d=a\times\sigma\) is the distance between two deployment points of two neighboring cells, where \(a\) is a predetermined value. This \(d\) value has impacts on the local connectivity and global connectivity in the network. If the deployment distribution follows _Gaussian_ distribution, then 99.87% nodes of a group reside within range of 3\(\sigma\) from its deployment point. Therefore, if the value \(d\) is much larger than 6\(\sigma\), almost every nodes in a group reside in its cell area, and the neighboring nodes are from its own group. In this case, the local connectivity is very high, but the network is totally partitioned into isolated components, meaning global connectivity is very low. In case of the value \(d\) is smaller, the local connectivity may be low, but the global connectivity is high. So, choosing suitable value of \(d\) affects the network connectivity.  
In the simulation, we change different values of \(d\) according to \(a\). The simulation was carried out with 10,000 nodes in a network area of 2,000m\(\times\)2,000m. The sensor communication range is set to 250m. The ratios of local connectivity and global connectivity also have various values as shown in Table 2 and Figure 8.  
\begin{table}
\begin{tabular}{c c c} \hline \(a\) & Local connectivity & Global connectivity \\ \hline
0.4 & 0.0787 & 0.6546 \\
0.6 & 0.1577 & 0.9290 \\
0.8 & 0.2524 & 0.9704 \\
1.0 & 0.3643 & 0.9921 \\
1.5 & 0.6036 & 0.9990 \\
2.0 & 0.7720 & 0.9994 \\
2.5 & 0.8617 & 0.9998 \\
3.0 & 0.9226 & 0.9999 \\
3.5 & 0.9555 & 0.9999 \\
4.0 & 0.9657 & 1 \\ \hline \end{tabular}
\end{table}
Table 2: Network connectivity.  
Note that, the connectivity is not affected by the number of nodes in a cell. Therefore, it does not matter whether nodes are in active or in sleeping mode, because each cell always maintains one coordinator.  
When the distance between two deployment points of two neighboring cells is too low (_a_ = 0.4; 0.6; 0.8 or 1.0), at any node \(A\), there are many nodes of non-neighbor cells distributed around it. These nodes do not share any key-space with node \(A\). So the local connectivity and global connectivity are reduced.  
From Table 2, it is easy to see that our model gains high local and global connectivity when choosing suitable value of deployment point distances. With value _a_=1.5, the global connectivity is 0.9990, meaning that only 0.01% number of nodes in the network are waste.