## 5 Joint Optimization of Resource Allocation and Computation-Offloading Decisions
### The Proposed Algorithm JROPSO
The results indicated that total computing overhead calculated by all of the schemes increased along with the number of MDs. The results indicated that total computing overhead calculated by all of the schemes increased along with the number of MDs. The reason is that the total computing overhead of MDs is linearly related to the number of MDs. We also saw that the proposed algorithm JROPSO helped reduce the total computing overhead of MDs. More specifically, the proposed algorithm JROPSO achieved the lowest total computing overhead relative to other schemes. This is because the proposed algorithm JROPSO was optimized for the joint resource-allocation and computation-offloading decision such that computation offloading is beneficial for offloading tasks. Figure 3: Percentage of offloading mobile devices (MDs) according to the number of MDs. Figure 2: JROPSO convergence in terms of total computing overhead according to the number of iterations. In the fourth experiment, we evaluated algorithm performance according to different weighting parameters (Figure 5). Specifically, we increased energy consumption \(\lambda_{m}^{e}\) from 0.1 to 0.9 with a step of 0.1, which altered completion time \(\lambda_{m}^{t}\) accordingly to \(\lambda_{m}^{t}=1-\lambda_{m}^{e}\). The number of MDs is fixed at 50. The results indicated that the proposed algorithm JROPSO was superior to other solutions, although the weighting parameters vary. The total computing overhead according to the LCO algorithm consistently increased along with the \(\lambda_{m}^{e}\) parameter because local execution of computational tasks by MDs results in large energy consumption as compared with the execution time. For example, MD \(m\) with \(f_{l}=1\) GHz and \(C_{m}=800\) Megacycles returned \(T_{m}^{l}=(800\times 10^{6})/(1\times 10^{9})=0.8\) (seconds) and \(E_{m}^{l}=5\times 10^{-27}\times 800\times 10^{6}\times(1\times 10^{9})^{2}=4\) (Joules). This suggests that, for local computing, the completion time was 5-fold smaller than the energy consumption. By contrast, the FO algorithm offloaded the computational task to the MEC server in order to save the energy consumption of the MDs. Therefore, increases in \(\lambda_{m}^{e}\) decreased the total computing overhead and suggested that a large enough \(\lambda_{m}^{e}\) would result in decreases in total computing overhead according to the FO, WMBS, and JROPSO algorithms. This is a consequence of the benefits of offloading to allow energy savings versus computing time. These results indicated that optimal performance requires choosing the appropriate weighting parameters. Figure 4: Comparison of the total computing overhead according to the number of MDs. Figure 5: Performance evaluation under different weighting parameters. Figure 6 shows the effect of data size on the JROPSO algorithm. The results indicated that increased data size did not change the total computing overhead according to the LCO algorithm based on it having no impact on completion time or energy consumption when the tasks are executed locally. By contrast, the computing overhead calculated by the OF algorithm increased rapidly due to high completion time to offloading task on MEC server. The large data sizes resulted in computing overheads for the JROPSO algorithm close to the WMBS algorithm. The reason is that some tasks will not be executed at mMEC due to the considerable time required to transfer the task to mMEC. These findings suggest that computing offloaded tasks involving small amounts of data achieve better results. ## 7 Conclusions

In this study, we described the development of an efficient optimization method to determining computation-offloading decisions in multi-tier multi-MEC-server architectures within 5G HetNets. We addressed resource-allocation and computation-offloading decision strategies to minimize the total computing overhead, including completion time and energy consumption, and developed the JROPSO algorithm to obtain optimal solutions.