# A Node Density Control Learning Method for the Internet of Things
## 5 Design of Node Density Control Learning Algorithm
Therefore, the probability of no isolated nodes in the network is defined as the unclosed region of Equation (11) with an area of \(A\) and a node density of \(\rho\). \[ \begin{split} P(\textit{noisolation})&=\sum\limits_{n =0}^{\infty}P(N-n)(1-P(D=0))^{n}\\ &=\sum\limits_{n=0}^{\infty}\frac{(\rho A)^{n}}{n}e^{-\rho A} \times(1-P(D=0))^{n}\\ &=e^{-\rho A}\sum\limits_{N=0}^{\infty}\frac{(\rho A-\rho AP(D= 0))^{n}}{n}\end{split}  \tag{11}\]  
The probability \(P\) is used to represent the density \(\rho\) of the mobile node, \(n\) is the number of nodes, and \(N\) is one-step transition probability matrix. We observe that when Equation (11) removes the logarithm on both sides, we obtain Equation (12). \[InP=-\rho Ae^{-E(D)}=-\rho Ae^{-2\pi\rho\xi} \tag{12}\]  
where \(\xi\) represents regional closure index. Simplify Equation (12) to obtain Equation (13). \[\frac{2\pi\xi}{-A}InP=2\pi\rho\xi e^{-2\pi\rho\xi} \tag{13}\]  
When \(x=2\pi\rho\xi\), set the inverse function of the function \(y=xe^{-x}\) to \(x=g(y)\), substituting it into Equation (13) to obtain Equation (14). \[\rho=\frac{1}{2\pi\xi}g(\frac{2\pi\xi InP\xi InP\xi}{-A}) \tag{14}\]  
In Equation (14), \(\xi=\int_{0}^{\infty}P(\Lambda\mid s)sds\). When the probability \(P\) of no isolated nodes in the network is close to \(1\), the corresponding node density \(\rho\) can be obtained by Equation (14). The number of nodes on the area \(A\) is \(n\). Each node uses its own positioning device to locate and transmit information to the base station. For each node \(u\), the base station calculates the distance \(S(u,v)\) between the node and the other \(n-1\) nodes by using the position information of each node and substitutes Equation (7) to obtain the probability that the node \(u\) communicates directly with the other \(n-1\) nodes. The probability of getting the signal jumping from node \(u\) to node \(v\) is Equation (15). \[N(u,v)=\frac{P(\Lambda(u,v)\mid S(u,v))}{\sum\limits_{v=u}P(\Lambda(u,v)\mid S (u,v))} \tag{15}\]  
Establish a one-step transition probability matrix \(N\) for \(n\times n\) order. Let Equation (15) be used as the element at the intersection of the row corresponding to the node \(u\) and column of node \(v\) in the matrix \(N\). Each node is considered to be a state of the signal. When a signal is transferred from one node to another, it can be seen as a signal being transferred from one state node to another. The Markov property of a signal moving from one state node to another is discussed below. Corresponding to the node density \(\rho\), the process of transmitting a signal in its generated WSN can be seen as a finite, homogeneous Markov chain [15]. With each node as a state of the signal, the number \(n\) of nodes is a finite number. The signal then has \(n\) states for its transfer, which means that the state set of signal transitions is finite and discrete. At the same time, the signal is transferred from one state node to another, and the number of hops passing through is an integer, that is, its parameter set is also discrete. Since the probability \(P(\Lambda(u,v)\ket{S(u,v)})\) of the signal transitioning from the state node \(u\)to the state node \(v\) is independent of the state node experienced before the signal is transmitted to the state node \(u\), and is also independent of the number of hops experienced before the signal is transmitted to the state node \(u\), it is only related to the signal currently related to this condition in the state node \(u\). Therefore, the process of transmitting signals in this WSN is a finite, homogeneous Markov chain. When the WSN corresponding to the node density \(\rho\) generation is a connected network, each state node is in a constant return state. The process of transmitting signals in the network at this time can be regarded as a finite, homogeneous, irreducible Markov chain. For any two state nodes \(u\) and \(v\) in a finite, homogeneous Markov chain, the late-early probability that the signal moves from the state node to the state node is defined as Equation (16).