Collaborative Task Of ﬂ oading with Computation Result Reusing for Mobile Edge Computing

The task of ﬂ oading problem, which aims to balance the energy consumption and latency for Mobile Edge Computing (MEC), is still a challenging problem due to the dynamic changing system environment. To reduce energy while guaranteeing delay constraint for mobile applications, we propose an access control management architecture for 5G heterogeneous network by making full use of Base Station ’ s storage capability and reusing repetitive computational resource for tasks. For applications that rely on real-time information, we propose two algorithms to of ﬂ oad tasks with consideration of both energy ef ﬁ ciency and computation time constraint. For the ﬁ rst scenario, i.e. the rarely changing system environment, an optimal static algorithm is proposed based on dynamic programming technique to get the exact solution. For the second scenario, i.e. the frequently changing system environment, a two-stage online algorithm is proposed to adaptively obtain the current optimal solution in real time. Simulation results demonstrate that the exact algorithm in the ﬁ rst scenario runs 4 times faster than the enumeration method. In the second scenario, the proposed online algorithm can reduce the energy consumption and computation time violation rate by 16.3% and 25% in comparison with existing methods.


INTRODUCTION
Mobile applications are typically user-interactive and resource-hungry, and it requires quick response and leads to higher energy consumption.However, the general mobile devices have limited computation capabilities and battery power.Mobile Cloud Computing (MCC) [1,2] is proposed to tackle this contradiction by migrating computational tasks from mobile devices to the cloud servers.In recent years, much attention has been paid to improving the efficiency of MCC by Mobile Edge Computing (MEC) [3][4][5] and 5G networks [6][7][8].
MEC is envisioned as a promising approach with low latency, high bandwidth and computing agility [9].With the aid of MEC, mobile devices are able to offload their tasks to the MEC server on the edge of the network rather than utilizing the server in the core network.
5G network has become an important topic for the design and implementation of mobile computing, since the unprecedented increases of mobile data traffic begin to stress mobile operators' networks, weaken the communication quality and affect users' experience.As a kind of heterogeneous network, HetNet is applied to 5G network for Contents Distribution [10][11][12].In this architecture, caches are used to store contents from the cloud side as a priori.But, they cannot be directly applied to cloud computing, in which data are generated in the mobile device, transmitted to the cloud side and computed in the cloud.To the best of our knowledge, most researchers have not paid enough attention to caching computation results SECTION B: COMPUTER AND COMMUNICATIONS NETWORKS AND SYSTEMS THE COMPUTER JOURNAL, 2019 in the cloud-devices.In most existing 5G architectures for cloud computing, such as [6,7,13], caches are used to caching contents or users, and servers are used for task computation.In [9] and [14], a combination of MEC and 5G network is proposed to provide cloud-computing capabilities and an IT service environment.Task offloading policy plays a critical role in MEC, and it determines the efficiency and achievable computation performance [15].For example, joint optimization offloading decision and resource allocation methods are proposed in [16] to reduce energy consumption for delay sensitive tasks.Due to the dynamic environment in the computing system, it is hard for task offloading policy to achieve the optimal performance.System environment contains many elements, such as the network environment, the computing environment and so on.Most of the existing works concentrated on dynamic changing network environment.In the existing works, the rarely changing network is treated as a stable environment, thus they typically utilize static algorithms such as integer linear programming approach [17] and dynamic programming based method [18] to slove problems.In [19], a timeconstrained offloading policy is investigated by using a new algorithm called 'Dynamic Programming with Randomization' to get an approximate solution.For frequently changing network environment, much attention has been paid to both offline methods and online methods in recent years.Markov-decision process approaches [20][21][22] are used as offline methods.Lyapunov optimization techniques [23][24][25] and Receding Horizon methods [26] are used as the online method.
Summarizing these existing works, we obtain the fact that few works have considered the combination of MEC and 5G network, the computational reusing resource (the obtained task results) and base station's storage capability are not fully used in these network architectures.Different applications which consist of collaborative tasks from mobile devices can cooperate if there exists a duplicate computation result in the edge server.However, few works have studied the collaborative task topologies, while the dependency between tasks and the computation result reusing have significant impact to the data transmission.In addition, few works have developed an exact approach to solve the time-constrained task offloading problem, and the existing few works are relatively slow for rarely changing network environment.On the other hand, many works have considered the frequently changing network channel, but some dynamic changing elements (such as the computational reusing resource) in the system are not considered.Furthermore, offline method cannot get an energy efficiency solution in comparison to the online method, while online algorithm often leads to a large time violation rate (Time-Constraint Violation Rate).
The above weaknesses motivate us to investigate the problem of Collaborative task offloading with computation result reusing and time constraint in the dynamic changing environment of 5G network combined with MEC.As a latest development [27], multi-access edge computing is proved to scale well with the increasing number of computation tasks, as well as to reduce latency and energy consumption.In this paper, we first propose an Access Control management architecture to improve Multi-access Edge Computing presented in [14].Then, we construct a static algorithm to generate the exact solution for rarely changing system environment.Moreover, we contribute a two-stage online algorithm to reduce energy consumption and time violation rate for frequently changing system environment.
We also investigate a new type of applications which requires more real-time information to work.The new type of applications is to be widely used in real life.For example, the latest vehicle navigation need real-time weather information and transportation information to adaptively find the best path for the current location.But, to the best of our knowledge, the task offloading in this type of applications has not been investigated so far, while the existing algorithms cannot be directly used for the task offloading.In addition, the real-time information requested by this new kind of applications can only be generated on the MEC server.These pieces of information are not related to previous tasks and bring negative influence to energy and time consumption.Therefore, we construct a new computing model to further improve the performance of the new type of applications.
Our contributions are summarized as follows: • We propose a new graph model to characterize realtime downlink transmission from the edge server or the cloud to mobile devices, since real-time downlink transmission is critical for the designing of offloading policies.• Then, the problem of collaborative task offloading with consideration of reusing computation results is proposed to minimize the energy consumption under the time constraint of the new type of applications which requires real-time information to work.• For rarely changing system environment, we propose a Bellman equation with time constraint to develop an optimal algorithm based on dynamic programming technique.The proposed static algorithm is four times faster than the enumeration method in obtaining the exact solution.• For the case of frequently changing system environment, we propose an online algorithm, which can reduce both energy consumption and time violation rate.The time violation rate of proposed two-stage online algorithm can be reduced by 25% compared with a modified offline algorithm [21], the energy consumption can also be reduced by 16.3% compared with online algorithm ARHOS [28].
The rest of the paper is organized as follows.Section 2 reviews the related work.Section 3 introduces system models and problem definitions.Section 4 describes the details of our

SYSTEM MODEL AND PROBLEM DEFINITIONS
In this section, we model the computing system and formulate the time-constrained collaborative task offloading with computation result reusing problem.

System architecture
In the cell of 5G heterogeneous network equipped with MEC, there is a Macro Base Station (MBS) connected with MEC.Besides the MBS, there are some Small Base Stations (SBSs), whose service area is overlaid by that of the MBS.To reuse spectrum efficiently, both the MBS and the SBS operate in the same frequency band.The spectrum channel and the bandwidth of each channel are automatically assigned.
Inspired by Multi-access Edge Computing [14], we propose an Access Control management architecture in this paper.As shown in Fig. 1, each base station is equipped with an Access Controller (AC) [29].ACs are divided into two levels, named level S and level M, respectively, where level S connects with SBS and level M connects with MBS.Since AC has a limited storage capability, we can use it to store and manage the fingerprints [30] (a kind of ID for tasks) of the computed tasks' results.Between a SBS and a MBS, there is a wired backhaul which relays the transmission from the SBS to the MBS.AC at level S can manage many ACs at level M with communication using wired backhaul.We ignore the time consumption of data transmission through wired backhaul since it can transmit a small amount of data very quickly.
Fingerprints are integers generated by a one-way function [31] applied to a set of bytes.In this paper, we use fingerprints as pointers into the MEC server to find repeated tasks.We store representative fingerprints with efficient indexes that map a fingerprint to the region which describes a cached packet payload.If the fingerprint is stored on an AC, the corresponding computed results of certain tasks will be stored on MEC server and the results could potential be reused in future by other tasks.If the corresponding fingerprint is stored on an AC (i.e.tasks' results can be reused), we will download the result directly for further computation.This task's result reusing process is called as 'computation result reusing' in this paper.
In this paper, we mainly focus on task offloading.However, how to manage computation result reusing is one of the significant problems.Since it is out the scope of this work, we next provide a brief description for the management of computation result reusing in this paragraph.Since the fingerprint in AC is mapped to the reusable task's result, computation result reusing is controlled by managing and storing fingerprints.Due to the limited storage capacity of an AC, we need to efficiently manage and store fingerprints.Therefore, ACs are divided into two levels to management.AC at level M manages the whole area of the cell, while AC at level S just manages the local area in the cell.For fingerprint management, we first rank the request frequency of tasks on SBS in descending order and store the fingerprints on AC at level S by the ranking order.Then, for the rest of tasks that do not store their fingerprints on AC in level S, we rank the request frequency of them on MBS in descending order, and store the fingerprints on AC at level M by the ranking order.In this way, local space storage utility is managed by AC at level S and the whole space storage utility is managed by AC at level M. If fingerprints are not managed in these two levels, the local and the whole utility will be unbalanced.For example, when information of computing results is just stored and managed by SBS, some high ranked tasks' computing result in the whole area (managed by MBS) cannot be reused if they don't have high rank in each locality area managed by SBS.
Since the data size of the fingerprint is very small, the energy consumption and time overhead for sending requests to the AC can be ignored [29].When a mobile device chooses to compute its task by the MEC server, it sends a request to AC to check whether the corresponding fingerprint has been stored.If the result has been stored, the results will be directly sent to the mobile device instead of being transmitted and computed again.In this way, the time consumption and energy consumption for task transmitting and recomputing can be saved.At the same time, the transmission stress of base station can be released.If the result has not been stored, the computation task will be sent to the MEC server for execution.In [32], a cooperative multi-agent sequential decision model (MA-RDPG) is proposed to share the centralized learning results with private agents to guarantee the globally optimal performance of the entire system.This model achieves remarkable performance with online settings on a large Ecommerce platform with applications such as retrieval, advertising and recommendation.We apply MA-RDPG scheme to our proposed access control management architecture to enable knowledge (results) reuse to improve system performance.For example, we can deploy the access control management architecture in the problem of guiding the tourism travel route in a scenic spot.Tourist with a mobile device is treated as an agent (actor), and agents collaborate with each other by sharing a global action-value function on the MEC as the critic.By centralized learning on the MEC, tourists make their private visit strategies on their mobile devices.When the results of global action-value functions (corresponding to specific visiting demands) can be found on MEC, these results are reusable to reduce energy consumption and time delay for each mobile device.
In this paper, we focus on a stochastic network environment since the dynamic changing transmission rate of data will significantly impact offloading decisions [33,34].We use the Gilbert-Elliott channel [34,35] to model the communication link because it is used to refer to the wide class of finite-state fading channels.This channel model is a Markov chain with two states: good (denoted by g) or bad (denoted by b).If the channel is good, data are transmitted at a high rate g ( ) g .Otherwise, it sends data at a low rate g ( ) b [36].The transition between the two channel states occurs in discrete time instants so that the channel is assumed to stay in a given state over a single unit of time.Let g = g n , if the channel is good during the n-th time unit; and g = b n , otherwise.Hence, the state transition matrix of the channels Pr is given by [34] Pr Pr Pr Pr If applications upload data and download data with different channels, previous works are not available.So, in this paper, we solve problems by separately modeling data uploading channel and data downloading channel.Let Pr up and Pr down be the state transition matrix of data uploading and downloading channels, respectively.Let g up and g down be the state of data uploading and downloading channels, respectively.
Unlike the existing work [34] where a VIA-based algorithm is proposed to minimize energy consumption, we propose a computing model with consideration of computation result reusing and real-time data in the downlink transmission.A static algorithm with time constraint is proposed based on dynamic programming.Moreover, we contribute an online algorithm to reduce energy consumption and time violation rate.

Computing model
A new type of applications that request the real-time information to compute is taken into consideration in this paper.First, applications could be represented by many kinds of topologies (sequential, mesh, tree, general, etc).But, they can be transferred to the sequential topology by critical path based methods, such as [37].For general techniques on other topologies, see [38].In order to model a relevant task graph, without loss of generality, this paper concentrate on sequential topology whose algorithms can be adapted to other topologies.Then, some tasks cannot be offloaded to remote servers [39], such as sensing tasks.But, in a collaborative sequential task topology, local execution only tasks could be treated as initial or terminal tasks.For general research, we just explore a sequential topology segment.And, only the initial and terminal tasks are fixed on the mobile device.Furthermore, the collaborative tasks are executed sequentially, and the output of a task will be taken as input by its following task.However, in order to ensure the real-time services, some tasks need some data obtained from the remote cloud.Those cloud-side data, such as traffic information and weather conditions, are dynamically acquired.Since these pieces of real-time information can only be generated on the cloud, normal topologies are not suitable to present this new kind of applications.So, we model a new task graph, as shown in Fig. 2.
is the set of tasks and A is the set of arcs.The number of computation tasks in G is = | | n V .In addition, two dummy nodes, v 0 and + v n 1 , are added into the graph to denote the initialization and termination of the application.The parametric context of each task is defined as a tuple w = ( ) v y d , , indicates that the result of v i is stored on the cloud and it can be reused, = y 0 i indicates that the result of v i cannot be reused, w i is the computation workload of the ith task, and d i is the size of the data, which is transmitted between the cloud-side and task to indicate the data dependency that task v j cannot start before the completion of its parent task v i .And b ij is used to store the output data size from task v i to task v j .
Computation overhead of a task depends on its executive decision and whether its result has been computed and stored on the server.Notation = x 1 i indicates that task v i is exe- cuted on the cloud side, and = x 0 i otherwise.We also define = 1 as the offloading policy.As the initialization and the termination of the application must be executed on the mobile device, we have , task v i is executed on the mobile device and the time consumption should be determined by mobile computing capability.
We denote as the computation time and the energy consumption of task v i with respect to x i and y i .Formally, where f m and f c are the computing ability for one CPU cycle of the mobile device and the edge server, respectively.And, energy consumption on the mobile device for the execution of task i is given by where p m and p idle are the energy consumption power of the mobile device in computation and the idle state, respectively.Communication cost between tasks depends on where tasks are hosted, data transmission rate as well as whether tasks have been computed and stored on the cloud. Let be the required communication time between task v i and task v j .Formally, when Î a A ij , the communication time between task v i and task v j can be calculated as where r is the data transmission rate.
Then, we denote as the communication energy on the mobile device for data transmission between task v i and task v j , which is given by where p up and p down are the power rate of the mobile device for sending and receiving data, respectively.

Problem formulation
Based on the above-discussed models, the overall energy consumption on mobile device, denoted as ( ) E X , is calculated as the sum of energy consumption on task execution as well as data transmission å å T X be the time consumption of the application.it can be formally calculated as Based on the above discussion, the offloading problem can be formulated as follows: The objective is to minimize the value of energy consumption.C 1 is the constraint indicating that the running time of application should be no more than time deadline t d , where t d is a priori knowledge that presents the maximum time which users could endure for the given application.C 2 is the binary constraint for the offloading policy, where = 1 and any task in the application can only be implemented on either the mobile device or MEC server.C 3 is the constraint indicating that whether tasks in the application could reuse their results which have been computed and stored on MEC server.
It is worthwhile to point out that the problem discussed in this subsection is NP-hard.This is because, the problem is identical to 0-1 knapsack problem if the time constraint and computation result reusing are omitted.Noting that 0-1 knapsack problem is NP-hard [40], we conclude that the problem in this subsection is also NP-hard.

PROPOSED ALGORITHM
In this section, we tend to solve offloading problems under two different kinds of system environment: rarely changing system environment and frequently changing system environment.For rarely changing system environment, a static algorithm is developed to get the exact optimal solution.For frequently changing system environment, static algorithms are not able to get good performance.So, we design a fast two-stage online algorithm to adapt to the evolving environment elements (such as the communication channel) and continuously updated computation results for reusing.

Optimal static algorithm
In this subsection, we aim to provide an exact optimal method that suitable to the rarely changing system environment.So, dynamic programming method is considered to provide good performance.In order to solve the problem optimally, we build a new dynamic programming algorithm STA with time constraint rather than executing enumeration method to get exact solution.
Firstly, let - t x x i , i i 1 be the sum of execution time of task v i and data transmission time between - v i 1 and v i .If both task v i and task - v i 1 run on cloud or both of them run on the mobile device, - t x x i , is the computing time of task v i ; otherwise, the data transmission time between task v i and task - v i 1 should be considered.The expression of - t x x i , Then, let be the value of execution cost of task v i and communication cost between - v i 1 and 9 Next, let ( ) OPT i x t , , i be the optimal value of the tradeoff function for the first + i 1 tasks with time consumption t. x i indicates offloading decision of task v i . ( In this paper, we propose an STA Bellman's equation with time constraint, which is an extension of the well-known shortest path algorithm of Ford and Bellman [41].The STA Bellman's equation can be formulated as follows: 10 As t d is the QoE factor and given by user's demand, we can know the accuracy of time consumption deadline and the smallest time unit t s (for example, if t d is 1.20 s, t s is set as 0.01 s.). is calculated for the backtracking.Then, the optimal value is calculated with backtracking.Finally, we obtain the offloading policy X.
Given n tasks and possible decision epoch number t a , the nested for-loops runs in ( ) O nt a time, which dominates the computing time of algorithm STA.Output: X /* initialize the first task*/ 1: for t = 0 to t a do 2: ( )= OPT t 0,0, 0, ( ) = ¥ OPT t 0,1, .3: end for /* calculate other tasks */ 4: for i = 1 to n do 5: for t = 0 to t a do 6: Set according to Eq. ( 8) and (9).7: Set ( ) OPT i x t , , i according to Eq. ( 10).8:

Online algorithm
In this subsection, we aim to provide an online algorithm to adapt to the frequently changing system environment.Then, a two-stage online algorithm is designed to minimize energy consumption under the time constraint.In the offline stage, using Markov-decision process, we get the expected optimal cost from the current time to the end of the application.In the online stage, with the current network situation, the current computation reusing situation and the current time consumption, we can get a real-time task offloading policy which minimizes not only the energy consumption but also the delay constraint violation probability.In this paper, we ignore the related overheads which are generated by monitoring the system state information, as previous work [28] did.

Offline stage
In the offline stage, we build a Markov Decision Model for the above offloading problem.But, our offline stage algorithm is different from other Markov-Decision-based algorithms, such as [20][21][22].First, with our new network architecture, we should take repetition probability of task results (i.e.dynamic changing caching results) into consideration.Then, since data uploading and downloading have huge different transmission rates and use different channels in the cellular network (5G), the channel state is subdivided as upload channel state and download channel state.Third, previous algorithms [20][21][22] always get a static offloading policy.Here, instead of static policy, we record the expected optimal decision tables for every state and use it for an online policy in the next stage (online stage).We consider a finite horizon discrete time problem, where decisions are made at the beginning of a stage.Each stage is formed based on the number of tasks in the application.The decision epoch represents a point of time for the decision at the beginning of a stage.We represent the decision epoch as 1, where decision epoch Î t T indicates that task v t has already been executed.
The decision maker (i.e.offline algorithm) chooses an action based on the system state information, denoted by S. Each state Î s S is characterized by the combination of the channel states and the execution location of a task.The system state at decision epoch t is defined as , where g t up and g t down denote the upload and download channel states for the next epoch between the mobile and offloading sites (i.e.either g or b).Because the initial channel state is assumed to be good and the executions start and end at the mobile device, the initial and final system states are given as   Dynamic caching computation result is considered in this subsection.According to [10] be repetition probability of task's result (resource reusing possibility), where p i is the probability that the result of task i can be reused.If we assume the transition of a state occurs from s t to + s t 1 , then the expected cost function C is calculated as in Eq. ( 12), where C E denotes the expected energy cost function and C T denotes the expected time cost function.
In  13) and ( 14): This algorithm uses traversal to get expected optimal cost from each state to the terminal decision epoch, which can be viewed as a forward process of dynamic programming.The time complexity of OCT is ( ) O nk 2 and the space complexity of OCT is ( ) O nk , where n is the number of the nodes and k is the number of the system states.

Online stage
In order to adaptively solve this problem with a dynamic changing system environment, an online algorithm GRP is developed using the set of expected optimal cost tables  which have been calculated in the offline stage, as shown in Algorithm 3.
Based on A* algorithm [42], at each iteration of online decision epoch, the optimal offloading policy is selected to minimize where v t is the current task to get the offloading decision, ( ) is obtained using (5), and ( ) V s E t is the expected optimal energy cost from current task to the terminal.
Since there exists delay constraint, at each iteration of online decision epoch, the optimal policy is selected to satisfy where ( ) is obtained using (4), ( ) V s T t is the expected optimal time consumption from current task to the terminal, T current is the time consumption from beginning till current offloading epoch, and t d is the delay constraint of the application.
Using this online algorithm GRP, the optimal offloading policy can be obtained for the current task under current system environment.

NUMERIAL ANALYSIS
In this section, we evaluate the performance of our proposed algorithms in various situations.

Parameters for devices and applications
We evaluate the performance of the proposed algorithm on Matlab.Detail notations are shown in Table 1 and adapted in our simulation as in [39].
In this paper, we concentrate on sequential task topology.Computation workload and data transmission between tasks are set based on [20,21].To better reflect real-world scenarios, the size of the data is obtained based on the measurement of the real-time weather information API [43], indoor/ outdoor map information API [44] and transportation information API [45].We randomly generate applications' task graph based on the following parameters: . 2: for k = n to 0 do 3: for each state Î s S k do 4: for Î { } a 0,1 k according to Eq. ( 14).6: end for 7: Get ( ) V s k k according to Eq. ( 13).8: end for 9: end for 10: Return .  ( -) ) using Eq. ( 5).7: end for

Performance of rapid static algorithm
The rapid static algorithm is proposed with rarely changing system environment.In this subsection, assuming the environment is static, we evaluate the running speed of the rapid static algorithm and explore whether the algorithm is suitable to the proposed Access Control management architecture.

4.2.1.
Running speed with different time constraint and task scale First, the rapid static algorithm is a kind of dynamic programming algorithm that always gets the exact optimal solution.So, the offloading performance of this algorithm is known as the optimal and it is not tested in this simulation.Then, we simulate and compare the computation speed between enumeration method and algorithm STA, since the offloading problem with a time constraint is not convex and no exact solution is delivered without enumeration method.
Assuming that the total time consumption of all tasks running on the mobile device is t, we compare the enumeration method and the algorithm STA with time constraint t, 0.9t and 0.8t in terms of the computation time.As shown in Fig. 3(a), time constraint does not have a significant impact on the running speed.In general, algorithm STA runs more than four times faster than the enumeration method.However, the running time of the two algorithms changes with the scale of task graph, as shown in Fig. 3(b).As a result, our proposed algorithm STA achieves much better improvement when the number of tasks increases.

Offloading performance with different communication
rates and different PTR Since the environment is assumed as static, y i is taken as a priori in the modeling process.In the simulation, we randomly generate y i during each repetitive experiment.In order to evaluate the impact of resource reusing to task offloading, we randomly chose different percentages of tasks whose results have been stored on MEC server (PTR).For simulation, the PTR is set to 0, 10%, 20%, 30%, respectively, and the communication rate ranges from 20 kb/s to 100 kb/s.When giving PTR as r and the total number of tasks as n, we randomly select rn tasks whose task results have already been stored on MEC server.As shown in Fig. 4, we observe that the objective function value decreases with the increasing communication rate and the energy consumption decreases when PTR increase.

Performance of two-stage online algorithm
In order to evaluate the performance of the proposed algorithms in frequently changing environment, we set four fading channels with different state transfer probability and different resource reusing possibilities.Parameters of the network environment are shown in Table 2.In this paper, the state transition rates in Table 2 are set from 0.7 to 1, while Pr gg is

Offloading performance with different repetition possibilities of task's results
In order to measure the performance of our proposed architecture while eliminating the influence of the dynamic network, we compare the average energy consumption with the static network environment (fading channel C 1 ) and different resource reusing possibilities.Without loss of generality, all tasks' results are set with the same repetition possibilities which are varying from 0 to 0.3, and y i is randomly generated for each time slot under the constraint of repetition possibility.
Due to the application's inscape, two kinds of delay constraints are used, as shown in Fig. 5.When delay constraint is larger than 0.38 s, the offloading policy remains {1, 1, 1, 1, 1}; when delay constraint is between 0.21 s and 0.37 s, the offloading policy remains {0, 1, 1, 1, 1}.We can see that, with resource reusing possibility increasing, the energy consumption is smaller for any kind of delay constraint.This demonstrates the efficiency of our proposed Access Control management architecture.When delay constraint is larger than 0.38 s, the energy consumption changes more slowly compared with delay constraint between 0.21 s and 0.37 s.

Offloading performance with different fading channels
In order to measure the performance of the proposed online algorithm GRP, we compare the average energy consumption with different kinds of fading channel ( ) 4 and a fixed repetition possibility of tasks' result (every repetition possibility of tasks' results is set as 0.1).The baseline policies are the offline policy produced by exhaustive enumeration with static system environment and the online policy produced by the online algorithm ARHOS [28].
As shown in Fig. 6, we can see that, with channel state more frequently changed, the average energy consumption of both the baseline policies and the proposed online policy becomes larger.This indicates that the frequency change of channel states has negative influence to the energy consumption.GRP's policy is more efficient than the baseline policies.
When the fading channel is static, GRP performances better  than offline method (exhaustive enumeration), since GRP can get the optimal solution for current state using OCT and more flexible with dynamic changing repetition possibility of tasks' results.When fading channel changes more frequently (C 3 and C 4 ), online algorithms performance much better than off- line method (exhaustive enumeration), and GRP performances better than online algorithm ARHOS.For fading channel C 4 , nearly 34% of energy consumption is saved compared with the offline method (exhaustive enumeration) and 16.3% of energy consumption is saved compared with online algorithm ARHOS.

Time violation rate with different delay constraints
Time violation means that the real-time consumption of the policy violates the given delay constraint, and it can affects users' experience significantly.In the test, resource reusing possibility (repetition possibility of tasks' result) is fixed as 0.1, network environment is fixed as C 2 and delay constraint is set between the time consumptions that all tasks are running on cloud side and on the mobile device.Then, we evaluate time violation rates with different delay constraints.
In this subsection, we use MDM to indicate baseline algorithm [21].When time violation rate is no more than 0.25 with Gilbert-Elliott model for MDM, no policy can satisfy the delay constraint.But, since our Access Control management architecture can save more time and energy consumption, it is not fair to directly compare with [21].So we adapt MDM with our new architecture that can reuse computational resource, and named it as MDM-NEW.As shown in Fig. 7, when delay constraint is 0.4, 52% of time violation rate is reduced by MDM-NEW compared with MDM.
Our online algorithm GRP has smaller time violation rates than MDM-NEW.When delay constraint is 0.4, 25% of time violation rate is reduced compared with MDM-NEW.That is because our online algorithm GRP can dynamically choose a suitable policy to satisfy the delay constraint.

CONCLUSION
In this paper, we have proposed an architecture of access controller management for 5 G heterogeneous network, by making full use of Base Station's storage capability and reusing repetitive task computation.The architecture can reduce both energy and time consumption for mobile applications.Then, a collaborative task graph with real-time computational information was proposed which supports energy efficient offloading policy while satisfies the time constraint.Two algorithms have been proposed for determining offloading under two different scenarios, i.e. rarely changing system environment and frequently changing system environment, respectively.For rarely changing system environment, an optimal static algorithm runs more than four times faster than enumeration method.For frequently changing system environment, proposed algorithm can save 16.3% energy compared with algorithm ARHOS and reduce the time violation rate by 25% compared with a modified offline algorithm.In the future, we will investigate the effect of the management of computation results reusing.

3
COLLABORATIVE TASK OFFLOADING WITH COMPUTATION RESULT REUSING FOR MOBILE EDGE COMPUTING SECTION B: COMPUTER AND COMMUNICATIONS NETWORKS AND SYSTEMS THE COMPUTER JOURNAL, 2019

5
COLLABORATIVE TASK OFFLOADING WITH COMPUTATION RESULT REUSING FOR MOBILE EDGE COMPUTING SECTION B: COMPUTER AND COMMUNICATIONS NETWORKS AND SYSTEMS THE COMPUTER JOURNAL, 2019

FIGURE 4 .
FIGURE 4. Impact of PTR and communication rate for static algorithm STA.

FUNDING
This work was supported by the National Key R&D Program of China under Grant no.2018YFB1003201, and Guangdong Key R&D Program of China under Grant no.2018B010107003.It was also supported in part by the National Natural Science Foundation of China under Grant nos.61702115 and 61672171, by the Major Research Project of Guangdong Province under Grant nos.2016KZDXM052 and 2018B030311007.

FIGURE 6 .
FIGURE 6.Energy consumption with different fading channels.
Downloaded from https://academic.oup.com/comjnl/advance-article-abstract/doi/10.1093/comjnl/bxz027/5462515 by University of Melbourne Library user on 20 April 2019 4 Z .Z HANG et al.SECTION B: COMPUTER AND COMMUNICATIONS NETWORKS AND SYSTEMS THE COMPUTER JOURNAL, 2019 Given the current state, the decision maker can choose two major actions, offloading task to cloud side or continuing execution on mobile device.Based on the chosen action a t in state s t at decision epoch t, the state transition probability function for the next state + s t 1 is given by [ | ] + Pr s s a , ) and (14) iteratively, we can get the set of expected optimal cost tables (denote as ) from any state to 7 COLLABORATIVE TASK OFFLOADING WITH COMPUTATION RESULT REUSING FOR MOBILE EDGE COMPUTING SECTION B: COMPUTER AND COMMUNICATIONS NETWORKS AND SYSTEMS THE COMPUTER JOURNAL, 2019 Downloaded from https://academic.oup.com/comjnl/advance-article-abstract/doi/10.1093/comjnl/bxz027/5462515 by University of Melbourne Library user on 20 April 2019the terminal decision epoch based on the dynamic programming method.There exist two kinds of expected optimal cost tables in the set , i.e. expected optimal energy cost table Algorithm 3 GRP/*online stage to get real-time policy*/ ,

TABLE 1 .
Parameters of machine profile.
SECTION B: COMPUTER AND COMMUNICATIONS NETWORKS AND SYSTEMSTHE COMPUTER JOURNAL, 2019