EnergyEfficient Resource Allocation for
MobileEdge Computation Offloading
Abstract
Mobileedge computation offloading (MECO) offloads intensive mobile computation to clouds located at the edges of cellular networks. Thereby, MECO is envisioned as a promising technique for prolonging the battery lives and enhancing the computation capacities of mobiles. In this paper, we study resource allocation for a multiuser MECO system based on timedivision multiple access (TDMA) and orthogonal frequencydivision multiple access (OFDMA). First, for the TDMA MECO system with infinite or finite cloud computation capacity, the optimal resource allocation is formulated as a convex optimization problem for minimizing the weighted sum mobile energy consumption under the constraint on computation latency. The optimal policy is proved to have a thresholdbased structure with respect to a derived offloading priority function, which yields priorities for users according to their channel gains and local computing energy consumption. As a result, users with priorities above and below a given threshold perform complete and minimum offloading, respectively. Moreover, for the cloud with finite capacity, a suboptimal resourceallocation algorithm is proposed to reduce the computation complexity for computing the threshold. Next, we consider the OFDMA MECO system, for which the optimal resource allocation is formulated as a mixedinteger problem. To solve this challenging problem and characterize its policy structure, a lowcomplexity suboptimal algorithm is proposed by transforming the OFDMA problem to its TDMA counterpart. The corresponding resource allocation is derived by defining an average offloading priority function and shown to have closetooptimal performance in simulation.
I Introduction
The realization of Internet of Things (IoT) [1] will connect tens of billions of resourcelimited mobiles, e.g., mobile devices, sensors and wearable computing devices, to Internet via cellular networks. The finite battery lives and limited computation capacities of mobiles pose significant challenges for designing IoT. One promising solution is to leverage mobileedge computing [2] and offload intensive mobile computation to nearby clouds at the edges of cellular networks, called edge clouds, with short latency, referred to as mobileedge computation offloading (MECO). In this paper, we consider a MECO system with a single edge cloud serving multiple users and investigate the energyefficient resource allocation.
Ia Prior Work
Mobile computation offloading (MCO) [3] (or mobile cloud computing) has been extensively studied in computer science, including system architectures (e.g., MAUI [4]), virtual machine migration [5] and power management [6]. It is commonly assumed that the implementation of MCO relies on a network architecture with a central cloud (e.g., a data center). This architecture has the drawbacks of high overhead and long backhaul latency [7], and will soon encounter the performance bottleneck of finite backhaul capacity in view of exponential mobile traffic growth. These issues can be overcome by MECO based on a network architecture supporting distributed mobileedge computing. Among others, designing energyefficient control policies is a key challenge for the MECO system.
Energyefficient MECO requires the joint design of MCO and wireless communication techniques. Recent years have seen research progress on this topic for both singleuser [8, 9, 10, 11] and multiuser [12, 13, 14, 15, 16] MECO systems. For a singleuser MECO system, the optimal offloading decision policy was derived in [8] by comparing the energy consumption of optimized local computing (with variable CPU cycles) and offloading (with variable transmission rates). This framework was further developed in [9] and [10] to enable adaptive offloading powered by wireless energy transfer and energy harvesting, respectively. Moreover, dynamic offloading was integrated with adaptive LTE/WiFi link selection in [11] to achieve higher energy efficiency. For multiuser MECO systems, the control policies for energy savings are more complicated. In [12], distributed computation offloading for multiuser MECO at a single cloud was designed using game theory for both energyandlatency minimization at mobiles. A multicell MECO system was considered in [13], where the radio and computation resources were jointly allocated to minimize the mobile energy consumption under offloading latency constraints. With the coexistence of central and edge clouds, the optimal user scheduling for offloading to different clouds was studied in [14]. In addition to total mobile energy consumption, cloud energy consumption for computation was also minimized in [15] by designing the mapping between clouds and mobiles for offloading using game theory. The cooperation among clouds was further investigated in [16] to maximize the revenues of clouds and meet mobiles’ demands via resource pool sharing. Prior work on MECO resource allocation focuses on complex algorithmic designs and yields little insight into the optimal policy structures. In contrast, for a multiuser MECO system based on timedivision multiple access (TDMA), the optimal resourceallocation policy is shown in the current work to have a simple thresholdbased structure with respect to a derived offloading priority function. This insight is used for designing the lowcomplexity resourceallocation policy for a orthogonal frequencydivision multiple access (OFDMA) MECO system.
Resource allocation for traditional multipleaccess communication systems has been widely studied, including TDMA (see e.g., [17]), OFDMA (see e.g., [18]) and codedivision multiple access (CDMA) (see e.g., [19]). Moreover, it has been designed for existing networks such as cognitive radio [20] and heterogenous networks [21]. Note that all of them only focus on the radio resource allocation. In contrast, for the newly proposed MECO systems, both the computation and radio resource allocation at the edge cloud are jointly optimized for the maximum mobile energy savings, making the algorithmic design more complex.
IB Contribution and Organization
This paper considers resource allocation in a multiuser MECO system based on TDMA and OFDMA. Multiple mobiles are required to compute different computation loads with the same latency constraint. Assuming that computation data can be split for separate computing, each mobile can simultaneously perform local computing and offloading. Moreover, the edge cloud is assumed to have perfect knowledge of local computing energy consumption, channel gains and fairness factors at all users, which is used for designing centralized resource allocation to achieve the minimum weighted sum mobile energy consumption. In the TDMA MECO system, the optimal thresholdbased policy is derived for both the cases of infinite and finite cloud capacities. For the OFDMA MECO system, a lowcomplexity suboptimal algorithm is proposed to solve the mixedinteger resource allocation problem.
The contributions of current work are as follows.

TDMA MECO with infinite cloud capacity: For TDMA MECO with infinite (computation) capacity, a convex optimization problem is formulated to minimize the weighted sum mobile energy consumption under the timesharing constraint. To solve it, an offloading priority function is derived that yields priorities for users and depends on their channel gains and local computing energy consumption. Based on this, the optimal policy is proved to have a thresholdbased structure that determines complete and minimum offloading for users with priorities above and below a given threshold, respectively.

TDMA MECO with finite cloud capacity: The above results are extended to the case of finite capacity. Specifically, the optimal resource allocation policy is derived by defining an effective offloading priority function and modifying the thresholdbased policy as derived for the infinitecapacity cloud. To reduce the complexity arising from a twodimension search for Lagrange multipliers, a simple and lowcomplexity algorithm is proposed based on the approximated offloading priority order. This reduces the said search to a onedimension search, shown by simulation to have closetooptimal performance.

OFDMA MECO: For a infinitecapacity cloud based on OFDMA, the insight of prioritybased policy structure of TDMA is used for optimizing its resource allocation. Specifically, to solve the corresponding mixedinteger optimization problem, a lowcomplexity suboptimal algorithm is proposed. Using average subchannel gains, the OFDMA resource allocation problem is transformed into its TDMA counterpart. Based on this, the initial resource allocation and offloaded data allocation can be determined by defining an average offloading priority function. Moreover, the integer subchannel assignment is performed according to the offloading priority order, followed by adjustments of offloaded data allocation over assigned subchannels. The proposed algorithm is shown to have closetooptimal performance by simulation and can be extended to the finitecapacity cloud case.
The reminder of this paper is organized as follows. Section II introduces the system model. Section III presents the problem formulation for multiuser MECO based on TDMA. The corresponding resource allocation policies are characterized in Section IV and Section V for both the cases of infinite and finite cloud capacities, respectively. The above results are extended in Section VI for the OFDMA system. Simulation results and discussion are given in Section VII, followed by the conclusion in Section VIII.
Ii System Model
Consider a multiuser MECO system shown in Fig. 1 with singleantenna mobiles, denoted by a set , and one singleantenna base station (BS) that is the gateway of an edge cloud. These mobiles are required to compute different computation loads under the same latency constraint. ^{1}^{1}1For asynchronous computation offloading among users, the maximum additional latency for each user is one time slot. Moreover, this framework can be extended to predictive computing by designing control policies for the coming data. Assume that the BS has perfect knowledge of multiuser channel gains, local computing energy per bit and sizes of input data at all users, which can be obtained by feedback. Using these information, the BS selects offloading users, determines the offloaded data sizes and allocates radio resource to offloading users with the criterion of minimum weighted sum mobile energy consumption.
Iia MultipleAccess Model
Both the TDMA and OFDMA systems are considered as follows. For the TDMA system, time is divided into slots each with a duration of seconds where is chosen to meet the userlatency requirement. As shown in Fig. 1, each time slot comprises two sequential phases for 1) mobile offloading or local computing and 2) cloud computing and downloading of computation results from the edge cloud to mobiles. Cloud computing has small latency; the downloading consumes negligible mobile energy and furthermore is much faster than offloading due to relative smaller sizes of computation results. For these reasons, the second phase is assumed to have a negligible duration compared to the first phase and not considered in resource allocation. For the OFDMA system, the total bandwidth is divided into multiple orthogonal subchannels and each subchannel can be assigned to at most one user. The offloading mobiles will be allocated with one or more subchannels.
Considering an arbitrary slot in TDMA/OFDMA, the BS schedules a subset of users for complete/partial offloading. The user with partial or no offloading computes a fraction of or all input data, respectively, using a local CPU.
IiB LocalComputing Model
Assume that the CPU frequency is fixed at each user and may vary over users. Consider an arbitrary time slot. Following the model in [12], let denote the number of CPU cycles required for computing bit of input data at the th mobile, and the energy consumption per cycle for local computing at this user. Then the product gives computing energy per bit. As shown in Fig. 2, mobile is required to compute bit input data within the time slot, out of which bit is offloaded and bit is computed locally. Then the total energy consumption for local computing at mobile , denoted as , is given by . Let denote the computation capacity of mobile that is measured by the number of CPU cycles per second. Under the computation latency constraint, it has As a result, the offloaded data at mobile has the minimum size of with , where
IiC ComputationOffloading Model
First, consider the TDMA system for an arbitrary time slot. Let denote the channel gain for mobile that is constant during offloading duration, and its transmission power. Then the achievable rate (in bits/s), denoted by , is:
(1) 
where and are the bandwidth and the variance of complex white Gaussian channel noise, respectively. The fraction of slot allocated to mobile for offloading is denoted as with , where corresponds to no offloading. For the case of offloading (), under the assumption of negligible cloud computing and result downloading time (see Section IIA), the transmission rate is fixed as since this is the most energyefficient transmission policy under a deadline constraint [22]. Define a function . It follows from (1) that the energy consumption for offloading at mobile is
(2) 
Note that if either or , is equal to zero.
Next, consider an OFDMA system with subchannels, denoted by a set . Let and denote the transmission power and channel gain of mobile on the th subchannel. Define as the subchannel assignment indicator variable where indicates that subchannel is assigned to mobile , and verse vice. Then the achievable rate (in bits/s) follows:
(3) 
where and are the bandwidth and noise power for each subchannel, respectively. Let denote the offloaded data size over the offloading duration time that can be set as the OFDMA symbol duration. The corresponding offloading energy consumption can be expressed as below, which is similar to that in [18], namely,
(4) 
where and .
IiD CloudComputing Model
Considering an edge cloud with finite (computation) capacity, for simplicity, the finite capacity is reflected in one of the following two constraints. ^{2}^{2}2For simplicity, we consider either a computationload or a computationtime constraint at one time but not both simultaneously. However, note that the two constraints can be considered equivalent. Specifically, limiting the cloud computation load allows the computation to be completed within the required time and vice versa. The current resourceallocation policies can be extended to account for more elaborate constraints, which are outside the scope of the paper. The first one upperbounds CPU cycles of sum offloaded data that can be handled by the cloud in each time slot. Let represent the cloud computation capacity measured by CPU cycles per time slot. Then it follows: . This constraint ensures negligible cloud computing latency. The other one considers nonnegligible computing time at the cloud that performs load balancing as in [23], given as where is the cloud computation capacity measure by CPU cycles per second. Note that is factored into the latency constraint in the sequel.
Iii Multiuser MECO for TDMA:
Problem Formulation
In this section, resource allocation for multiuser MECO based on TDMA is formulated as an optimization problem. The objective is to minimize the weighted sum mobile energy consumption: , where the positive weight factors account for fairness among mobiles. Under the constraints on timesharing, cloud computation capacity and computation latency, the resource allocation problem is formulated as follows:
(P1)  
s.t.  
First, it is easy to observe that the feasibility condition for Problem P1 is: . It shows that whether the cloud capacity constraint is satisfied determines the feasibility of this optimization problem, while the timesharing constraint can always be satisfied and only affects the mobile energy consumption. Next, one basic characteristic of Problem P1 is given in the following lemma, proved in Appendix A.
Lemma 1.
Problem P1 is a convex optimization problem.
Assume that Problem P1 is feasible. The direct solution for Problem P1 using the dualdecomposition approach (the Lagrange method) requires iterative computation and yields little insight into the structure of the optimal policy. To address these issues, we adopt a twostage solution approach that requires first solving Problem P2 below, which follows from Problem P1 by relaxing the constraint on cloud capacity:
(P2)  
s.t.  
If the solution for Problem P2 violates the constraint on cloud capacity, Problem P1 is then incrementally solved building on the solution for Problem P2. This approach allows the optimal policy to be shown to have the said thresholdbased structure and also facilitates the design of lowcomplexity closetooptimal algorithm. It is interesting to note that Problem P2 corresponds to the case where the edge cloud has infinite capacity. The detailed procedures for solving Problems P1 and P2 are presented in the two subsequent sections.
Iv Multiuser MECO for TDMA:
Infinite Cloud Capacity
In this section, by solving Problem P2 using the Lagrange method, we derive a thresholdbased policy for the optimal resource allocation.
To solve Problem P2, the partial Lagrange function is defined as
where is the Lagrange multiplier associated with the timesharing constraint. For ease of notation, define a function . Let denote the optimal solution for Problem P2 that always exists satisfying the feasibility condition.
Then applying KKT conditions leads to the following necessary and sufficient conditions:
(5a)  
(5b)  
(5c) 
Note that for and , it can be derived from (5a) and (5b) that
(6) 
Based on these conditions, the optimal policy for resource allocation is characterized in the following subsections.
Iva Offloading Priority Function
Define a (mobile) offloading priority function, which is essential for the optimal resource allocation, as follows:
(7) 
with the constant defined as
(8) 
This function is derived by solving a useful equation as shown in the following lemma.
Lemma 2.
Given , the offloading priority function in (7) is the root of following equation with respect to :
Lemma 2 is proved in Appendix B. The function generates an offloading priority value, , for mobile , depending on corresponding variables quantifying fairness, local computing and channel. The amount of offloaded data by a mobile grows with an increasing offloading priority as shown in the next subsection. It is useful to understand the effects of parameters on the offloading priority that are characterized as follows.
Lemma 3.
Given , is a monotone increasing function for , , and .
Lemma 3 is proved in Appendix C, by deriving the first derivatives of with respect to each parameter. This lemma is consistent with the intuition that, to reduce energy consumption by offloading, the BS should schedule those mobiles having high computing energy consumption per bit (i.e., large and ) or good channels (i.e., large ).
Remark 1 (Effects of Parameters on the Offloading Priority).
It can be observed from (7) and (8) that the offloading priority scales with local computing energy per bit approximately as and with the channel gain approximately as . The former scaling is much faster than the latter. This shows that the computing energy per bit is dominant over the channel on determining whether to offload.
IvB Optimal ResourceAllocation Policy
Based on conditions in (5a)(5c) and Lemma 2, the main result of this section is derived, given in the following theorem.
Theorem 1 (Optimal ResourceAllocation Policy).
Consider the case of infinite cloud computation capacity. The optimal policy solving Problem P2 has the following structure.

If and the minimum offloaded data size for all , none of these users performs offloading, i.e.,

If there exists mobile such that or , for ,
and
where is the Lambert function and is the optimal value of the Lagrange multiplier satisfying the active timesharing constraint: .
Proof.
See Appendix D.
Theorem 1 reveals that the optimal resourceallocation policy has a thresholdbased structure when offloading saves energy. In other words, since the exact case of rarely occurs in practice, the optimal policy makes a binary offloading decision for each mobile. Specifically, if the corresponding offloading priority exceeds a given threshold, namely , the mobile should offload all input data to the edge cloud; otherwise, the mobile should offload only the minimum amount of data under the computation latency constraint. This result is consistent with the intuition that the greedy method can lead to the optimal resource allocation. Note that there are two groups of users selected to perform the minimum offloading. One is the group of users for which it has positive minimum offloading data, i.e., , and offloading cannot save energy consumption since they have bad channels or small local computing energy such that and . The second group is the set of users for which offloading is energyefficient, i.e., , however, have relatively small offloading priorities, i.e., ; they cannot perform complete offloading due to the limited radio resource.
Remark 2 (Offloading or Not?).
For a conventional TDMA communication system, continuous transmission by at least one mobile is always advantageous under the criterion of minimum sum energy consumption [17]. However, this does not always hold for a TDMA MECO system where no offloading for all users may be preferred as shown in Theorem 1. Offloading is not necessary expect for two cases. First, there exists at least one mobile whose inputdata size is too large such that complete local computing fails to meet the latency constraint. Second, some mobile has a sufficient high value for the product , indicating that energy savings can be achieved by offloading because of high channel gain or large local computing energy consumption.
Remark 3 (Offloading Rate).
It can be observed from Theorem 1 that the offloading rate, defined as for mobile , is determined only by the channel gain and fairness factor while other factors, namely and , affect the offloading decision. The rate increases with a growing channel gain and vice versa since a large channel gain supports a higher transmission rate or reduces transmission power, making offloading desirable for reducing energy consumption.
Remark 4 (LowComplexity Algorithm).
The traditional method for solving Problem P2 is the blockcoordinate descending algorithm which performs iterative optimization of the two sets of variables, and , resulting in high computation complexity. In contrast, by exploiting the thresholdbased structure of the optimal resourceallocation policy in Theorem 1, the proposed solution approach, described in Algorithm 1, needs to perform only a onedimension search for , reducing the computation complexity significantly. To facilitate the search, next lemma gives the range of , which can be easily proved from Theorem 1.
Lemma 4.
When there is at least one offloading mobile, satisfies:
Furthermore, with the assumption of infinite cloud capacity, the effects of finite radio resource (i.e., the TDMA timeslot duration) are characterized in the following two propositions in terms of the number of offloading users, which can be easily derived using Theorem 1.
Proposition 1 (Exclusive Mobile Computation Offloading).
For TDMA MECO with offloading users, only one mobile can offload computation if where .
It indicates that short time slot limits the number of offloading users. From another perspective, it means that if the winner user has excessive data, it will take up all the resource.
Proposition 2 (Inclusive Mobile Computation Offloading).
All offloadingdesired mobiles (defined as for which, it has ) will completely offload computation if
where , and .
Proposition 2 reveals that when exceeds a given threshold, the offloadingdesired mobiles for which offloading brings energy savings, will offload all computation to the cloud.
Remark 5 (Which Resource is Bottleneck?).
Proposition 1 and 2 suggest that as the radio resource continuously increases, the cloud will become the performance bottleneck and the assumption of infinite cloud capacity will not hold. For a short timeslot duration, only a few users can offload computation. This just requires a fraction of computation such that the cloud can be regarded as having infinite capacity. However, when the timeslot duration is large, it not only saves energy consumption by offloading but also allows more users for offloading, which potentially exceeds the cloud capacity. The case of finitecapacity cloud will be considered in the sequel.
IvC Special Cases
The optimal resourceallocation policies for several special cases considering equal fairness factors are discussed as follows.
IvC1 Uniform Channels and Local Computing
Consider the simplest case where are identical for all . Then all mobiles have uniform offloading priorities. In this case, for the optimal resource allocation, all mobiles can offload arbitrary data sizes so long as the sum offloaded data size satisfies the following constraint:
IvC2 Uniform Channels
Consider the case of . The offloading priority for each mobile, say mobile , is only affected by the corresponding localcomputing parameters and . Without loss of generality, assume that . Then the optimal resourceallocation policy is given in the following corollary of Theorem 1.
Corollary 1.
Assume infinite cloud capacity, and . Let denote the index such that for all and for all , neglecting the rare case where . The optimal resourceallocation policy is given as follows: for ,
and
The result shows that the optimal resourceallocation policy follows a greedy approach that selects mobiles in a descending order of energy consumption per bit for complete offloading until the timesharing duration is fully utilized.
IvC3 Uniform Local Computing
Consider the case of . Similar to the previous case, the optimal resourceallocation policy can be shown to follow the greedy approach that selects mobiles for complete offloading in the descending order of channel gains.
V Multiuser MECO for TDMA:
Finite Cloud Capacity
In this section, we consider the case of finite cloud capacity and analyze the optimal resourceallocation policy for solving Problem P1. The policy is shown to also have a thresholdbased structure as the infinitecapacity counterpart derived in the preceding section. Both the optimal and suboptimal algorithms are presented for policy computation. The results are extended to the finitecapacity cloud with nonnegligible computing time.
Va Optimal ResourceAllocation Policy
To solve the convex Problem P1, the corresponding partial Lagrange function is written as
(9) 
where is the Lagrange multiplier associated with the cloud capacity constraint. Using the above Lagrange function, it is straightforward to show that the corresponding KKT conditions can be modified from their infinitecapacity counterparts in (5a)(5c) by replacing with , called the effective computation energy per cycle. The resultant effective offloading priority function, denoted as , can be modified accordingly from that in (7) as
(10) 
where
Moreover, it can be easily derived that a cloud with smaller capacity leads to a larger Lagrange multiplier . It indicates that compared with in (7) for the case of infinitecapacity cloud, the effective offloading priority function here is also determined by the cloud capacity. Based on above discussion, the main result of this section follows.
Theorem 2.
Remark 6 (Variation of Offloading Priority Order).
Since , it has for all . Therefore, the offloading priority order may be different with that of infinitecapacity cloud, due to the varying decreasing rates of offloading priorities. The reason is that the finitecapacity cloud should make the tradeoff between energy savings and computation burden. To this end, it will select mobiles for offloading that can save significant energy and require less computation for each bit of data.
Computing the threshold for the optimal resourceallocation policy requires a twodimension search over the Lagrange multipliers , described in Algorithm 2. For an efficient search, it is useful to limit the range of and shown as below, which can be easily proved.
Lemma 5.
When there is at least one offloading mobile, the optimal Lagrange multipliers satisfy:
where is defined in Lemma 4.
Note that corresponds to the case of infinitecapacity cloud and to the case where offloading yields no energy savings for any mobile.
VB SubOptimal ResourceAllocation Policy
To reduce the computation complexity of Algorithm 2 due to the twodimension search, one simple suboptimal policy is proposed as shown in Algorithm 3. The key idea is to decouple the computation and radio resource allocation. In Step , based on the approximated offloading priority in (7) for the case of infinitecapacity cloud, we allocate the computation resource to mobiles with high offloading priorities. Step optimizes the corresponding fractions of slot given offloaded data. This suboptimal algorithm has low computation complexity. Specifically, given a solution accuracy , the iteration complexity for onedimensional search can be given as . For each iteration, the resourceallocation complexity is . Thus, the total computation complexity for the suboptimal algorithm is . Moreover, its performance is shown by simulation to be closetooptimal in the sequel.
VC Extension: MECO with NonNegligible Computing Time
Consider another finitecapacity cloud for which the computing time is nonnegligible. Surprisingly, the resultant optimal policy is also threshold based, with respect to a different offloading priority function.
Assume that the edge cloud performs load balancing for the uploaded computation as in [23]. In other words, the CPU cycles are proportionally allocated for each user such that all users experience the same computing time: (see Section IID). Then the latency constraint is reformulated as , accounting for both the data transmission and cloud computing time. The resultant optimization problem for minimizing weighted sum mobile energy consumption is rewritten by
(P3)  
s.t.  
The key challenge of Problem P3 is that the amount of offloaded data size for each user has effects on offloading energy consumption, offloading duration and cloud computing time, making the problem more complicated.
The feasibility condition for Problem P3 can be easily obtained as: Note that the case makes Problem P3 infeasible since the resultant offloading time () cannot enable computation offloading.
Similarly, to solve Problem P3, the partial Lagrange function is written as
Define two sets of important constants: and for all . Using KKT conditions, we can obtain the following offloading priority function
(11) 
where
(12) 
This function is derived by solving a equation in the following lemma, proved in Appendix E.
Lemma 6.
Given , the offloading priority function in (11) is the root of the following equation with respect to :
(13) 
Recall that for a cloud that upperbounds the offloaded computation, its offloading priority (i.e., in (10)) is function of a Lagrange multiplier which is determined by . However, for the current cloud with nonnegligible computing time, the offloading priority function in (11) is directly affected by the finite cloud capacity via .
In the following, the properties of , which is the key component of , are characterized.
Lemma 7.
if and only if , where is defined in (8).
It is proved in Appendix F and indicates that the condition that offloading saves energy comsumption for this kind of finitecapacity cloud is same as that of infinitecapacity cloud.
Lemma 8.
Given , is a monotone increasing function for , , , and , respectively.
Similar to Lemma 3, Lemma 8 can be proved by deriving the first derivatives of with respect to each parameter. It shows that enhancing the cloud capacity will increase the offloading priority for all users that is same as the result of a cloud with upperbounded offloaded computation.
Based on above discussion, the main result of this section are presented in the following theorem.
Theorem 3.
The optimal policy can be computed with a onedimension search for , following a similar procedure in Algorithm 1.
Vi Multiuser MECO for OFDMA
In this section, consider resource allocation for MECO OFDMA. Both OFDM subchannels and offloaded data sizes are optimized for the energyefficient multiuser MECO. To solve the formulated mixedinteger optimization problem, a suboptimal algorithm is proposed by defining an average offloading priority function from its TDMA counterpart and shown to have closetooptimal performance in simulation.
Via Multiuser MECO for OFDMA: Infinite Cloud Capacity
Consider an OFDMA system (see Section II) with mobiles and subchannels. The cloud is assumed with infinite cloud capacity. Given timeslot duration , the latency constraint for local computing is rewritten as . Moreover, the timesharing constraint is replaced by subchannel constraints, expressed as for all . Then the corresponding optimization problem for the minimum weighted sum mobile energy consumption based on OFDMA is readily reformulated as:
(P4)  
s.t.  
Observe that Problem P4 is a mixedinteger programming problem that is difficult to solve. It involves the joint optimization of both continuous variables and integer variables . One common solution method is relaxationandrounding, which firstly relaxes the integer constraint as the realvalue constraint [18], and then determines the integer solution using rounding techniques. Note that the integerrelaxation problem is a convex problem which can be solved by powerful convex optimization techniques. An alternative method is using dual decomposition as in [24], which has been proved to be optimal when the number of subchannels goes to infinity. However, both algorithms performing extensive iterations shed little insight on the policy structure.
To reduce the computation complexity and characterize the policy structure, a lowcomplexity suboptimal algorithm is proposed below by a decomposition method, motivated by the following existing results and observations. First, for traditional OFDMA systems, lowcomplexity subchannel allocation policy was designed in [25, 26] via defining average channel gains, which was shown to achieve closetooptimal performance in simulation. Next, for the integerrelaxation resource allocation problem, applying KKT conditions directly can lead to its optimal solution. It can be observed that for each subchannel, users with higher offloading priorities should be allocated with more radio resource. Therefore, in the proposed algorithm, the initial resource and offloaded data allocation is firstly determined by defining average channels gains and an average offloading priority function. Then, the integer subchannel assignment is performed according to the offloading priority order, followed by the adjustment of offloaded data allocation over assigned subchannels for each user. The main procedures of this sequential algorithm are as follows.

Phase 1 [SubChannel Reservation for OffloadingRequired Users]: Consider the offloadingrequired users that have . The offloading priorities for these users are ordered in the descending manner. Based on this, the available subchannels with high priorities are assigned to corresponding users sequentially and each user is allocated with one subchannel.

Phase 2 [Initial Resource and Offloaded Data Allocation]: For the unassigned subchannels, using average channel gain over these subchannels for each user, the OFDMA MECO problem is transformed into its TDMA counterpart. Then, by defining an average offloading priority function, the optimal total subchannel number and offloaded data size for each user are derived. Note that the resultant subchannel numbers may not be integer.

Phase 3 [Integer SubChannel Assignment]: Given constraints on the rounded total subchannel numbers for each user derived in Phase , specific integer subchannel assignment is determined by the offloading priority order. Specifically, each subchannel is assigned to the user that requires subchannel assignment and has higher offloading priority than others.

Phase 4 [Adjustment of Offloaded Data Allocation]: For each user, based on the subchannel assignment in Phase , the specific offloaded data allocation is optimized.
Before stating the algorithm, let define the offloading priority function for user at subchannel . It can be modified from the TDMA counterpart in (7) by replacing , and with , and , respectively. Let reflect the offloading priority order, which is constituted by , arranged in the descending manner, e.g., . The set of offloadingrequired users is denoted by , given as . The sets of assigned and unassigned subchannels are denoted by and , initialized as and . For each user, say user , the assigned subchannel set is represented by , initialized as . In addition, subchannel assignment indicators are set as at the beginning.
Using these definitions, the detailed control policies are elaborated as follows.
ViA1 SubChannel Reservation for OffloadingRequired Users
The purpose of this phase is to guarantee that the computation latency constraints are satisfied for all users. This can be achieved by reserving one subchannel for each offloadingrequired user as presented in Algorithm 4.
Observe that Step in the loop searches for the highest offloading priority over unassigned subchannels for the remaining offloadingrequired users ; and then allocates subchannel to user . This sequential subchannel assignment follows the descending offloading priority order. Moreover, the condition for the loop ensures that all offloadingrequired users will be allocated with one subchannel. This phase only has a complexity of since it just performs the operation for at most iterations.
ViA2 Initial Resource and Offloaded Data Allocation
This phase determines the total allocated subchannel number and offloaded data size for each user. Note that the integer constraint on subchannel allocation makes Problem P4 challenging, which requires an exhaustive search. To reduce the computation complexity, we first derive the noninteger total number of subchannels for each user as below.
Using a similar method in [26], for each user, say user , let denote its average subchannel gain, give by where gives the cardinality of unassigned subchannel set resulted from Phase . Then, the MECO OFDMA resource allocation Problem P4 is transformed into its TDMA counterpart Problem P5 as:
(P5)  
s.t.  
where are the allocated total subchannel numbers and offloaded data sizes.
Define an average offloading priority function as in (7) by replacing with . The optimal control policy, denoted by , can be directly obtained following the same method as for Theorem 1. Note that this phase only invokes the bisection search. Similar to Section VB, the computation complexity can be represented by .
ViA3 Integer SubChannel Assignment
Given the noninteger total subchannel number allocation obtained in Phase , in this phase, users are assigned with specific integer subchannels based on offloading priority order. Specifically, it includes the following two steps as in Algorithm 5.
In the first step, to guarantee that subchannels are enough for allocation, each user is allocated with subchannels. However, allocating specific subchannels to users given the rounded numbers is still hard, for which the optimal solution can be obtained using the Hungarian Algorithm [27] that has the complexity of . To further reduce the complexity, a prioritybased subchannel assignment is proposed as follows. Let denote the set of users that require subchannel assignment, which is initialized as and will be updated as in Step , by deleting the user that has been allocated with the maximum subchannels. During the loop, for users in set and available subchannels , we search for the highest offloading priority function, indexed as , and assign subchannel to user .
In the second step, all users compete for remaining subchannels since is the lowerrounding of in the first step. In particular, each unassigned subchannel in is assigned to the user with highest offloading priority. In total, the computation complexity of this phase is .