## 3 System Model and Problem Formulation
### System Model
#### 3.1.2 Communication Model  
In this subsection, we investigate the transmission time and energy consumption associated with communications between the mobile device and servers. Moreover, each intensive application is denoted by a tuple of \((\alpha_{i},\mu_{i},\beta_{i},\Gamma_{i})\) for \(i\in K\), where \(\alpha_{i}\) and \(\mu_{i}\), respectively, indicate the input and output data size of the application, \(\beta_{i}\) indicates the number of CPU cycles needed to accomplish the application, and \(\Gamma_{i}\) indicates the deadline associated with each application. Consequently, in this paper, guided by the work in [41], the total energy and time consumption for returning the output data size is neglected because of its small size compared with the input data size. Moreover, to mitigate the uplink interference of multi-users transmission in the same cell, an Orthogonal Frequency Division Multiple Access approach is selected [42]. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**IoT Devices**} & \multirow{2}{*}{**Data Size (MB)**} & \multirow{2}{*}{**CPU Cycles (Gigacycles)**} & \multicolumn{2}{c}{**Estimated Execution Time (s)**} & \multirow{2}{*}{**Best GBS**} \\ \cline{3-3} \cline{5-6}  & & & & **Upload Time** & & **Computation Time** \\ \hline \multirow{2}{*}{\(\mathrm{D}_{10}\)} & \multirow{2}{*}{15} & \multirow{2}{*}{15} & \multirow{2}{*}{15} & \(\mathrm{GBS_{1}\to 14.4}\) & \(\mathrm{GBS_{1}\to 8.8}\) & \\  & & & \(\mathrm{GBS_{1}\to 4.8}\) & \(\mathrm{GBS_{3}\to 2.0}\) & & \\ \hline \multirow{2}{*}{\(\mathrm{D}_{11}\)} & \multirow{2}{*}{20} & \multirow{2}{*}{10} & \(\mathrm{GBS_{1}\to 17.5}\) & \(\mathrm{GBS_{1}\to 5.6}\) & \\  & & & \(\mathrm{GBS_{2}\to 4.8}\) & \(\mathrm{GBS_{2}\to 1.5}\) & \\  & & & \(\mathrm{GBS_{3}\to 8.0}\) & \(\mathrm{GBS_{3}\to 2.5}\) & \\ \hline \multirow{2}{*}{\(\mathrm{D}_{12}\)} & \multirow{2}{*}{15} & \multirow{2}{*}{20} & \(\mathrm{GBS_{1}\to 12.0}\) & \(\mathrm{GBS_{1}\to 10.0}\) & \\  & & & \(\mathrm{GBS_{2}\to 4.8}\) & \(\mathrm{GBS_{2}\to 4.0}\) & \\ \hline \multirow{2}{*}{\(\mathrm{D}_{5}\)} & \multirow{2}{*}{10} & \multirow{2}{*}{15} & \(\mathrm{GBS_{1}\to 4.0}\) & \(\mathrm{GBS_{2}\to 3.75}\) & \\  & & & \(\mathrm{GBS_{3}\to 3.2}\) & \(\mathrm{GBS_{3}\to 3.0}\) & \\ \hline \multirow{2}{*}{\(\mathrm{D}_{6}\)} & \multirow{2}{*}{15} & \multirow{2}{*}{25} & \(\mathrm{GBS_{2}\to 4.0}\) & \(\mathrm{GBS_{2}\to 3.75}\) & \\  & & & \(\mathrm{GBS_{3}\to 3.2}\) & \(\mathrm{GBS_{3}\to 3.0}\) & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Proposed algorithm illustration. Figure 2: Snapshot of IoT devices distribution. Following that, regarding the Shannon law [43], if the mobile user \(i\) decides to offload and then process its application remotely at GBSs or UAVs \(J\), then the upload data rate among the mobile device and the edge can be identified as follows:  
\[R_{i,j}=B_{j}log_{2}(1+\frac{p_{i}g_{0}^{2}}{\omega_{0}B_{j}}),\quad j\in 1...J \tag{2}\]  
where \(B_{J}\) and \(p_{i}\), respectively, indicate the bandwidth and transmission power of mobile \(i\) and \(g_{0}\) and \(\omega_{0}\), respectively, indicate the associated gain and noise power. If the mobile user \(i\) decides to offload and then process its application remotely at the cloud server \(J+1\), then one of the available GBSs or UAVs will be chosen as a relay node to transfer the application's data and requirements. In this study, the GBSs or UAVs with the greatest uplink data rate are chosen as a relay node, and its equation can be identified as follows:  
\[R_{i,j+1}=\max_{j\in\{1...J\}}R_{i,j} \tag{3}\]  
Furthermore, if the mobile user \(i\) decides to process its application locally, for completeness, we assume that the uplink data rate is \(R_{i,0}=\infty\).