## 4 Simulation Setup and Experimental Results
### Time Complexity  
The time-related performance of any protocol depends on the task's complexity. Time complexity refers to the time required to run a task, signifying effectiveness in the input. We measure the time complexity by calculating the number of basic operations accomplished by the algorithm. Based upon this, an essential operation takes a constant amount of time to execute. In Figure 13, we draw the trend of the time complexity for our proposed SDAAA approach and compared its time complexity with other contending approaches such as SD, EEHA, HAS, IIF, and RHC. The results confirm that the proposed SDAAA approach had O (log n) time complexity and required 0.08 s to complete 0.9 aggregated data. Time complexity was determined using 2% malicious nodes in the network. Our proposed SDAAA approach had the lowest time complexity because it uses secure authentication, authorization, and energy efficiency that help lessen the time complexity. Figure 11: Effected network vs. resilience time of proposed SDA and other contending approaches (EEHA, SD, HAS, IIF, and RHC) in the presence of malicious nodes. Figure 12: Effected network vs. resilience time of proposed SDA and other contending approaches (EEHA, SD, HAS, IIF, and RHC) in the presence of malicious nodes. Figure 10: Effected network vs. resilience time of the proposed SDA and other contending approaches (EEHA, SD, HAS, IIF, and RHC) in the presence of malicious nodes. We establish our proposed SDAAA approach and contending approaches on a recursive basis. Therefore, time complexity can be determined using recursive features given by the following formula, and the details are in Table 3.  
\[T(n)= \begin{pmatrix}O(1)\text{ {If }}n=1\\ \text{ {at}}\big{(}\frac{n}{b}\big{)}+O(n)\text{ {If }}n>1\end{pmatrix}  \tag{31}\]  
Figure 13: Time complexity of SDAAA, SD, EEHA, HAS, IIF, and RHC. \begin{table}
\begin{tabular}{c c} \hline \hline
**Time Complexity of Proposed Approach** & **Time Complexity** \\ \hline EEHA & \(T(n)=T(n-1)+T(0)+O(n)\) \\  & =\(T(n-1)+O(n)\) \\  & =\(O(n^{2})\) \\ \hline \multirow{9}{*}{SDAAA} & \(T(n)=at\big{(}\frac{n}{b}\big{)}+O(n)\) \\  & The problem consists of a finite set of inputs, \\  & but computation complexity remains constant (’\(n\)’) \\  & \(T(n)=t\big{(}\frac{n}{b}\big{)}+O(n)\) \\  & \(T(n)=t\big{(}\frac{n}{b}\big{)}+n\) \\  & \((n)=t\big{(}\frac{n}{b}\big{)}+n\) \\  & \(T(n)=t(1)+n\) \\  & \(T(n)=t+n\) \\  & Where \(t\) is ignored; therefore, we obtain \\  & \(T(n)=n\) \\  & \(n=k\) \& \(k=logn\) \\  & By substitution, we obtain \\  & thus, the complexity is \(O(logn)\) \\ \hline \multirow{9}{*}{IIF} & \(T(n)=at\big{(}\frac{n}{b}\big{)}+O(n)\) \\  & The problem consists of a finite set of inputs, \\  & but its computation time increases linearly. \\ \cline{1-1}  & Thus, \\ \cline{1-1}  & \(T(n)=t\big{(}\frac{n}{b}\big{)}+O(n)\) \\ \cline{1-1}  & \(T(n)=t+O(n)\) \\ \cline{1-1}  & Where \(t\) is ignored; therefore \\ \cline{1-1}  & \(T(n)=O(n)\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Time complexity for SDAAA and contending SD, EEHA, HAS, IIF, and RHC protocols. Based on the time complexity results, we evaluated our proposed SDAAA and the other contending approaches like SD, EEHA, HAS, IIF, and RHC; details are given in Table 4. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multicolumn{1}{c}{**Name of Approach**} & \multicolumn{1}{c}{**Time Complexity**} & \multicolumn{1}{c}{**Impact of _T(n)_**} & \multicolumn{1}{c}{**Probabilistic Attack**} & \multicolumn{1}{c}{**Robust to**} \\  & & & **Detection** & **Communication Loss** \\ \hline SDAAA & \(O(logn)\) & Excellent & Yes & Yes \\ \hline SD & \(O(logn+n)\) & Fair & No & Yes \\ \hline EEHA & \(O(n^{2})\) & Worst & No & No \\ \hline HAS & \(O(nlogn)\) & Bad & No & No \\ \hline IIF & \(O(n)\) & Good & Yes & No \\ \hline RHC & \(O(nlogn)\) & Bad & No & No \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Time complexity \(T(n)\) and other characteristics of SDAAA, SD, EEHA, HAS, IIF, and RHC.