## 2 System Model
### Remote Execution Model (\(e_{i}=1\))  
An UE can upload a component \(c_{i}\) to the MES for execution. If the network utilizes orthogonal frequency-division multiple access (OFDMA) then we can assume that the bandwidth, \(B\), for transmission is divided into \(K\) subcarriers. The notations used in this paper are given in Table 2. For transmission and reception of \(\mu_{i}\) and \(\rho_{i}\), respectively, the available subcarriers are represented by \(k_{i}\in\{1,2,3,...,K\}\), where \(K\) is the maximum available subcarriers. Similarly, \(r_{i}\in\{0,1,2,...,R\}\), represents the number of CPU cores used in the processing of \(c_{i}\) and \(R\) represents the maximum number of CPU cores at MES. \(r_{i}=0\) implies that for component \(c_{i}\) there is no CPU available and the system is busy. We consider additive white Gaussian noise for uplink and downlink data rates [37], which can be written as follows. \[v_{upi}=\frac{k_{i}}{K}B\log_{2}\left(1+\frac{p_{ui}^{t}|h_{up}|^{2}}{\Gamma( g_{up})\lambda_{i}^{\theta}N_{o}}\right), \tag{3}\]  
\[v_{dli}=\frac{k_{i}}{K}B\log_{2}\left(1+\frac{p_{si}|h_{dl}|^{2}}{\Gamma(g_{dl} )\lambda_{i}^{\theta}N_{o}}\right), \tag{4}\]  
where \(v_{upi}\) and \(v_{dli}\) are the uplink and downlink data rates for component \(c_{i}\), respectively, while \(p_{ui}^{t}\) and \(p_{si}\) are the transmitting powers of UE and MES, respectively, for \(c_{i}\). \(h_{up}\) and \(h_{dl}\) are the channel fading coefficients while \(g_{up}\) and \(g_{dl}\) represent the bit error rates, for uplink and downlink, respectively. \(\lambda_{i}\) is the distance between UE and MES. \(\theta\) is the path loss exponent and \(N_{o}\) is the noise power. \(\Gamma(g_{dl})=\frac{-2 log(5g_{dl})}{3}\) gives the signal to noise ratio  
Figure 1: The proposed system model with the partitioning concept. (SNR) margin to meet the required bit error rate. The delay due to transmission, execution, and reception for \(c_{i}\) can be calculated, respectively, as follows. \[d_{ti}=\frac{\mu_{i}}{v_{upi}}, \tag{5}\]  
\[d_{ei}=\frac{\alpha_{i}}{r_{i}f_{s}}, \tag{6}\]  
\[d_{ri}=\frac{\rho_{i}}{v_{dli}}, \tag{7}\]  
where \(d_{ti}\), \(d_{ei}\), and \(d_{ri}\), are the delays due to transmission of input data \(\mu_{i}\), execution of \(\alpha_{i}\), and reception of output data \(\rho_{i}\), respectively. \(f_{s}\) is the frequency of MES's CPU. Similarly, the propagation delay, when \(c_{i}\) is executed remotely, can be calculated as \(d_{pi}=\frac{\lambda_{i}}{c}\), where \(c\) is the speed of light. Hence, for \(c_{i}\) component, the total remote execution delay, \(d_{oi}\), can be formulated as:  
\[d_{oi}=d_{ti}+d_{ei}+d_{ri}+2d_{pi}. \tag{8}\]  
Here, \(2d_{pi}\) is added because the propagation delay is considered for both sides of communication, transmission of \(\mu_{i}\), and reception of \(\rho_{i}\). The energy consumption due to remote execution of \(c_{i}\), \(E_{oi}\), can be calculated as \(E_{oi}=E_{ti}+E_{ri}\), where \(E_{ti}\) is the energy consumption due to transmission of the input data, \(\mu_{i}\), to MES, and \(E_{ri}\) is the energy consumption due to reception of the output data, \(\rho_{i}\). These energy consumptions can be calculated as:  
\[E_{ti}=d_{ti}p_{ui}^{t}, \tag{9}\]  
\[E_{ri}=d_{ri}p_{ui}^{r}, \tag{10}\]  
where \(p_{ui}^{r}\) is the received power at UE when \(\rho_{i}\) data is received. Using (3) and (5), we can derive \(E_{ti}\) as:  
\[v_{upi}=\frac{k_{i}}{K}B\log_{2}\left(1+\frac{p_{ui}^{t}|h_{up}|^{2}}{\Gamma( g_{up})\lambda_{i}^{\theta}N_{o}}\right), \tag{3}\]0  
Similarly, using (4) and (7), we can write:  
\[v_{upi}=\frac{k_{i}}{K}B\log_{2}\left(1+\frac{p_{ui}^{t}|h_{up}|^{2}}{\Gamma( g_{up})\lambda_{i}^{\theta}N_{o}}\right), \tag{3}\]1