## 7 Conclusions  
Significant research has been accomplished to determine online task offloading decisions in MEC while considering user mobility, and a limited energy budget has been allocated to users. The optimisation function has been developed as a trade-off between the time cost and energy cost, not to exceed the energy budget. The online algorithms are considered as potential solutions as future upcoming tasks are unknown. In this manuscript, two scenarios have been presented. The first scenario is when both the user-side and BS-side information are available. The user will be able to calculate the optimum BS and remain for the entire task processing period. The second scenario is when users have no access to BS information. Unlike the first scenario, users cannot calculate the utility cost and make offloading decisions based on that. Instead, users will offload limited tasks to each BS and observe the total time cost and energy consumption. After determining the optimum BS, the remaining tasks are offloaded to that BS. The BS may change during task offloading due to sub-optimum BS selection in the BS-learning algorithm, resulting in additional costs and HOs. The simulation results indicate that our two proposed algorithms perform slightly better than those in existing literature. Additionally, a performance loss is provided in the second scenario due to HO, and the outcomes are similar to the optimal offline solution. In future work, it would be better to consider resource allocation in the problem formulation. This requires solving NP-hard and non-convex problems. One potential  
Figure 6: Effect of energy budget \(\rho\) (\(\log(\alpha)=-2.2\), \(J=\{5,15\}\), \(k_{s}=20\) s, \(\sigma^{2}_{observe}=0.3\)): (**a**) average time cost; (**b**) total energy cost. solution is to use machine learning (ML) approaches [63; 64]. Applying ML approaches in MEC systems will be challenging because ML algorithms are extremely complex and computation resources are in high demand. Dividing learning computations into smaller tasks and distributing them among multiple MEC servers can be a possible solution. The issues would then be to determine the types of computations that can be divided as well as the method to divide while considering MEC resources. Merging the results obtained from different MEC servers for a specific task should also be managed and assessed. Due to UE mobility and frequent handovers among MEC servers, it is quite challenging to integrate outputs from various sub-tasks into a single output when the UE's trajectory and location are dynamic. Future work should employ deep neural network (DNN) with multi-objective functions to optimise HO and computation offloading. Additionally, for the scenario where the UEs are far from network coverage, we can implement a device-to-device (D2D) connection or use MEC servers inside vehicular systems. Furthermore, for simplicity, multipath propagation was not considered here, and future work needs to consider the multipath impact into the problem formulation. Furthermore, the BSs in both algorithms are assumed to be all activated during the offloading process. Recent technologies such as software-defined networking (SDN) require a programmable network that enables developers to switch ON/OFF the BSs. In future work, it would be better to integrate the SDN with the MEC technology. Finally, future work could also analyse the run-time complexity of algorithms and compare it with benchmarks. Methodology, Writing, results discussion and Analysis S.J. ; Formal analysis, L.K. ; Supervision, I.S. and M.E. ; Funding acquisition; M.H.A. and H.M. All authors have read and agreed to the published version of the manuscript. This research has been produced benefiting from the 2232 International Fellowship for Outstanding Researchers Program of TUBITAK (Project No: 118C276) conducted at Istanbul Technical University (ITU). Also, it was supported in part by the Universiti Sains Islam Malaysia (USIM), Malaysia.