## 3 GA Hybrid-Fog Model
### GA Hybrid-Fog Formulation
\begin{table}
\begin{tabular}{l l} \hline \hline
**Parameter** & **Value** \\ \hline Radius & 500 \\ Transmission bandwidth (B) & 0.2 MHz \\ Number of fog BSs (NFBSs) & [1,..., 10] \\ Number of fog UAVs (NFUAVs) & [1,..., 10] \\ UAV operating altitude (H) & 360 m \\ Number of tasks (Ntasks) & [50,..., 450] \\ Fog BS CPU cycles (\(\eta\)) & 1000 cycle/bit \\ Fog UAV CPU cycles (\(\eta\)) & 100 cycle/bit \\ Edge UAV CPU cycles (\(\eta\)) & 50 cycle/bit \\ UAV transmission power (Pt) & 10 dBm \\ Fog BS CPU frequency (\(f_{i}\)) & \(2.4\times 10^{9}\) cycle/s \\ Fog UAV CPU frequency (\(f_{i}\)) & \(2.4\times 10^{7}\) cycle/s \\ Edge UAV CPU frequency (\(f_{i}\)) & \(2.4\times 10^{7}\) cycle/s \\ Noise power (\(n_{0}\)) & \(-105\) dBm \\ Number of generations (NG) & 250 \\ Population size (SP) & 150 \\ Chromosome length (LC) & 40 bits \\ Mutation probability (PM) & 6.25\% \\ Crossover probability (PC) & 80\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Simulation parameters. Figure 4 presents a performance comparison of task-offloading methods based on the number of tasks. The figure illustrates the variations in task-offloading delay for our proposed GA algorithm, as well as the PSO and MILP algorithms, as a function of the number of tasks, with the number of fog nodes fixed at four. As shown, an increase in the number of tasks resulted in a higher task-offloading delay across all methods. This is due to the additional computational demand imposed on the fog nodes. The results indicate that GA had a lower delay compared to PSO and MILP. Specifically, for 200 tasks, the task-offloading delay using GA was 2.7 s, whereas PSO resulted in a delay of 4.1 s and MILP incurred a delay of 8.7 s. This corresponds to reductions in delay of 34.15% compared to PSO and 68.97% compared to MILP. Furthermore, Figures 3 and 4 highlight that the GA Hybrid-Fog approach consistently outperformed the other task-offloading methods. This advantage is attributed to the genetic

Figure 4: Performance comparison of task-offloading methods based on the number of tasks. Figure 3: Performance comparison of task-offloading methods based on the number of nodes. algorithm's efficient exploration and optimization capabilities, which make it particularly well suited for dynamic environments. Figure 5 displays the task-offloading delay (in seconds) for our proposed GA Hybrid-Fog approach and the GA BS-Fog approach as a function of the number of nodes (FBSs and/or FUAVs), which varied from 1 to 10, with the number of offloaded tasks fixed at 100. Specifically, for five nodes, the task-offloading delay using GA Hybrid-Fog was 1.1 s, whereas GA BS-Fog had a delay of 1.25 s. This represents an improvement of 12% when using GA Hybrid-Fog compared to GA BS-Fog. Furthermore, the figure highlights that the GA Hybrid-Fog approach had a consistently lower delay compared to GA BS-Fog. This is because GA BS-Fog relies solely on BSs, whereas the GA Hybrid-Fog approach utilizes both FBSs and FUAVs. Additionally, the GA Hybrid-Fog algorithm employs a heuristic optimization method to produce an optimal task-offloading solution, thereby minimizing delay for both task transmission and processing. Figure 6 illustrates the task-offloading delays of the proposed GA Hybrid-Fog approach and the GA UAV-Fog approach as a function of the number of nodes, with the number of fog BSs fixed at five. Similar to the previous results, increasing the number of nodes led to a decrease in task-offloading delay for both the GA Hybrid-Fog and GA UAV-Fog methods. Specifically, for five nodes, GA Hybrid-Fog had a task-offloading delay of 0.8 s, whereas GA UAV-Fog had a delay of 3.9 s. This represents a significant improvement of 79.49% when using GA Hybrid-Fog compared to GA UAV-Fog. Additionally, Figure 6 demonstrates that our proposed GA Hybrid-Fog consistently had a lower task-offloading delay compared to GA UAV-Fog. This improvement is attributed to the higher capacity of our proposed protocol, which leverages both FUAVs and FBSs, in contrast to GA UAV-Fog, which relies solely on FUAVs.