Socially Aware Dynamic Computation Offloading Scheme for Fog Computing System With Energy Harvesting Devices

Fog computing is considered as a promising technology to meet the ever-increasing computation requests from a wide variety of mobile applications. By offloading the computation-intensive requests to the fog node or the central cloud, the performance of the applications, such as energy consumption and delay, are able to be significantly enhanced. Meanwhile, utilizing the recent advances of social network and energy harvesting (EH) techniques, the system performance could be further improved. In this paper, we take the social relationships of the EH mobile devices (MDs) into the design of computational offloading scheme in fog computing. With the objective to minimize the social group execution cost, we advocate game theoretic approach and propose a dynamic computation offloading scheme designing the offloading process in fog computing system with EH MDs. Different queue models are applied to model the energy cost and delay performance. It can be seen that the proposed problem can be formulated as a generalized Nash equilibrium problem (GNEP) and we can use exponential penalty function method to transform the original GNEP into a classical Nash equilibrium problem and address it with semi-smooth Newton method with Armijo line search. The simulation results demonstrate the effectiveness of the proposed scheme.

Abstract-Fog computing is considered as a promising technology to meet the ever-increasing computation requests from a wide variety of mobile applications.By offloading the computationintensive requests to the fog node or the central cloud, the performance of the applications, such as energy consumption and delay, are able to be significantly enhanced.Meanwhile, utilizing the recent advances of social network and energy harvesting (EH) techniques, the system performance could be further improved.In this paper, we take the social relationships of the EH mobile devices (MDs) into the design of computational offloading scheme in fog computing.With the objective to minimize the social group execution cost, we advocate game theoretic approach and propose a dynamic computation offloading scheme designing the offloading process in fog computing system with EH MDs.Different queue models are applied to model the energy cost and delay performance.It can be seen that the proposed problem can be formulated as a generalized Nash equilibrium problem (GNEP) and we can use exponential penalty function method to transform the original GNEP into a classical Nash equilibrium problem and address it with semi-smooth Newton method with Armijo line search.The simulation results demonstrate the effectiveness of the proposed scheme.

A. Background and Motivation
M OBILE device (MD) has become an indispensable part of our daily life as they can provide convenient communication almost anytime and anywhere.The mobile application markets are also triggered by the advanced mobile technologies and high data rate wireless networks.However, due to the resource and battery life restrictions, the gap between the limited computing capability and demand for executing complex applications is gradually increasing.Many computationalintensive and latency-sensitive mobile applications have poor L. Liu and X. Guo are with the College of Information Science and Engineering, Yanshan University, Qinhuangdao 066004, China (e-mail: liuliqing_yanyan@163.com; xjguo@ysu.edu.cn).
performance when they are performed on smart phones, such as image processing, chess gaming, etc [1].
Recent study shows that mobile cloud computing (MCC) technology provides a promising opportunity to overcome the limitation of hardware and save energy for MDs by offloading the computational-intensive tasks to the cloud for execution [2].To date, several types of mobile cloud architectures are categorized [3], such as the traditional central cloud, ad hoc mobile cloud, cloudlet, etc.The traditional central cloud can provide huge storage, high computation power, as well as reliable security.However, it is worth mentioning that the traditional central cloud is usually remotely located and far away from their users, thus long latency may be incurred.Therefore, in some cases, the distant cloud may not be desirable for latency-sensitive mobile applications [2].To overcome these problems, fog computing, also known as "cloud at the edge," emerges as an alternative proximity solution to provide pervasive and agile computation services for the MDs and support future cloud services and applications, especially to the Internet-of-Things applications with strict requirement of latency and high resilience [4].Fog computing can provide computing resources at the edge of radio access networks.The idea of using fog computing brings both computational and radio resource more closer to the MDs, thus improving scalability in both computation and radio aspects [5], [6].However, it can be noticed that the computational resource in the fog cannot be treated as sufficiently as the traditional central cloud, as it is usually targeted to serve a smaller portion of users [6].
Although computation offloading is an effective solution for resource-limited MDs to use the powerful computational resources at cloud servers.But for conventional batterypowered MDs, the computation performance may be discounted due to lack of sufficient battery energy, i.e., the being executed applications have to be terminated when the battery energy is exhausted.Certainly, this can possibly be solved by increasing the battery capacity or recharging the batteries from time to time.However, due to the restrictions of the MDs on size, weight, location, ergonomics, heat dissipation, and so on, frequent recharging is hard to be realized in many cases.Energy harvesting (EH) is seen as a promising and green technology to resolve these issues, which can enables the MDs to harvest energy from multiple aspects [7], [8], such as from environmental energy sources such as wind energy and solar, from human motion, and from ambient radio signals, e.g., RF EH.The harvested energy can be used for locally operation, task execution, and request offloading.With EH, the battery time of the MDs can be extended, and self-sustaining can be achieved [9]- [11].
It can be observed that most of related work mainly focus on the case where each mobile user is self-interested and aims to minimize its own cost [2], [12], [13].However, recent investigations on social networks show that there is a strong connection between the user social relations and its behavior [14]- [19].Due to the existence of social relationships, it is natural that the mobile user not only cares about his own utility, but also pay attention to the utility of his neighbors with social relations, such as families, friends, etc.Such a observation motivates us to exploit the social ties among mobile users to achieve mutually beneficial computation offloading decision-making and correspondingly, improve the system-level performance.

B. Contribution
In this paper, we consider the MDs are with EH capabilities and are interested in offloading the computation task to the fog node.Considering the aforementioned aspects, in this paper, we aim to take the social relationships of the mobile users into the design of computation offloading scheme.With the objective to minimize the social group execution cost, we advocate game theoretic approach and propose a dynamic computation offloading scheme.More specifically, our major contributions are summarized as follows.
1) In the considered system, with the objective to minimize the social group execution cost, we propose a socially aware dynamic computation offloading algorithm with the consideration of EH devices.Game theory is employed to model the interactions within the group.2) In particular, different queue models are applied to derive the delay performance during the offloading process in our model.The requests generated from each MD are assumed to follow Poisson process.The requests process queue at the MD is considered as a M/M/1 queue, the one in the fog is considered as a M/G/1 queue, and the one at the central cloud is considered as a M/G/∞ queue, which is consistent with common sense and sparely studied in the previous work about MCC.
3) The algorithm to solve the proposed generalized Nash equilibrium problem (GNEP) is novel.First, we use exponential penalty function method to penalize the coupling constraints and transform the original GNEP into a classical NEP.Second, we formulate the Karush-Kuhn-Tucker (KKT) conditions for the smoothing penalized NEPs into a system of nonsmooth equations, and then apply the semi-smooth Newton method with Armijo line search to solve the system.The proposed one can reduce the accumulated error and improve the calculation accuracy during iteration process effectively.4) Extensive simulations are conducted to evaluate the effectiveness of the presented scheme.It is shown that our scheme can find the optimal decision strategy at a certain request arrival rate at each time slot for each MD, and obtain the minimum value of average social group execution cost.

C. Organization
The reminder of this paper is organized as follows.We first briefly overview the related works in Section II.In Section III, the system model is introduced and the problem is formulated in Section IV.In Section V, we propose a semi-smooth Newton method to solve the formulated problem.The simulation results are presented and discussed in Section VI, and finally, we conclude this paper in Section VII.

II. RELATED WORK
Most of the papers in MCC focus on designing different and effective offloading schemes for the resource-limited MDs to offload the computation to the central cloud.Zhang et al. [12] investigated collaborative task execution problem for mobile applications.The authors aim to minimize the energy consumption on the MD while meeting a time deadline, by strategically offloading tasks to the cloud.Zhang et al. [13] proposed a theoretical framework of energy-optimal MCC under stochastic wireless channel.Deng et al. [2] considered a mobile computation offloading problem where multiple mobile services in workflows can be invoked to fulfill their complex requirements and the decisions can be made on whether the services of a workflow should be offloaded.
Meanwhile, fog computing is a new concept emerged in recent years and provides pervasive and agile computation augmenting services for the MDs with short delay [4]- [6].Deng et al. [5] studied the multiuser computation offloading problem for fog computing in a multichannel wireless interference environment.Sardellitti et al. [6] considered an MIMO multicell fog computing system where multiple mobile users ask for computation offloading to a fog cloud server.The authors formulate the offloading problem as the joint optimization of the radio resources and computational resources to minimize the overall users' energy consumption, while meeting latency constraints.
EH is integrated with communication systems to enable its ability of obtaining energy efficient communications and self-sustainable [7]- [11].Realizing the EH in cloud computing and cellular network is an emerging technique to enhance the sustain-ability of battery-powered network elements and has attracted great attention from the research community.For example, Mao et al. [9] investigated a green mobile edge cloud computing system with EH devices and develop a Lyapunov optimization-based dynamic computation offloading algorithm, which jointly decides the offloading decision, the CPU-cycle frequencies for mobile execution, and the transmit power for computation offloading.Yang et al. [11] proposed a D2D communication heterogeneous cellular network based on EH, where mobile user equipments harvest energy from the base station (BS) or the access point and use the harvested energy for D2D communication.Meanwhile, social networks and their applications have been explored in the design of wireless networks.The concept of the user social pattern has been characterized in long term evolution-advanced heterogeneous networks to enhance the energy efficiency and network spectrum.For mobile networking, exploiting mobile users' social relationship turn out to be a new field for network optimization and design [16], [17].For example, Zhang et al. [16] studied a social-aware approach for optimizing throughput of D2D communication by exploiting the information from both social network layer and the physical wireless network layer.

III. SYSTEM MODEL
As shown in Fig. 1, the system consists of N MDs with social relations, fog node, and a control cloud.All the MDs are equipped with EH capabilities.The harvested energy can be stored in the battery and used for local execution or data transmission.Each MD executes an application and generates a series of homogeneous service requests which are independent of each other.Each MD contains one processor, a single server first-in-first-out (FIFO) queue to store arriving requests pending for execution, and the wireless interfaces to connect wireless network.The fog node is deployed to release the load on central cloud and bring low service latency to the nearby users.In this paper, we apply queueing theory to model the service latency.Queuing theory has been widely used in the analysis of resource contention in the communication and computing systems, and it is a natural candidate to capture the main features of our systems.In our system, the process queue at the MD is considered as a M/M/1 queue, which amounts to assimilate the task arrival process to a Poisson process.The fog node comprises multiple servers, and with a dispatcher that can uniformly distribute the arrival data among the servers.Correspondingly, the queue model of fog node is considered as a M/G/1 queue [21].The central cloud hosts infinite servers in the remote data centers, with no contention among different users, and we model the process as a M/G/∞ queue.We assume that the time is slotted and the length of each time slot is τ .We also denote the time slot and the time slot index set by t and T = {0, 1, . . ., t, . . ., T − 1}.
We assume that the requests generated from MD i, i ∈ N , N = {1, 2, . . ., N} follow a Poisson process with an average arrival rate of λ i,t at each time slot t [20].The requests are assume to be delay sensitive, mutually independent.Each request generating from the MD i contains a data size of θ i .Each computation request can be executed locally at the MD, or be offloaded to the fog or the central cloud.In addition, none of the above three computation modes may happen, e.g., when the MD does not have sufficient energy, some generated computation requests have to be dropped.The generated requests can be allocated to the local processor, the fog and the central cloud, or even dropped out in parallel at the beginning of the next time slot.So throughout this paper, "at time slot t" means the requests are generated at time slot t but executed at time slot t + 1.The decision of MD i at time slot t is modeled as a triple ) at each time slot t.The MDs compete for the computing resource in the fog in order to minimize their execution cost.They are allowed to make their own strategies without a central authority but can obtain information from a cloud controller.Game theory is employed to model this interaction, where the MDs play with the obtained information from the cloud controller, until they reach a stable state, i.e., a Nash equilibrium.For ease of reference, we list all the key notations used in our system model in Table I.

A. Local Execution Model
Let u M i denotes the computing capability of MD i, which is determined by the intrinsic nature of the MD, i.e., CPU cycle.Different MDs may have different computing capability.Additionally, we assume that l M i,t denotes the normalized workload on the MD i at time slot t, which represents the percentages of CPU that have been occupied.l M i,t = 0 indicates that the CPU is totally idle at time slot t.When considering a M/M/1 queue, the response time of a M/M/1 queue is R = [(1/u)/(1 − ρ)] [22], where ρ = (λ/u) is the queue utilization, λ is the arrival rate, u is the service rate.Accordingly, the average response time T M i,t (p M i,t ) for locally processing requests at MD i is expressed as follows: . ( Assume that the number of CPU cycles needed for computing 1-bit of input data locally is x i and the energy consumption per cycle is κ i for MD i.Then the expression x i κ i is the per bit computing energy consumption for MD i. x i and κ i are related to the intrinsic nature of the CPU and the complexity of the requests for each MD.Then the energy consumption ) of local executing the requests for MD i can be given as follows:

B. Fog Execution Model
MD i transmits the data to the fog through a BS at the beginning of the time slot with rational considerations.The wireless channel is assumed to be independent and identically distributed (i.i.d) block fading, i.e., the channel remains static within each time slot, but varies from one to another.Considering the mutual interference caused by other MDs in the system and the nonignorable background interference, we can obtain the uplink transmission rate for computation offloading of MD i at time slot t as follows [5]: where W is the channel bandwidth, q i,t is the transmission power of the MD i at time slot t, g BS i,t is the channel gain between the MD i and BS at time slot t, ω i,t is the background noise interference received by MD i at time slot t.
From (3), we can then obtain the uplink transmission time T UP i,t of MD i for offloading the data to BS as follows: Then, the energy consumption of uplink transmission ) can be given as follows: w i,t + j∈N,j =i q j,t g BS j,t . ( The fog node is located at the BS and connects to the BS through fiber with large enough bandwidth, so we just neglect the transmission time from the BS to fog node.Accordingly, we assume that there are c homogeneous servers deployed in the fog, and the service rate of each server is denoted as u F .The requests from different MDs in the system are pooled together with a total rate λ total,t at time slot t which also follows Poisson process.Therefore, λ total,t is given as follows: Correspondingly, we assume that the workload of the fog node is denoted as l F t (0 < l F t < 1), which is the average occupied percentage of each server at time slot t.As a M/G/1 queue is considered at the fog node, the average response time at the fog as follows [21], [23]: After the execution is done at the fog node, the results will be delivered to the MDs.And we neglect the time and energy consumption for the MDs to receive the processed requests outcome, due to the fact that for many applications, for example, the face recognition, the size of the computation output in general is much smaller than the size of computation input data [5], [7].

C. Cloud Execution Model
Additionally, we assume that there is a fixed delay T FC for sending the requests to the central cloud through the fog.As the central cloud has sufficient computing resources to process these requests, the queuing time of the requests in the central cloud can be negligible.The queue model at the central cloud is considered as M/G/∞ with the service rate u C , which is usually faster than the fog service rate u F .Then, the response time T C,t (p C i,t ) of the requests offloaded to the central cloud can be presented as follows: When the execution at central cloud is done, the results will be delivered to fog and then delivered to the MDs.Similarly, the time and energy consumption for receiving the results for MDs can be neglected.

D. EH Model
A successive energy packet arrival model is used to model the EH process.We assume that the arrival of energy packet also follows a Poisson process with an average arrival rate e i,t , and e i,t ≤ e th i,t , we assume that e th i,t is the maximum energy arrival rate, and it is i.i.d in different time slots.The arrived energy will be harvested and stored in the battery, and used for either local execution or computation offloading.Let B i,t denotes the battery energy level for MD i at the beginning of time slot t.Without loss of generality, we assume B i,t < ∞, ∀t ∈ T. In this paper, we just ignore the energy consumption for other purposes besides local computation and data transmission.Denote the energy consumed by the MD i in time slot t as E i,t , which comprises of two parts: 1) energy consumption of local service request processing and 2) energy consumption for sending requests, which depends on the strategy it chooses.We can express E i,t as follows: E i,t should be smaller than the battery level, i.e., Thus, the battery energy level of MD i evolves according to the following equation: It is much more complicated to design the computation offloading policies for the fog computing system with the MDs equipped with EH function, compared to the conventional MCC systems with battery-powered MDs.Moreover, the system decisions are coupled among different time slots because of the temporally evolved battery energy level.Consequently, it is very challenge to determine the optimal computation offloading strategies, which would balance the computation performances of the current and future computation requests as better as possible.

E. Social Network Model
In this section, we use a social graph (N , ε s ) to denote the social tie structure among the MDs.The vertex set is the N MD members and the edge set is denoted as ε s = {(i, j) : e s i,j = 1, ∀i, j ∈ N}, where e s i,j = 1 denotes that MD i and j have social relationship between each other, and verse vice.The strength of social relationship between MD i and MD j is denoted as s ij , which is normalized to be s ij ∈ [0, 1].And the larger the value of s ij , the stronger the social tie between the two MDs.The MD i's social tie to itself is s ii = 1.N S i is defined as the MD i's social group, which is the set of MDs that have social ties with MD i, i.e., N S i {j ∈ N|e s ij ∈ ε s }.It is worth noting that the social relationships among MDs can be obtained by locally putting forward the recognition process through the proximity communications technology, for example, the WiFi-direct and so on, prior to the computation offloading process.

IV. PROBLEM FORMULATION
In this section, the execution cost is defined as the weighted sum of the execution delay and the task dropping punishment cost, which will be described specifically as follows.The average execution delay for MD i at time slot t can be denoted as follows: Nevertheless, some of the requests may not be executed but have to be dropped, e.g., due to energy shortage for local computing or offloading to the cloud, meanwhile when the wireless channel from MDs to the fog node is in deep fading, the data of the requests cannot be successfully delivered.To take this aspect into consideration, we penalize per dropped task by cost μ i , thus the punishment cost for MD i at time slot t can be expressed as follows: Consequently, the execution cost for MD i at time slot t, can be formulated as follows: where ᾱ is the weight of task dropping cost.Due to the existence of social relationships, it is natural that users would take into account the effect of its neighbors' decision.So users are coupled in the social domain due to the social ties among them, and MD i aims to choose the strategy p i,t So the average social group execution cost of MD i during a period of time can be denoted as follows: (16) where p i = [p i,0 , p i,1 , . . ., p i,t , . . .] is the strategies vector of MD i of all the time slots; p − i is the strategies vector of all MDs other than MD i of all the time slots, which can be denoted as p − i = {. . ., p i−1,0 , p i−1,1 , . . ., p i−1,T , p i+1,0 , p i+1,1 , . . ., p i+1,T , . ..}.
We next consider the distributed decision making problem among the MDs for making their average social group execution cost minimize.We formulate the problem as follows: Subject to where v i,t = Wlog 2 (1 + [(q i,t g BS i,t )/(w i,t + j∈N,j =i q j,t g BS j,t )]).Constraint (18a) is derived from (7).It shows that the request arrival rate at each server should not exceed the service rate to ensure a stable queue.Nevertheless, due to the energy causality constraints (18d) and (18e), the MDs' decisions are coupled among different time slots, which makes the problem difficult to be tackled.From [13], we can find that by introducing a nonzero lower bound, E min i,t , and a reasonable upper bound E max i,t , on the battery at each time slot, such coupling effect can be eliminated and the system operation can be optimized by ignoring energy constraints (18d) and (18e).Thus, we introduce a modified version of the above problem as follows: In the following, we propose a game theoretic approach in order to achieve efficient computation offloading decision makings among the MDs.Game theory is a powerful tool to analyze the interactions among multiple users who focus on their own interests.A Nash equilibrium has the nice selfstability property that all the users can achieve a mutually satisfactory solution and no user has the incentive to deviate unilaterally.Moreover, by using the intelligence of each individual MD user, game theory is a useful framework for devising decentralized mechanisms with low complexity, such that users can self-organize into a mutually satisfactory solution.It can ease the heavy burden of complex centralized management and reduce the communicating overhead between the fog and MDs.
In this setting, the decisions of all MDs are mutually dependent and the proposed model is a GNEP.The GNEP differs from classical Nash equilibrium problem (NEP) in that, while in a NEP, only the players' objective functions depend on the other players' strategies, but in a GNEP both the objective functions and the strategy sets depend on the other players' strategies.In our problem, the dependence of each player strategy set on the other players' strategies is represented by the constraint (18a), which includes all the MDs' decision variables.Then we will introduce a lemma to illustrate the proposed problem is a jointly convex GNEP so that we can use exponential penalty function and semi-smooth Newton method proposed in the following section to address it effectively.
Lemma 1: The derived GNEP is a jointly convex GNEP.
Proof: See the Appendix.

V. PROPOSED SOLUTION
In this section, as we have proved that the derived GNEP is a jointly convex problem, we can use exponential penalty function method to solve the GNEP above.We reformulate the GNEP as a sequence of smoothing penalized NEPs by means of a partial penalization of the coupling constraints where the exponential penalty functions are used.Furthermore, we formulate the KKT conditions for smoothing penalized NEPs into a system of nonsmooth equations, and then apply the semismooth Newton method with Armijo line search to solve the system.The specific algorithm is shown below.
By careful observation, we can find that (18a) is a coupled constraint, which includes other participants' decision variables.Other constraints, such as (18b), (19b) only depend on the MD i itself.As we all know, solving a classic NEP is much easier than solving a GNEP.In this section, through partial punishing the difficult coupling constraints in GNEP, which helps us to solve a classical NEP instead of solving a more difficult GNEP.
With punishing the coupling constraints with exponential penalty function, the original problem is changed as follows: where Here, we relax the constraints as we neglect such a constraint denoted by 0 ≤ p M i,t , p F i,t , p C i,t , p D i,t ≤ 1.Nevertheless, the relaxation has no effect on the optimal strategy vector as we can autonomously select the optimal ones ranged on [0, 1] at last.
Then the convergence theorem of the exponential penalty function method is given in the following theorem.
Theorem 1: Let {ρ k } be a positive sequence that tends to be infinite.For each k, p k i is the solution of the NEP when ρ = ρ k .Set pi is a cluster point of the sequence {p k i }, and satisfies the inequality constraints, thus pi is the solution of the GNEP.
Proof: See [24, Th. 1].So the original GNEPs are evolved to a list of classical NEPs.From Theorem 1, we can find that solving a list of NEPs can obtain the solution of GNEP.For the sake of simplicity, we use h 3,4) to replace the constraint (21a)-(21d), respectively.So the derived classical NEP denoted in a simple form is expressed as follows: The KKT condition for the NEP displayed in ( 22) can be denoted as follows: Obviously, assemble all of the systems for i = 1, 2, . . ., N, we can obtain the following equivalent system: where p = [p 1 , p 2 , . . ., p i . . ., p N ] is all the MDs' strategy vector, and β = (β T .We use the semi-smooth Newton method to solve the system (ω) = 0, which is equal to solving problem (20).First, we define the value function (ω) := (1/2) T (ω) (ω), then semi-smooth Newton method is described as Algorithm 1.At last, we choose the optimal solution on interval (0, 1) from the obtained solutions from Algorithm 1. Return Step 4: Rectification Setting We also show the convergence of the semi-smooth Newton algorithm in the following proposition.
Proposition 1: The semi-smooth Newton algorithm, with strong system computing power, inherits many excellent features from the classic Newton algorithm.Through determining the step size of the Newton direction with the linear search strategy, it avoids the sensitivity of the algorithm to initial values.Thus the local convergence becomes global convergence.

VI. PERFORMANCE EVALUATIONS
In this section, extensive simulations are conducted to illustrate the effectiveness of the proposed algorithm for the GNEP.The parameters of the MDs are given as follows in Table II.For simplify, we assume the fog node consists of ten servers and the service rate of each server is 4 (MIPS), and the workload of each server is l F t = 0.5.The transmission time from the fog to the central cloud is T FC = 0.5 (Second), and the service rate of the central cloud is u C = 10 (MIPS).we have emphasized in Section III-E, the social tie to each MD itself is s ii = 1.So we can see that the diagonal elements of the matrix are all 1.Other elements denote the strength of social tie between MD i and MD j, whose values are in interval (0, 1).We can also find that it is a nonsymmetric matrix, in other words, the closeness between two MDs is not identical, which is consistent with the relationship between people in our life.For example, the strength of social tie for MD 1 to MD 2 is 0.25, but the strength of social tie for MD 2 to MD 1 is 0.50.First, we consider the case that there is only one time slot.In this case, we investigate the optimal decision strategy for locally, fog, central cloud execution and dropped out with request arrival rate increasing for MD 2 in Fig. 2. We can find that with arrival rate increasing, the proportion of local execution first increases slowly at interval [0, 1], and then increases more faster at interval [1,2].On the contrary, the proportion of fog execution and central cloud execution decrease slowly at interval [0, 1], and decrease quickly at interval [1,2].This is because that the MD prefers to offload some requests to the fog when the fog have extra capacity to execute the requests.With all MDs' requests pooling to the fog node with limited resource, each MD has to reduce the proportion of offloading to fog.With the interference from other MDs in the uplink transmission, it would cost quite a lot of time and energy to transmit the requests, so the proportion of central cloud execution is also reduced.With the requests arrival rate increasing, the dropped proportion is also reduced.
In Fig. 3, we also investigate the impact of request arrival rate on execution delay and energy consumption for local execution, uplink transmission, fog execution, and also the total process.It needs to be emphasized that we neglect the energy consumption of the MD when the requests are executed in the fog, so we can find a straight line in subplot 3. Generally,  a larger request arrival rate can result in a larger execution delay and energy consumption, which can be easily found in any curve in Fig. 3. Additionally, with the request arrival rate increasing, the consumed energy is also increasing, so we must carefully design the offloading strategy to make the execution cost minimize while meeting the energy supply.
Additionally, we also compare the decision strategy for MD 2 under a certain request arrival rate for different values of ρ.  4. We can see that a larger value of ρ can get a better solution, and the solution would slowly converge to the optimal one with the value of ρ increasing.Then we focus on a complex situation where the system consists of different time slots.First, we investigate the execution cost among time slots under different request arrival rate, while we assume that in each time slot the harvested energy is identical.It is natural that at the end of each time slot, the remaining energy becomes less, so the MD has to execute more requests locally which would resulting in a larger delay, which means a larger execution cost.We can find this rule from Fig. 5. Typically, a larger request arrival rate cause a larger execution cost, which can be observed by comparing the three curves in Fig. 5.
Next, we also study the execution cost with the number of MDs under different request arrival rates, which is displayed in Fig. 6.We can see that the execution costs are also increasing when the number of MDs increases, which means that the execution delay or the punishment cost become larger.As more and more users compete for resources in the fog with each other, thus intensified the channel interference, reducing the channel transmission rate.So the MD has to execute the request locally or drop them, which leads to a larger execution cost.
In Fig. 7, we compare our algorithm with the other existing schemes such as the "successive convex approximation method" proposed in [6] and the "Lyapunov optimizationbased dynamic computation offloading Algorithm" proposed in [9].By varying the arrival rates, we can find that our proposed algorithm has a better system performance.This is due to the fact that with the proposed scheme, the GNE point can be achieves, which is a mutually satisfactory solution and no one has the incentive to deviate.

VII. CONCLUSION
In this paper, a computation offloading problem in a fog computing system has been investigated.We derive the analytic results of energy consumption, delay performance, and cost with assumption of three different queue models at mobile devices, fog, and central cloud.By leveraging the obtained results, we take the social relationships of the EH MDs into the design of offloading scheme.With the objective to minimize the social group execution cost, we advocate game theoretic approach and propose a dynamic computation offloading scheme.Specifically, we formulate a GNEP with various constraints and addressed it by using exponential penalty function method and semi-smooth Newton method with Armijo line search.Extensive performance evaluations are presented to illustrate the effectiveness of the proposed scheme.

APPENDIX
Proof: First, we will prove that the payoff functions are concave.By derivation, we can obtain the expressions as follows: Combining ( 27), (29), (31), (33), we have proved that the payoff functions are concave in its own variable.By observing, we can find (21a)-(21d) are only linear, so the set of constraints are convex apparently.So the derived GNEP is that it satisfies the convexity assumption.Refer to [26], we can draw that the objective formulated problem is a jointly convex GNEP.
Manuscript received November 20, 2017; revised February 18, 2018; accepted March 9, 2018.This work was supported in part by the Academy of Finland under Decision 284748 and in part by the NSF of Hebei under Grant E2017203351.(Corresponding author: Zheng Chang.)

Fig. 3 .
Fig. 3. Execution delay and energy consumption under different request arrival rates.

Fig. 5 .
Fig. 5. Execution cost among different time slots under different request arrival rates.
t −λ i,t p M Simplify the expression by approximation, we can obtain the first-order derivative about variable p M i,t as follows: