# Routing Selection Algorithm for Mobile Ad Hoc Networks Based on Neighbor Node Density
## 4 Proposed New Routing Method
### Cnd-Aodv
Section 5 will focus on analyzing the influence of CND-AODV on network performance after nodes are generated with uniform distribution. Subsequent analyses will be based on scenarios where nodes are generated through random distribution. Randomly selecting 10 groups of sender \(j\), we can analyze the number of common neighbor nodes \(N_{ij}\) between each sender and its neighbor nodes. The data based on the number of common neighbor nodes are grouped and the statistical analysis uses the following intervals: \((0,3]\), \((3,6]\), \((6,9]\), and \((9,\infty]\). The count distribution and probability distribution plots for 125 nodes are shown in Figure 10. The left Figure 10 illustrates the distribution of \(N_{ij}\) values, while the right Figure 10 illustrates the probability distribution. In the probability distribution plot, \"normal\" indicates a standard Gaussian Distribution with the same mean and standard deviation. Similarly, Figure 11 represents the distribution and probability distribution plots for the scenario with 275 nodes. Figure 8: The initial simulation plots with 125 (**a**) and 275 (**b**) nodes under random distribution. Figure 9: The initial simulation plots with 125 (**a**) and 275 (**b**) nodes under uniform distribution. After obtaining the simulation results and the probability distribution plot, a quantitative analysis was performed to compare the simulated distribution with the standard Gaussian distribution. This comparison was performed using the Kolmogorov-Smirnov (KS) test [21; 22]. \[D=\max_{1\leq x\leq 14}(\left|F(x_{i})-S(x_{i-1})\right|_{i}\left|F(x_{i})-S(x _{i})\right|) \tag{4}\]  
where \(F(x_{i})\) is the theoretical cumulative probability distribution function, \(S(x_{i})\) is the empirical or observed cumulative probability distribution function for the variable \(x_{i}\), which in this case is the \(N_{ij}\) values, and \(D\) is the statistical measure for the maximum difference between two different cumulative distribution functions. Based on the obtained results for the two scenarios with 125 and 275 nodes, the maximum \(D\) values were found to be 0.114 and 0.111, respectively. The critical value for the KS test depends on the sample size (\(n\)) and the desired significance level (\(\alpha\), its value is 0.5). By using the threshold expression from reference [22]:  
\[\widehat{D}=\frac{1.36}{\sqrt{n}} \tag{5}\]  
where \(\widehat{D}\) is the threshold for the maximum difference statistic of \(D\), a constant used to determine whether a distribution is normal, n is the the sample size of 125 and 275, and considering the critical significance level (\(\alpha\)) typically set to 0.05, we can calculate the critical values \(\widehat{D}\) as 0.119 and 0.116, respectively. As the obtained \(D\) values of 0.114 (for 125 nodes) and 0.111 (for 275 nodes) are less than their respective critical values (\(\widehat{D}=0.119\) and \(\widehat{D}=0.116\)), we can conclude that, with a high probability, the observed cumulative probability distribution function \(S(x)\) follows the trend of a standard Gaussian distribution  
Figure 11: The count distribution diagram (**a**) and probability distribution diagram (**b**) of the number of common neighbor nodes of 275 nodes. Figure 6:0 The count distribution diagram (**a**) and probability distribution diagram (**b**) of the number of common neighbor nodes of 125 nodes. for the common neighbor node count in the range of 1 to 14. This can also be referred to as a truncated Gaussian, observed in scenarios with node counts of 125 and 275. Therefore, we can infer that this trend is likely to hold for node quantities within the range between 125 and 275 as well. Correctly, based on the demonstrated trend of \(N_{ij}\) following a truncated Gaussian, the focus can be on identifying nodes that deviate significantly from the mean (\(\overline{N_{j}}\)). In the experiment, z-scores [23] can be utilized as a statistical measure to assess the relative position or deviation of a data point within a dataset.