# 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
mapping: Set one element of \(s(k)\) to 1, and others to 0;  Compute the current \(FT_{k}\) by \(\alpha^{\prime}(l)\) and Equations (1) and (22); if\(FT_{k}>T_{s,k}\)then  Discard \(\alpha^{\prime}(l)\); if\(FT_{k}>T_{d}^{\max}\)then  Discard \(\alpha^{\prime}(l)\); else \(\alpha^{\prime}(l)\) saved as a feasible solution and calculate total energy  consumption by \(\alpha^{\prime}(l)\) and Equation (21);  Select the offloading strategy \(\tilde{\alpha}\) among \(\alpha^{\prime}(1)\),...,\(\alpha^{\prime}(L)\) that yields the minimum energy cost; \(\alpha=\tilde{\alpha}\). ```

**Algorithm 1**Energy-Efficient Task Offloading (EETO) Algorithm

## 6 EETO Evaluation

This section presents simulation results to evaluate the performance of our joint communication and computation cooperation offloading method (EETO) for mobile helper nodes with dependent computation tasks. ### Simulation Setup

The simulations employ the parameters in Table 1. The UE and UHs are initially randomly distributed and follow the mobility pattern of the publicly available PECNet dataset [63]. The coverage ranges of the BSs (servers) and each user end device are 400 m and 50 m, respectively, i.e., the UE can reach a BS that is 400 m away, but the UE can only reach a \(\text{UH}_{i},\ i=1,\ldots,1\), that is 50 m or less away. We employ the PECNet model for the Stanford Drone Dataset, which is a common mobility benchmark containing over 11,000 unique pedestrians in a university campus setting [63]. Initially, we set the UE mobility speed to 1 m/s. As outlined in Section 2.3, there is no prior benchmark for offloading dependent computation tasks in a cooperative edge computing setting. Therefore, we compare EETO with the following four alternate task offloading approaches for the dependent-task edge computing setting: all local (ALO), all sever (ASO), computation cooperation optimization (CPCO), and communication cooperation optimization (CMCO). In ALO, the tasks are all executed locally on the UE (corresponding to local execution, Section 3.4.1). In ASO, all tasks are executed remotely on MEC servers (i.e., directly offloaded from the UE to an MEC server, Section 3.4.3.1). In CPCO, the computation resources of adjacent devices can be used, and therefore, the \(\text{UH}_{i}\) can act as helper nodes, i.e., the options from Sections 3.4.1, 3.4.2, and 3.4.3.1 are available to the optimization. In CMCO, the can only act as relay nodes to transmit the computation tasks to an MEC server, i.e., the options from Sections 3.4.1, 3.4.3.1, and 3.4.3.2 are available to the optimization. Thus, the main difference between CPCO and CMCO pertains to the function of the helper nodes UH\({}_{i}\): in CPCO, the UH\({}_{i}\) help only with task execution (computation) but not with relay communication, whereas in CMCO, the UH\({}_{i}\) help only with relay communication for task offloading to the MEC server but not with helper execution. We ran 50 independent simulation replications for each evaluation. The resulting 95% confidence intervals are less than 5% of the corresponding sample means and are omitted from the plots to avoid visual clutter. ### Simulation Results

#### 6.2.1 Impact of Task Complexity \(c_{k}\) and Size \(b_{k}\)

The average battery energy consumption as a function of the computation CPU cycles \(c_{k}\) needed for execution of each bit of task \(k\) for the five methods is shown in Figure 4(a). We observe from Figure 4(a) that the ALO energy consumption increases linearly as the computations \(c_{k}\) per bit increase. Specifically, when the required CPU cycles \(c_{k}\) per bit are less than 10 cycles/bit, ALO attains the minimum energy consumption. The left part of Table 2 indicates that when the required computations \(c_{k}\) increase to 15 cycles/bit, ALO can still satisfy the deadline requirements (marked in blue); however, the energy consumption is higher than for the other algorithms (see Figure 4(a)).