Energy-Optimal Latency-Constrained Application Offloading in Mobile-Edge Computing

Mobile-edge computation offloading (MECO) is a promising emerging technology for battery savings in mobile devices (MD) and/or in latency reduction in the execution of applications by (either total or partial) offloading highly demanding applications from MDs to nearby servers such as base stations. In this paper, we provide an offloading strategy for the joint optimization of the communication and computational resources by considering the blue trade-off between energy consumption and latency. The strategy is formulated as the solution to an optimization problem that minimizes the total energy consumption while satisfying the execution delay limit (or deadline). In the solution, the optimal transmission power and rate and the optimal fraction of the task to be offloaded are analytically derived to meet the optimization objective. We further establish the conditions under which the binary decisions (full-offloading and no offloading) are optimal. We also explore how such system parameters as the latency constraint, task complexity, and local computing power affect the offloading strategy. Finally, the simulation results demonstrate the behavior of the proposed strategy and verify its energy efficiency.


Introduction
For the past several years, mobile devices (MDs), such as smartphones, handheld game consoles, and vehicle multi-media computers, have become virtually ubiquitous and an increasing number of new mobile applications, such as augmented reality (AR), image processing, natural language processing, face recognition, and interactive gaming, have emerged and been the focus of considerable attention [1,2]. These mobile applications are typically latency-sensitive, computation-intensive, and have high energy consumption characteristics. However, under the constraint of physical size, MDs have limited resources, which restricts their battery life and computational capacities [3,4]. Recent studies have shown that mobile-edge computation offloading (MECO) technology provides a promising opportunity for effectively overcoming the hardware limitations and energy consumption problems of MDs, by offloading computing-intensive tasks to adjacent clouds at the edges of mobile networks.
In particular, mobile-edge computing (MEC) offers cloud computing capabilities at the very edge of the mobile networks by deploying MEC servers with sufficient computational resources at base stations (BSs), which thus improves the computational efficiency and reduces the latency, and it has drawn significant attention from both academia and industry [5]. The paradigm shifts from cloud computing to MEC can effectively reduce the backhaul latency and energy consumption, as well as support a more flexible infrastructure in a more cost-effective way. For example, the work in [6] used unmanned aerial vehicles (UAVs) to help device-to-device (D2D) wireless networks [7]. Furthermore, MEC together with at the MD for delay-constrained offloading jobs, an optimization problem can be formulated to allocate the computation and communication resources jointly in the described MECO system.
In this paper, we pursue an energy-efficient MEC offloading design considering the partial and binary strategies, aiming to minimize the energy consumption of the mobile application while ensuring that the computational task can be successfully finished with a predefined hard limit of execution time. We derive the analytical solution for the single-MD to the MEC case, which can be generalized to the multi-MD case in later research. Our work presents some main differences from previous works. First, we introduce an offloading model that includes energy consumption at MD and processing time at the server side, while these offloading parameters were neglected in previous works such as [24,27]. Second, instead of considering that the application is run either totally in the cloud or totally in the MD, we include an optimization variable as the quantity of data to be processed on each side to allow a partial trade-off between local computing and offloading. Finally, in contrast with previous works, our approach allows for adapting the transmission strategy to the current channel state as perceived by the MD in the uplink.
The main technical contributions of this paper are as follows.
1. Based on the offloading model above, we formulate an offloading-optimization problem that minimizes the MD energy usage while ensuring the task is completed within a prescribed deadline, by jointly optimizing the transmitting time and offloading ratio. 2. We transform the latency-constrained problem into a two-stage optimization problem, which can be analytically solved using standard convex optimization techniques. In the solution, a channel condition threshold is derived above which full offloading is the optimal decision, whereas below the threshold, partial offloading is performed to trade off between the time and energy cost of offloading. For the partial offloading policy, the optimal transmission time and offloading ratio are derived in closed form expression. 3. This paper also discusses in detail various practical aspects of the offloading strategy, including the conditions under which total offloading or non offloading is optimal, the minimum admissible latency constraint that renders the problem feasible, and how the system parameters affect the offloading decision, including the energy efficiency of MD, the task complexity, and the computing capacity of local devices.
The remainder of this paper is organized as follows. In Section 2, the communication and computational model in mobile execution and MEC execution are presented, respectively. In Section 3, the optimization problem is formulated and solved for optimal partial offloading, while binary offloading decisions are also discussed under different channel conditions. The effects on the offloading strategy of a number of system parameters are analyzed in detail in Section 4. Finally, some simulation results and conclusions are provided in Sections 5 and 6, respectively.

System Model
As shown in Figure 1a, the MEC server is a computing device installed at a wireless access station. The MD is provided with wireless access to the computational resources located in proximal servers. By assigning the computing-intensive applications to the BS, it can help mobile users improve the computing performance. The pioneering literature has extensively studied mobile networking and mobile-edge computing models (e.g., [23,[29][30][31]), which provide useful insights and make performance analysis tractable. Based on these results, we adopted a canonical model that captured the essentials of a typical mobile application. Although it is possible to build a system model to depict the various aspects of MEC in detail, such a model could be too complex to be treated analytically and is difficult for practical systems. Specifically, in this paper, the mobile application is abstracted into a profile with three parameters [22,23], including: • Input data size d App : the number of data bits as the input to the application; • Required CPU cycles c App : the number of CPU cycles required to complete the application; • Application completion deadline T Max : the maximum latency, before which the application should be completed. For the partial offloading policy, let α represent the ratio of the offloaded data to the full data size, and the offloaded data size of the mobile application can be denoted as l Off = d App α. We consider the application scenario to be quasi-static, where the environment at MD will not change during the computation offloading period.
Notice that the input data size d App , the required CPU cycles c App , and the application completion deadline T Max may have an impact on the energy consumption of mobile applications. With more data input, more CPU cycles, and/or a more stringent completion deadline, the energy consumption will be higher. Therefore, it will be beneficial to offload computation-intensive tasks to the MEC servers.

Communication Model
We first introduce the communication model between the MD and the MEC platform. The computation offloading policy was carried out based on energy consumption and completion time. The transmission power for the MD is denoted as p Tr , and g s represents the channel gain of the BS. The uplink data rate r Tr for computation offloading of the MD is given by: where N 0 and I represent the power spectrum density of additive white Gaussian noise and the interference signal, respectively. Letting B be the bandwidth of the channel, at the MEC, the received signal power can be denoted by a function of data rate r: which is monotonically increasing and convex for r > 0. The offloading transmission rate can be denoted as: where t Tr is the transmission time of the MD for offloading the input data size d App . Then, the transmission power p Tr can be calculated by combining (2) and (3):

Computation Model
(1) Local computing: With the local computing approach, the MD executes the application locally on the MD. Let h MD denote the computational capability (i.e., CPU cycles per second) of the MD, and accordingly, the completion time for local computing is defined as: For the local computation energy, we have: where f MD is the consumed energy per CPU cycle for the MD. Besides, f MD indicates the energy efficiency of the MD.
(2) Edge computing: With the edge computing approach, the MD is allowed to offload its computational load to a nearby MEC server. Subsequently, the server performs the offloaded task and feeds the result back to the MD. Therefore, in the overall offloading, the following three consecutive phases are included: (i) transmitting phase, (ii) computing phase, and (iii) receiving phase. According to the communication model, the transmission time and energy consumption of the MD sending its computational load to the MEC server are calculated by: and: e Tr = p Tr t Tr .
The execution time for the computing load d App on the MEC server is computed by: where h MEC denotes the computational capacity of the MEC server. For the edge computing approach, the completion time and energy consumption of the mobile application are formulated as: and: where t Rec and e Rec denote, respectively, the time and energy required at the MD side when receiving the computational outcome from the MEC server. As in the existing works [32,33], the receiving time t Rec and the receiving energy e Rec can be ignored because for many applications, such as face recognition and car barrier detection, the data size of the result is relatively much smaller than the size of the input. In this paper, we consider the energy consumption on the MD side, while our future work will consider the execution energy consumption of the MEC server. Generally, we can assume that the server has higher computational capacity than the mobile device, i.e., h MEC > h MD . Therefore, if a job is fully offloaded to the MEC server, the time saved in the computation phase can be expressed as:

Partial Offloading Model
Next, we introduce the partial offloading model. As in [22,33], we apply a linear model in this paper and the MD enables programs to process computing tasks sequentially. Here, α is the offloading ratio, which is the proportion of the task data offloaded to the MEC server, as shown in Figure 1b.
The offloading data rate is r Tr = d App t Tr , the offloading transmit power p Tr , and the partial offloading time t Off α. Therefore, the total energy consumption of the MD includes both local computing consumption and partial offloading consumption, which is expressed as: Because we consider the computational performance as well, the completion time of the MD can be denoted as: The completion time above also includes the partial offloading time and the local computing time, which are proportional to the original full offloading time and local-computing time, respectively.
By the definitions of e Tot and t Tot , the overall energy consumption of the MD is e Tot , for the task completed duration t Tot .

Joint Optimization of the Communication and Computation Resources with Partial Offloading
Based on the offloading model established in the previous section, we are now ready to optimize an offloading policy. Our goal was to find a policy that satisfies the hard delay constraints with minimal energy consumption. The steps were carried out by analytical means, and solutions were formulated under different channel conditions and computing profiles.

Optimization Formulation
Now, we present the optimization problem of minimizing the energy consumption at the MD while satisfying the hard delay constraint. As a first step, the total energy is a monotonically decreasing function of transmit time, as shown in Lemma 1: Lemma 1. For any fixed 0 ≤ α ≤ 1, the total energy e Tot is monotonically decreasing with t Tr .

Proof. Please see Appendix A.
Lemma 1 proves that energy can be saved by extending the full offloading time under a fixed offloading ratio, till reaching the time constraint.
The optimization objective is to find the offloading policy to minimize the total energy consumption for the MD. It can be noted that e Tot in (13) and t Tot in (15) are affine functions of α. To simplify the problem, we let α and t Tr be the optimization variables, and the optimal p * Tr can be calculated from t * Tr by Equation (4). Hence, the energy consumption minimization problem for the MD is formulated as: The constraint in (16) specifies that the total completion time of the application bits is bounded by the maximum affordable latency T Max .
It is shown from (16) that the primal optimization problem is affected by multiple parameters from both the communication and computational aspects. Of the parameters, the channel gain g s is crucial because it determines the quality of the wireless channel and, hence, the cost of application offloading in terms of energy.

Offloading Policy in Good Channel Conditions
In good channel conditions, a high-data-rate link can be established and maintained at a low energy cost. In addition, the MEC servers have greater computing capacity compared to the local MDs. Therefore, it is of interest to determine analytically when to perform full offloading to take advantage of high-performance servers and good channel conditions. We have the following assertion: Assertion 1. There exists channel gain threshold g Th that, for a channel gain better than threshold g Th , full offloading with α * = 1 is energy-optimal under any latency constraint, and: Proof. Please see Appendix B.
To satisfy the hard latency constraint at minimum energy cost, one can substitute α * = 1 into (15) and apply Lemma 1. The optimal transmission time t * Tr for g s > g Th is given by: and p * Tr can be computed using (4).

Offloading Policy for the Channel Condition below the Threshold
On the other hand, let us consider the case g s ≤ g Th . In that situation, it takes more energy to overcome the propagation loss to offload a task to the MEC server (e Off ≥ e Lo ). The objective function of (16) has the following features: and: It can be observed that Problem (16) is non-convex and hence is challenging to solve directly. (16) can be transformed into a two stage optimization problem, by iteratively finding the optimal α * and t * Tr .

Proof. Since min
{t Tr ,α} can first solve α for any specific value of t Tr and, next, substitute the optimal α * into (16) to find the optimal t * Tr . Therefore, in the first sub-problem (23), we optimize the offloading ratio α for a given t Tr . In the second sub-problem (29), we aim to find the optimal t * Tr , by substituting α * into the original problem.
The first sub-problem is given by: Therefore, we define function h(α): It is obvious that h(α) is convex and non-decreasing monotonically with respect to α, since e Off ≥ e Lo under the condition where g s ≤ g Th . Furthermore, from the latency constraint, we can find , under the default condition t Lo ≥ T Max and T Sav ≥ t Tr (When g s ≤ g Th , it costs more energy offloading data to remote servers than local computing. Therefore, if t Lo < T Max , the local computing is optimal; otherwise, partial offloading is energy-optimal.).
Hence, for a given t Tr , the optimal α * is given by: Next, we substitute (25) into the main problem and solve t Tr . We define: and its second-order derivative is: Therefore, g(t Tr ) is convex with respect to t Tr . From all the above, the composite function f (t Tr ) = h(g(t Tr )) is convex [34] (chapter 3). By substituting (25) into (16), we can now solve the convex sub-problem that minimizes f (t Tr ), thanks to the fact that f (t Tr ) is convex. The optimal t * Tr is to be found by solving the second sub-problem: Solution to the Sub-Problem Next we solve the convex problem (29) using standard convex optimization techniques, as shown in the following. Assertion 3. The optimal t * Tr is computed by the expression below: where W 0 (·) is the Lambert Wfunction [35].
Proof. First, recall that T Sav in (12) is the difference between the time that the task is executed locally and remotely. By letting the first-order derivative of the objective function of (29) be zero, we have: It can be simplified as: We can finally further derive that: However, recall that the condition g s > g Th has already been discussed in Section 3.2, resulting in full offloading.
For g s ≤ g Th , by referring to the definition of the Lambert W function [35], u in Equation (38) is obtained as follows: Therefore, the optimal time t * Tr readily follows.
The optimal transmitting power p * Tr can be derived from Equation (4) accordingly. Finally, α * in (25) can be redescribed as: Overall, the solution in (30) and (39) indicates that if the channel is not good enough, offloading the computing tasks to the remote MEC will have a high energy cost; thus, the partial offloading strategy is the preferred decision.
Combining the above subsections, the optimal solution of the primal problem (16) is finally presented as (40). For channel conditions better than the threshold g Th defined in (17), full offloading is carried out; for channel g s < g Th , partial offloading is performed, and the offloading ratio α * and transmission time t * Tr are optimally chosen to minimize the total energy cost while satisfying the hard time constraint T Max . Finally, the transmission power p * Tr can be derived from t * Tr by (4).

Special Cases of Full Offloading and Non Offloading
Here, we proceed to analyze the special cases of the optimization problem, to determine under what conditions the binary decisions of full offloading or non offloading can be performed.
According to the completion time constraint, the first condition (1) holds when T Max ≥ t * Off , and t * Off = t * Tr + t Ser , i.e., the time required to transmit the task to the MEC server plus the time for remote processing should not be larger than the maximum latency constraint.
Finally, the sufficient condition (2) can be expanded as: This condition holds when g s ≥ g Th and t * Tr ≥ T Sav , which is equivalent to the situation where it will take less energy to offload the application, as discussed in Section 3.2.

Optimality of Non Offloading
Here, we provide the necessary conditions under which the optimal solution is to process all task bits locally at the MD, i.e., α * = 0. These conditions are twofold: (1) α * = 0 should be feasible, and (2) According to the completion time constraint, the first condition (1) holds only if T Max ≥ t Lo , i.e., the time for executing all the application bits locally at the MD should not violate the latency constraint.
On the other hand, we see from Equation (19) that e * Tot (α * ) is equal to f MD c App at α * = 0 and is continuous within a certain interval containing α * = 0. These two characteristics allow us to state that e * Tot (α * ) is constant (i.e., not dependent on α * ) within a certain interval containing α * = 0; therefore, the second condition (2) holds only when: This condition indicates that if offloading within a time constraint costs more energy than local computing, the MD should rely on its own resources. This condition holds in the situation where g s ≤ g Th , and the proof is left for Appendix B.
To summarize the results of the above subsections, the offloading policy decisions are listed in Table 1, under different channel conditions and latency constraints.

Analysis of the System Parameters
In this section, we investigate how the system parameters affect the optimization problem, including the time constraint, task complexity, and processing capacity at MD. This not only enables us to understand how the offloading strategy operates under different system settings, but also helps the system-level investigations of practical MEC systems in further research.

The Latency Constraint T Max and Feasibility of α *
The completion time constraint of (16) is t Off α + t Lo (1 − α) ≤ T Max , which is related to the available time budget (and formulated in terms of maximum allowed latency), and can be rewritten as a set of two detailed constraints as follows: Therefore, the minimum and maximum values of variable α can be defined as follows: The primal problem (16) is feasible only if α Max ≥ α Min . As shown in Equation (44a) and Equation (44b), α Max and α Min can be viewed as linear functions of T Max , and they are upper and lower bounded by one and zero, respectively. Next, we investigate how T Max impacts the offloading policy in different channel conditions.

Channel Gain g s > g Th
In Figure 2, it can be clearly seen that it obtains the lowest value of T Max , under which a full offloading strategy will save energy. Let us denote such a lowest value by T 1 . According to the closed form expressions of t * Tr , e Off and e Lo , T 1 can be calculated as follows: As seen in Figure 2, in the situation where t Ser ≤ T Max ≤ T 1 , the full offloading strategy has to be carried out to meet the tight latency constraint at the expense of high energy consumption. If T 1 ≤ T Max ≤ t Lo , the full offloading can save both time and energy. If t Lo ≤ T Max , offloading will take advantage of the relaxed time constraint, extending the transmission time to save more energy.

Channel Gain g s < g Th
In Figure 3, it can be observed that, for any t Off and t Lo , there exists the lowest value of T Max (also called the minimum admissible latency) under which α * in Equation (16) becomes unfeasible. Let us denote the lowest value by T 0 . By referring to (44a) and (44b), T 0 has to satisfy that: In fact, as shown in Figure 3, T 0 is the x-coordinate of the intersection-point of the two constraint functions α Max (T Max ) and α Min (T Max ). Furthermore, it can be readily verified from (46) that: where t Lo is the time that is needed to do all the processing locally at the MD and t Ser is the time that would be needed to do all the processing remotely at the MEC server, as defined in (5) and (9).
For the policy specified in the previous section, where t * Tr is defined in (30). Now, T * 0 can be evaluated from (46): which is the minimum admissible latency under this policy. For the time constraint T Max satisfying T * 0 ≤ T Max ≤ t Lo , the partial offloading is optimal to minimize the total energy consumption for meeting the latency constraint at the same time. If t Lo ≤ T Max , the local computing strategy is optimal in terms of energy and time consumption. Note that in the situation where t Ser ≤ T Max ≤ T * 0 , the full offloading is optimal and can meet the tight latency constraint at the expense of high energy consumption.
Interestingly, when the time budget (i.e., the maximum allowed latency T Max ) is equal to the minimum affordable latency T 0 , partial offloading is required, and the distribution of the task size is given by: (49) where the previous expressions were obtained by finding the point where functions α Max (T Max ) and α Min (T Max ) intersect.

The Channel Gain Threshold as a Function of the System Parameters
For those computation-intensive applications, it is inefficient to run it locally, because too much energy is consumed per CPU cycle at the MD or because the application spends too many CPU cycles per bit. In this situation, the full offloading strategy is more energy and time efficient for MDs. Here, we introduce the parameter bit-wise application complexity, which is defined as C App c App d App , and the channel gain threshold g Th can be expressed as a function of f MD and C App as follows: (50) Figure 4 shows the radius of the effective coverage x 0 of an MEC server installed in a picocell base station for full offloading, based on the relationship between path loss [36] and channel gain L T = −20 log g Th . As shown in Figure 4, with the energy efficiency of MD becoming weaker and the application job becoming increasingly complicated, the effective coverage region decreases; thus, more MDs will benefit from MEC in the cell.
Moreover, for asymptotically large C App , the channel gain threshold g Th in (50) can be further approximated as follows: As shown in Figure 5, g Th is largely determined by the local computing power and task complexity.  In conclusion, the proposed method is applicable to the emerging computational-intensive and/or delay-sensitive applications, i.e., novel AI applications from sectors such as the Industrial Internet of Things, intelligent robots, smart cities, and smart homes.

Simulation Results
The following provides simulation results to illustrate the performance of the proposed offloading strategy. We first consider the scenario where the wireless picocell base station had a coverage radius of 500 m and the base station antenna was located inside the building. According to the path loss model for the residential environment, the path loss model is expressed as: where f c = 2 GHz is the carrier frequency; x d is the distance between the mobile user and the wireless base station; L f (n f ) = 4n f (dB) is the floor penetration factor for the ITU-Rmodel (13.2) [36], and the number of floors n f = 1. We considered the computational task to be generated by a face recognition application, and the task profile refers to [37,38]. The computation profile refers to [38,39]. Moreover, as the mobile devices are evolving to become smarter and the resolution of the images and videos is getting higher, we set the data size for the task to d App = 5000 KB. The simulation parameters are summarized in Table 2. These parameters were used as the default in the subsequent simulations unless explicitly specified. Beforehand, we calculated t Ser = 1 s, t Lo = 10 s, T Sav = 9 s, e Lo = 0.1 J. The channel gain threshold was calculated from Table 2 where g Th = 4.0 × 10 −5 , according to Equation (17). The relationship between channel gain and path loss was L T = −20 log g Th ; thus, the MEC's full offloading coverage radius x 0 = 200 m, which is denoted as the effective coverage in the rest of the paper.  In addition, we also list the numerical values of MEC's full offloading coverage radius x 0 for situations of different channel interference strengths and bit-wise complexity C App , as shown in Table 3. For an MEC system, developers can use these values to choose the right location of the MEC servers so as to make full use of their computing resources. x D = 250m x D = 300m  Bt Tr − 1 . As the transmission time increased, it required less energy for the MD to transmit task data to the MEC server. In addition, when the MD got closer to the BS, the channel condition became better, i.e., the channel gain improved, and it cost the MD less energy to offload the computing task. Next, for g s > g Th , we verified that the full offloading policy was optimal in terms of minimizing energy consumption, as shown in Figure 7.  Figure 7a shows the energy consumption for different distances between the BS and MD in the MEC-effective coverage of g s > g Th . As shown in the figure, for g s > g Th , the full offloading policy was optimal for saving energy, which corresponded to the optimum solution of (16). In such a situation and T Max ≥ T 1 , full offloading energy was always lower than local computing energy. Moreover, only the task data size, the task complexity, and the CPU computing capability of MDs could affect the energy consumption and latency of local computing. Therefore, the changes in the distance between the MD and BS or the task completion time requirement did not influence the performance of local computing. Figure 7b shows the energy savings as a percentage for the case of full offloading. Note that in the case of full offloading, the offloading time is T Max − t Ser . As shown in the figure, if the latency deadline became less hard, and the distance from the BS decreased (the channel gain increased), the percentage of energy savings would increase, as expected.
In the situation in which the MD was out of the MEC-effective coverage for which g s ≤ g Th , partial offloading was preferred, and we continued to evaluate performance of the energy-optimal policy under various settings. Figure 8 demonstrates that the proposed partial offloading strategy was optimal for minimizing the energy consumption under the hard delay constraint, and the offloading fraction α * = t Lo −T Max T Sav −t * Tr increased as the latency deadline became more stringent. As shown in the figure, the total energy consumption increased as the distance from the BS increased. Figure 9 also shows the energy and time consumption for different distances between the BS and MD for the case of partial offloading. For comparison, full offloading and local computing are included in Figure 9. When g s < g Th , full offloading consumed more energy than partial offloading and local computing under the same delay constraint, as shown in Section 3. Moreover, the offloading energy increased as the distance from the BS increased, as shown in Figure 9a. We can observe from Figure 9b that the full offloading time was less than the partial offloading and local computing time. In fact, to meet the time constraint of T Max ≤ t Lo , it was necessary for the MD to distribute a part of the computing load to the MEC server; thus, the partial offloading strategy always cost more energy than local computing, as shown in Figure 9a. Additionally, to minimize the energy consumption at the MD, the proportion of the offloaded application decreased with increasing distance. Therefore, more time was consumed on local computing. To compensate for the additional time loss of local computing, the offloading data rate r Tr must be increased, yielding a shorter full offloading time t * Off , as shown in Figure 9b.   Figure 10 shows the percentage of a task to be remotely processed at the MEC server versus the distance from the BS. The task offloading percentage decreased as the distance from the BS increased, as expected. Note that as the latency constraint became tighter, the offloading percentage increased, and the percentage was also affected by the distance from the BS, which coincided with the optimal solution in (39).

Conclusions
This paper presented an offloading strategy for optimizing communication and computation resources usage in an MEC scenario. An energy consumption minimization problem was formulated with the latency constraint. A channel gain threshold of binary offloading and partial offloading was derived, through analyzing the optimization problem. Since the problem was non-convex and difficult to solve directly, we decomposed the original non-convex problem into two sub-problems to obtain the optimal solution in closed form expression. The analytical solution also yielded new understandings of the inherent trade-off between the energy consumption and latency.
For future work, we will extend the strategy to the multi-MD offloading scenario in a multi-access wireless environment. In addition, we are interested in considering a more dynamic model in which the MD may join and leave the MEC server's coverage within a foreseeable period, in which the mobility patterns might play an important role in the problem formulation.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; nor in the decision to publish the results.

Appendix A. Monotonicity of e Tot as a Function of t Tr
The total energy consumption of the MD includes both local computing consumption and partial offloading consumption, which is expressed as: To prove that e Tot is a monotonically decreasing function of t Tr , we need to compute the partial derivative in which: , and let f (v) = 2 v − v 2 v ln 2 − 1, then: It can be noticed that f (v)| v=0 = 0, besides: Thus, f (v) ≤ 0 for v ≥ 0. Finally, by noticing that: the lemma is proved.

Appendix B. The Existence of Channel Threshold g Th
Let us consider the case in which the offloading task can be finished in the same time interval as the local computing time in which t Max = t Lo . By referring to Equations (10) and (12), one finds that t Tr = T Sav . Therefore, the energy consumption in the transmitting stage can be written as a function of channel gain g s as follows: Next, one may compare e 0 (g s ) with local computing energy consumption, which is f MD c App . As e 0 is an inverse proportional function of g s in (A8), there exists a threshold g Th , such that for g s > g Th , the offloading energy is less than the local f MD c App . Therefore, For channel conditions better than threshold g Th , full offloading with α * = 1 is optimal because in this case, transmitting the data to the MEC server always consumes less energy than local computing under the same latency constraint.
The result above can now be extended to prove that full offloading (α * = 1) is optimal for the general channel condition g s > g Th . The constraints of T Max < t Lo and T Max > t Lo are discussed as follows.