# On Connectivity and Energy Efficiency for Sleeping-Schedule-Based Wireless Sensor Networks
## 3 Connectivity and Energy Efficiency Algorithm
### The Connectivity via Probability Theory  
In our previous research [16] has shown that random deployment of nodes is the most common situation, and the number of the nodes randomly sprinkled by aircraft is subject to binomial distribution in the designated monitoring area. In this paper, we mainly use the method of probability theory, starting from the connectivity \(K\) to explore the network connectivity, that is to say, the wireless sensor network connectivity \(K\) also obey the binomial distribution, denoted as \(B(K,P)\). Moreover, because the number of nodes \(N>>10\), node's communication probability \(P<<0.1\). The connectivity \(K\) of the WSN obeys the Poisson distribution in the monitoring area, and the mathematical expectation is \(E_{\xi}=\lambda=NP=N\frac{\pi R^{2}}{S}\). Figure 1: The architecture of WSNs. Sensor node connectivity \(K\) obey the Poisson distribution, so network connectivity probability \(P_{r}(X=k)=\frac{c^{-\lambda}\lambda^{k}}{k! }\), among \(\lambda=NP\), \(P=\frac{nR^{2}}{S}\), there is:  
\[P_{r}(X=k)=\frac{e^{-NP}(NP)^{k}}{k!}=\frac{(N\frac{\pi R^{2}}{S})^{k}}{k!}e^{- N\frac{nR^{2}}{S}} \tag{1}\]  
From Equation (1), \(N\) is the number of nodes, \(R\) is the communication radius, \(K\) is the connectivity and is the connectivity probability value, it can be seen that the number of nodes \(N\) and the communication radius \(R\) affect the network connectivity probability value \(P_{r}\) when the connectivity is \(K\). If the probability of network connectivity increases to \(K\), the number of nodes \(N\) must increase or the communication radius \(R\) must increase as well. In a sensor network, the probability \(P_{r}\) of network connectivity \(K\) can be improved only when the number of nodes \(N\) satisfies a certain range [17]. If \(N\) is lower than the specified range, the information between nodes is unreachable, resulting in the phenomenon if disconnected network. If \(N\) is higher than the specified range, a certain number of redundant nodes will appear in the network, causing a waste of resources, increasing the burden of network communication and affecting the service life of the network. The problems studied in this paper are how to calculate the nodes \(N\) and the node communication radius \(R\), and how to optimize the probability of network connectivity \(P_{r}\). In order to achieve prospective purpose, let the expected value of network node connectivity be \(K\), and hope that the number of neighbor nodes of each node in the network can reach \(K\) or close to \(K\), that is, in the interval \([K-a,\ K+b]\) (\(0\leq a\leq K-1\), \(b\geq 0\)), we get the higher \(P_{r}\), the better [18]. Then in the interval \([K-a,\ K+b]\) the accumulated value of \(P_{r}\) is:  
\[P_{r}(K-a\leq x\leq K+b)=\sum_{x=K-a}^{K+b}\frac{(NP)^{x}}{x!}e^{-(NP)}=\sum_{x =K-a}^{K+b}\frac{(N\frac{nR^{2}}{S})^{x}}{x!}e^{-N\frac{nR^{2}}{S}} \tag{2}\]  
There contains two variables \(N\) and \(R\), while the monitoring area \(S\) is a constant. We study the relationship between \(P_{r}\) and the node communication radius \(R\), the number of nodes \(N\). 1.1 The Relationship between the Probability of Network Connectivity \(P_{r}\) and the Communication Radius R  
Equation (2) on the partial derivative of \(R\), obtains:  
\[\frac{\partial P_{r}}{\partial R}=\sum_{x=K-a}^{K+b}\frac{2N\pi R}{S}e^{-N \frac{nR^{2}}{S}}\Bigg{[}\frac{\left(N\frac{nR^{2}}{S}\right)^{x-1}}{(x-1)!}- \frac{\left(N\frac{nR^{2}}{S}\right)^{x}}{x!}\Bigg{]} \tag{3}\]  
Let \(  
3.1.2. The Relationship between the Probability of Network Connectivity \(P_{r}\) and the Number of Nodes N  
Equation (2) on the partial derivative of \(N\) obtains:  
\[\frac{\partial P_{r}}{\partial N}=\sum_{x=K-a}^{K+b}\frac{\pi R^{2}}{S}e^{-N \frac{\pi B^{2}}{S}}\Bigg{[}\frac{\left(N\frac{\pi R^{2}}{S}\right)^{x-1}}{(x-1 )!}-\frac{\left(N\frac{\pi R^{2}}{S}\right)^{x}}{x!}\Bigg{]} \tag{5}\]  
Let \(\frac{\partial P_{r}}{\partial N}=0\), so \(\frac{\left(N\frac{\pi R^{2}}{S}\right)^{K-a-1}}{(K-a-1)!