# Mobility- and Energy-Aware Cooperative Edge Offloading for Dependent Computation Tasks +
## 5 Solution of Dynamic Computation Offloading Optimization Problem
### Energy-Efficient Task Offloading (EETO) Algorithm
In contrast, for a high transmission power, EETO and CPCO achieve substantial battery energy savings compared to ASO and CMCO by avoiding the energy-expensive direct transmission to an MEC server and the relay transmission by a helper (whereby the CMCO transmits the task data twice, once from the UE to the UH and then from the UH to the MEC server). Figure 6b shows the average battery energy consumption as a function of the UE speed, while the UH\({}_{i}\) are maintained at their default speeds which have an average of roughly 0.7 m/s in the Stanford data set [63]. We observe from Figure 6b an initially decreasing energy consumption as the UE speed increases to 1.5 m/s and then an increasing energy consumption as the UE speed increases above 1.5 m/s. This is mainly because a UE with a similar moving speed as the surrounding UH\({}_{i}\) has typically more UH\({}_{i}\) in its vicinity for a longer sojourn time. Importantly, Figure 6b indicates that EETO consistently reduces the battery energy consumption compared to CPCO and CMCO across the full range of considered UE speeds. #### 6.2.3 Impact of Task Dependency

Figure 6(a),b show the finish time \(FT_{K}\) and average energy consumption \(E_{\text{tot}}^{\text{ave}}\) of the five algorithms for various task dependency relationship graphs, namely sequential, random, and parallel. In the sequential dependency graph, each task \(k\) has one predecessor and to start the task execution, its predecessor task needs to be completed. However, in the random dependency graphs, each task \(k\) can have zero or multiple predecessor tasks, which requires totally different offloading decisions compared to the sequential dependency graph. Since we can execute multiple tasks at the same time with the random and parallel graphs, the execution time is less than for the sequential graph for all methods (for ALO, the sequential finish time is 21.2 s, i.e., outside the range plotted in Figure 6(a)). We can also see that EETO does not always have the shortest execution time since the aim is to minimize the energy while keeping the time within the deadline \(T_{d}^{\text{max}}\). However, the EETO execution time is very close to the shortest execution time. Focusing on the energy consumption, we observe from Figure 6(b) that the parallel task dependency leads to the lowest energy consumption. This reduction in energy consumption is mainly due to the reduced waiting time, i.e., the more independent the tasks are, the less energy is consumed for waiting for the completion of predecessor tasks. Overall, we observe from Figure 6(b) that among all methods and all task dependency cases, our proposed EETO achieves the lowest battery energy consumption. Figure 6: Average battery energy consumption \(E_{\text{tot}}^{\text{ave}}\) vs. transmit power and UE speed; fixed parameters: \(b_{k}\), \(c_{k}\), \(T_{d}^{\text{max}}\), (and \(P_{k}^{\text{tr}}\) for plot (b)) from Table 1; random task dependency (UE speed 1 m/s for plot (a)). (a) Transmit power \(P_{k}^{\text{tr}}\), (b) UE speed. Figure 7: Impact of task dependency graph; fixed parameters: uniform random data size \(b_{k}=\) 280–320 KB, \(c_{k}=\) 30–50 cycles/bit (uniform random), task deadline \(T_{d}^{\text{max}}=\) 9 s. (a) Finish time, (b) average battery energy consumption. #### 6.2.4 Impact of Task Deadline \(T_{d}^{\max}\)

Figure 8 shows the average battery energy consumption as a function of the task completion deadline \(T_{d}^{\max}\) for two different types of task heterogeneity. Figure 7(a) considers a wide range of computational complexities \(c_{k}\) of the individual tasks \(k,\ k=1,\ldots,K\), that are drawn uniformly randomly over the range \([15,55]\) cycles/bit with a prescribed latency requirement \(T_{d}^{\max}\) for the entire set of \(K\) tasks. Figure 7(b) considers specified deadlines for tasks \(k=1\)-7 of \(FT_{k}=[0.2,0.4,0.4,0.4,0.6,0.6,0.6]\) s, while tasks \(k=8\)-25 have the deadline \(T_{d}^{\max}\) ranging from 2 to 4 s, for a narrower range of task complexities \(c_{k}\).