Joint Wireless and Edge Computing Resource Management with Dynamic Network Slice Selection

—Network slicing is a promising approach for enabling low latency computation oﬄoading in edge computing systems. In this paper, we consider an edge computing system under network slicing in which the wireless devices generate latency sensitive computational tasks. We address the problem of joint dynamic assignment of computational tasks to slices, management of radio resources across slices and management of radio and computing resources within slices. We formulate the Joint Slice Selection and Edge Resource Management (JSS-ERM) problem as a mixed-integer problem with the objective to minimize the completion time of computational tasks. We show that the JSS-ERM problem is NP-hard and develop an approximation algorithm with bounded approximation ratio based on a game theoretic treatment of the problem. We use extensive simulations to provide insight into the performance of the proposed solution from the perspective of the whole system and from the perspective of individual slices. Our results show that the proposed slicing policy can achieve signiﬁcant gains compared to the equal slicing policy, and that the computational complexity of the proposed task placement algorithm is approximately linear in the number of devices

Abstract-Network slicing is a promising approach for enabling low latency computation offloading in edge computing systems.In this paper, we consider an edge computing system under network slicing in which the wireless devices generate latency sensitive computational tasks.We address the problem of joint dynamic assignment of computational tasks to slices, management of radio resources across slices and management of radio and computing resources within slices.We formulate the Joint Slice Selection and Edge Resource Management (JSS-ERM) problem as a mixed-integer problem with the objective to minimize the completion time of computational tasks.We show that the JSS-ERM problem is NP-hard and develop an approximation algorithm with bounded approximation ratio based on a game theoretic treatment of the problem.We provide extensive simulation results to show that network slicing can improve the system performance compared to no slicing and that the proposed solution can achieve significant gains compared to the equal slicing policy.Our results also show that the computational complexity of the proposed algorithm is approximately linear in the number of devices.

I . I n t ro d u c t i o n
Network slicing is emerging as an enabler for providing logical networks that are customized to meet the needs of different kinds of applications, mostly in 5G mobile networks.Horizontal network slices are designed for specific classes of applications, e.g., streaming visual analytics, real-time control, or media delivery, while vertical network slices are designed for specific industries.Slicing is expected to allow flexible and efficient end-toend provisioning of bandwidth, composition of in-network processing, e.g., in the form of service chains composed of virtual network functions (VNF), and the allocation of dedicated computing resources.At the same time it provides performance isolation.Slicing is particularly appealing in combination with edge computing, as network slicing could allow low latency access to customized computing services located in edge clouds [1], [2].
Flexibility in network slicing is achieved through service orchestration.Orchestration focuses on the deployment and service-aware adaptation of VNFs and edge cloud services based on predicted workloads.Recent works in the area addressed the joint placement and routing of service function chains, formulated as a virtual network embedding problem [3], and the problem of joint resource dimensioning and routing [4], [5].Typical objectives are maximization of the service capacity or profit under physical (bandwidth and computational power) resource constraints, or the minimization of the energy consumption subject to satisfying service demand.
Common to the works on service orchestration is that they assume that each application is mapped to a specific slice deterministically, and assume a static resource pool per slice so as to ensure performance isolation [3], [4], [5].A deterministic mapping is, however, not mandatory in practice.While there may be a designated (default) slice for every application, most proposed architectures for network slicing define a set of allowed slices, and the assignment of an application to a slice can be decided dynamically based on the current workload and SLA requirements [6].The dynamic assignment of applications to slices thus results in a mixture of workloads in the slices, and consequently calls for flexibility in allocating resources to slices.
The importance of resource management across slices has been widely accepted in the case of the radio access network (RAN) [6].Such inter-slice resource allocation should happen at short time scales, taking into account slice-level service level agreements (SLAs) and technological constraints (e.g., available RAN technology, such as 5GNR or WiFi-Lic).Recent work in the area has focused on system aspects of virtualizing RANs [7], and on the allocation of virtual resource block groups to slices so as to maximize efficiency [8], but has not considered of the potential impact of inter-slice resource management on service orchestration and on the dynamic assignment of applications to slices.It is thus so far unclear how to perform joint resource management within and across slices, considering the orchestration of communication and computing resources simultaneously.
In this paper we address the problem of joint dynamic slice selection, inter-slice radio resource management and intra-slice radio and computing resource management for latency sensitive workloads, and make three important contributions.First, we formulate the joint slice selection and edge resource management (JSS-ERM) problem, and show that it is NP-hard.Second, we analyze the optimal solution structure, and we develop an efficient approximation algorithm with bounded approximation ratio inspired by a game theoretic treatment of the problem.Third, we provide extensive numerical results to show that the resulting system performance significantly outperforms baseline resource allocation policies.
The rest of the paper is organized as follows.Section II introduces the system model and Section III the problem formulation.Sections IV and V provide the analytical results, and Section VI shows numerical results.Section VII discusses related work and Section VIII concludes the paper.

I I . S y s t e m M o d e l
We consider a slicing enabled mobile backhaul including mobile edge computing (MEC) resources that serves a set N={1, 2, . . ., N } of wireless devices (WDs) that generate computationally intensive tasks.WDs can offload their tasks through a set A = {1, 2, . . ., A} of access points (APs) to a set C = {1, 2, . . ., C} of edge clouds (ECs).APs and ECs form the set E A ∪ C of edge resources.We denote by S ={1, 2, . . ., S} the set of slices in the network, which include certain combinations of computing resources (e.g., CPUs, GPUs, NPUs and/or FPGAs), optimized for executing some types of tasks.
We characterize a task generated by WD i by the size D i of the input data and by its complexity, which we define as the expected number of instructions required to perform the computation.Since the WDs and the slices may have different instruction set architectures, the number of instructions required to execute the same task may also differ.Hence, for a task generated by WD i we denote by L i and L i,s the expected number of instructions required to perform the computation locally and in slice s, respectively.Similar to other works [9], [10], [11], we consider that D i , L i and L i,s can be estimated from measurements by applying the methods described in [12], [13], [14].
We consider that each WD i generates a computational task at a time; each task is atomic and can be either offloaded for computation or performed locally on the WD it was generated at.In the case of offloading, the WD will be assigned to exactly one slice s ∈ S and within the slice to exactly one AP a ∈ A and to exactly one EC c ∈ C. Therefore, we define the set of feasible decisions for WD i as of all WDs that perform the computation locally.Figure 1 shows an example of a slicing enabled MEC system that consists of N = 7 WDs, C = 2 ECs and A = 3 APs and S = 4 slices.In this example we have that 2 out of 7 WDs perform the computation locally and 5 out of 7 WDs offload their tasks.In what follows we discuss our models of communication and computing resources.

A. Communication Resources
Communication resources in the system are managed at two levels: at the network level and at the slice level.
At the network level, the radio resources of each AP a ∈ A are shared across the slices according to the interslice radio resource allocation policy , which determines the inter-slice radio resource provisioning coefficients b s a ∈ [0, 1], ∀(a, s) ∈ A × S such that s∈S b s a ≤ 1, ∀a ∈ A. At the slice level, the radio resources assigned to each slice s ∈ S are shared among the WDs according to an intra-slice radio resource allocation policy P s wa : , which determines the intra-slice radio resource provisioning coefficients We denote by R i,a the achievable PHY rate of WD i at AP a. R i,a depends on physical signal characteristics, such as path loss and fading, and on the modulationcoding scheme.Given R i,a we can express the actual uplink rate of WD i at AP a in slice s as The uplink rate (1) together with the input data size D i determines the transmission time of WD i ∈ O (a,s) (d), Similar to previous works [10], [15], [16], [17] we make the assumption that the time needed to transmit the results of the computation from the EC to the WD can be neglected because for many applications (e.g., face recognition and tracking) the size of the output data is significantly smaller than the size D i of the input data.

B. Computing Resources
Our system model distinguishes between edge cloud resources and local computing resources.
1) Edge Cloud Resources: We consider that each slice s ∈ S is equipped with a certain combination of computing resources optimized for executing specific types of tasks (e.g, CPUs, GPUs, NPUs, FPGAs), and we denote by F s c the computing capability of EC c in slice s.The computing resources within a slice are shared among the WDs according to the intra-slice computing power allocation policy P s wc : , which determines the intra-slice computing power provisioning coefficients Given the computing capability F s c we can express the computing capability allocated to WD i in EC c in slice s as In order to account for the diversity of computing resources provided by different slices we use the coefficient

C. Cost Model
We define the system cost as the aggregate completion time of all WDs.Before providing a formal definition, we introduce the shorthand notation b Cost of WD i: When offloading, the task completion time consists of two parts: the time needed to transmit the data pertaining to a task through an AP and the time needed to execute a task in an EC.In the case of local computing, the task completion time depends only on the local execution time.Therefore, the cost of WD i can be expressed as , I {di=(a,c,s)} = 1, where Cost per slice: We express the cost in slice s as System cost: Finally, we express the system cost as C l i , (10) where (P wa , P wc ) = ((P s wa , P s wc )) s∈S denotes the collection of slices' policies.

I I I . P ro b l e m Fo r m u l at i o n
We consider that the network operator aims at minimizing the system cost C(d, P b , P wa , P wc ) by finding an optimal vector d of offloading decisions, and an optimal collection ( Pb , Pwa , Pwc ) of policies for sharing the edge resources across slices and within slices.We refer to the problem as the Joint Slice Selection and Edge Resource Management (JSS-ERM) problem.Since the WDs generate atomic tasks that cannot be further split, the JSS-ERM is a mixed-integer optimization problem, and can be formulated as min d,P b ,P wa ,P wc C(d, P b , P wa , P wc ) (11) s.t. d∈Di j∈O (e,s) (d) Constraint (12) enforces that each WD either performs the computation locally or offloads its task to exactly one logical resource (a, c, s) ∈ A × C × S; constraint (13) ensures that the task completion time in the case of offloading is not greater than the task completion time in the case of local computing; constraint (14) enforces a limitation on the amount of communication resources of an AP that can be provided to each slice; constraint (15) enforces a limitation on the amount of communication resources of an AP and the amount of computing resources of an EC that can be provided to each WD in each slice.
Proof.We provide the proof in Section IV-B.
In what follows we develop an approximation scheme for the JSS-ERM problem based on decomposition of the problem, and by adopting a game theoretic interpretation of one of the subproblems.In what follows we show that the JSS-ERM problem can be solved through solving a series of smaller optimization problems.To do so, we start with considering the problem of finding the collection ( Pb , Pwa , Pwc ) of optimal resource allocation policies for a given vector d of offloading decisions.13) can be satisfied.Furthermore, define the problem of finding a collection ( Pb , Pwa , Pwc ) of optimal resource allocation policies as min P b ,P wa ,P wc C(d, P b , P wa , P wc ) ( 18)

Lemma 1. Consider an offloading decision vector d for which the constraint (
Then, the collection ( Pb , Pwa , Pwc ) of optimal resource allocation policies sets the provisioning coefficients according to j∈O (e,s) (d) Proof.First, observe that constraint (13) can be omitted since we assumed that the decision vector d is such that constraint (13) can be satisfied.Furthermore, by inspecting the leading minors of the Hessian matrix of the objective function (18) it is easy to show that the matrix is positive semidefinite on the domain defined by (19), and thus problem ( 18)-( 19) is convex.Therefore, the optimal solution of the problem must satisfy the Karush-Kuhn-Tucker (KKT) conditions and thus we can formulate the corresponding Lagrangian dual problem.
du. feasibility: α, β, γ, δ 0, ( 25) slackness: −δ s i,e w s i,e = 0, e ∈ E,s ∈ S,i ∈ O (e,s) (d).( 29) We proceed with finding ŵs i,e .First, from the KKT dual feasibility condition δ 0 and complementary slackness condition (29) we obtain that δ s i,e = 0 must hold for every e ∈ E, s ∈ S and i ∈ O (e,s) (d) as otherwise w s i,e = 0 would lead to infinite value of the objective function.Then, from the KKT stationarity condition (23) and complementary slackness condition (27) we obtain the expression (20) for coefficients ŵs i,e .Finally, by substituting expression (20) into the KKT stationarity condition (22) and by following the same approach as for finding ŵs i,e we obtain the expression (21) for coefficients bs a , which proves the result.
As a first step in the decomposition, let us consider the problem of finding the optimal collection (P * wa , P * wc ) = ((P s, * wa , P s, * wc )) s∈S of resource allocation policies of slices for a given vector d of offloading decisions and a given policy P b .Proposition 1.Consider an offloading decision vector d for which constraint (13) 13), (15), (17).(31) is given by (20), i.e., (P s, * wa , P s, * wc ) = ( Ps wa , Ps wc ), ∀s ∈ S. Proof.The result can be proved by following the approach presented in the proof of Lemma 1.
As a second step, let us consider the problem of finding an optimal policy P * b for a given vector d of offloading decisions d and the optimal collection (P * wa , P * wc ) = ( Pwa , Pwc ) of the slices' policies.
Proposition 2. Consider an offloading decision vector d for which the constraint ( 13) can be satisfied.Furthermore, let us substitute ( 20) into ( 11)- (17) and define the problem of finding an optimal inter-slice radio resource allocation policy P * b , i.e., a solution to min s.t.( 13), ( 14) and ( 16). ( 33) Then, the optimal inter-slice radio resource allocation policy P * b sets the inter-slice provisioning coefficients according to (21), i.e., P * b = Pb .Proof.The result can be proved by following the approach presented in the proof of Lemma 1.
By combining the above two results, we are now ready to show that the JSS-ERM problem can be decomposed into a sequence of optimization problems.
Theorem 2. The problem ( 18)-( 19) can be solved optimally by finding the optimal policies ( Pwa , Pwc ) first, and finding the optimal policy Pb second, i.e., Furthermore, as the next theorem shows, we can use this decomposition structure also for computing the optimal offloading decision vector.Theorem 3. The problem ( 11)-( 17) can be solved optimally by finding the optimal collection ( Pb , Pwa , Pwc ) of resource allocation policies first, and finding an optimal offloading decision vector d second, i.e., Proof.It is easy to see that the exact values of the provisioning coefficients are functions of d.However, the optimal policies according to which the resources are shared are the same for every offloading decision vector d ∈ D, as defined by (20) and (21).Therefore, one can solve the problem ( 18)-( 19) first, assuming an arbitrary offloading decision vector d, and then given the solution ( Pb , Pwa , Pwc ) of ( 18)-( 19) find the optimal offloading decision vector d that will determine the exact values of the provisioning coefficients.This proves the result.

A. Discussion and Practical Implications
So far we have shown that the JSS-ERM problem can be decomposed into a S + 2 coupled resource allocation problems that can be solved sequentially.It is of interest to discuss the relationship between the decomposition and the potential implementation of a resource allocation and orchestration framework.
The proposed decomposition results in an optimization problem to be solved at the network level (eqns.( 32)-( 33)) and one in each slice ((eqns.( 30)-( 31))), followed by the problem of finding an optimal offloading decision vector.This structure is aligned with the slice-based network architecture proposed in [6], where inter-slice radio resource allocation and service orchestration are performed by a centralized entity, the slice resource orchestrator (SRO), while intra-slice radio and computing resource management is performed by the slices themselves, i.e., each slice manages its own radio and computing resources.
Figure 2 illustrates the interaction between the SRO and slices in the potential implementation of a resource allocation and orchestration framework.

B. Problem Complexity
In what follows we provide a result concerning the complexity of the JSS-ERM problem.For notational convenience let us first define the set of resources R {{A×S}∪{C ×S}∪N } and let us introduce the following shorthand notation First, by substituting ( 20) into (8) and by using the notation introduced in (36), we can express the cost of WD i under a policy P b and the collection ( Pwa , Pwc ) of optimal allocation policies of slices as where Rdi is the set of resources that WD i uses for performing its task in d (i.e., Rdi ⊂ R) and m (a,s) = 1/b s a , m (c,s) = 1/F s c and m i = 1/F l i .Second, by summing the expressions (37) over all WDs i ∈ N and by reordering the summations we can express the system cost (10) under a policy P b and the collection ( Pwa , Pwc ) of optimal allocation policies of slices as Next, let us define the set of resources R {A ∪ {C × S} ∪ N } and a coefficient q i,a q i,(a,s) = D i /R i,a .By substituting ( 21) into (37), we can express the cost of WD i under the collection ( Pb , Pwa , Pwc ) of optimal allocation policies as where Rdi is the set of resources that WD i uses for performing its task in d (i.e., Rdi ⊂ R) and m a = 1.Finally, by summing the expressions (39) over all WDs i ∈ N and by reordering the summations we can express the system cost (38) under the collection ( Pb , Pwa , Pwc ) of optimal allocation policies as Theorem 4. Consider the problem of finding the optimal vector d of offloading decisions of WDs under the collection ( Pb , Pwa , Pwc ) of optimal allocation policies that set provisioning coefficients according to (20) and ( 21)
Proof.We prove the NP-hardness of the problem by reduction from the Minimum Sum of Squares problem (SP19 problem in [18]): given a finite set B, a size s(b) ∈ Z + , ∀b ∈ B and positive integers K ≤ |B| and J, the question is whether B can be partitioned into For the reduction we set S = 1, C = 0 and F l i = 0, ∀i ∈ N , i.e., in this simplified version of the problem R = A. Next, we let Then, it follows from (38) that the optimal solution of ( 41)-(42) provides the solution to the SP19 problem.As SP19 is NP-hard, problem (41)-( 42) is also NP-hard, which proves the theorem.
Proof of Theorem 1.The result follows from Theorem 3 and Theorem 4.

V . A p p rox i m at i o n S c h e m e f o r t h e J S S -E R M P ro b l e m
In what follows we propose the choose offloading slice (COS) algorithm for computing an approximation to the optimal solution of the JSS-ERM problem.In particular, the algorithm serves as an approximation scheme to the problem of finding an optimal offloading decision vector.The algorithm starts from an offloading decision vector d 0 in which all WDs perform computation locally and it lets WDs update their offloading decisions one at a time, based on their local cost function Ci (d).We show the pseudo code of the algorithm in Figure 3.
Theorem 5.The COS algorithm terminates after a finite number of the iterations for any allocation policy P b and the collection ( Pwa , Pwc ) of optimal allocation policies of slices.
Proof.The proof is based on a game theoretic treatment of the problem s.t.( 12), in which the inter-slice radio resource provisioning coefficients are set according to an arbitrary policy P b and the intra-slice radio and computing power provisioning coefficients are set according to the optimal policies Pwa and Pwc , respectively.
In what follows we show that the problem (43)-(44) can be interpreted as a congestion game Γ(P b , Pwa , Pwc ) =< N , (D i ) i∈N , ( Ci ) i∈N > with resource-dependent weights q i,r , i ∈ N , r ∈ R, and the cost of WD i in the resulting game is given by (37).First, observe that q i,r can be interpreted as the weight that WD i contributes to the congestion when using resource r ∈ R and thus q r (d) can be interpreted as the total congestion on resource r in strategy profile d.This in fact implies that the cost (37) of WD i in strategy profile d depends on its own resourcedependent weights q i,r and on the total congestion q r (d) on the resources it uses.Therefore, it follows from [19] that the problem (43)-(44) can be interpreted as a congestion game Γ(P b , Pwa , Pwc ) with resource dependent weights.Consequently, the COS algorithm terminates after a finite number of iterations iff the game Γ(P b , Pwa , Pwc ) has a pure strategy Nash equilibrium. 1ince the cost c r (d) m r q r (d) of sharing every resource r ∈ R is an affine function of the congestion q r (d) on resource r, it follows from Theorem 4.2 in [19] that the game Γ(P b , Pwa , Pwc ) has the exact potential function 2 given by where c ≤i r (d) = m r q ≤i r (d) and It is well known that in a finite strategic game that admits an exact potential all improvement paths 3 are finite [20] and thus the existence of the exact potential function (46) allows us to use the COS algorithm for computing a pure strategy Nash equilibrium d * of the game Γ(P b , Pwa , Pwc ), which proves the result.Theorem 6.The COS algorithm terminates after a finite number of the iterations for the collection ( Pb , Pwa , Pwc ) of optimal allocation policies.
Proof.By following the same approach as in the proof of Theorem 5, it is easy to show that given the collection ( Pb , Pwa , Pwc ) of optimal allocation policies, the problem ( 41)-( 42) can be interpreted as a congestion game Γ( Pb , Pwa , Pwc ) =< N , (D i ) i∈N , ( Ci ) i∈N > with resource-dependent weights q i,r , i ∈ N , r ∈ R, and the cost of WD i in the resulting game is given by (39).
Since m a = 1, ∀a ∈ A, the cost c r (d) m r q r (d) of sharing every resource r ∈ R is an affine function of the congestion on resource r.Therefore, the game Γ( Pb , Pwa , Pwc ) is also an exact potential game, and thus the COS algorithm computes a pure strategy Nash equilibrium d * of the game Γ( Pb , Pwa , Pwc ), which proves the result.
In general, the number of improvement steps can be exponential in a potential game, but as we show next the COS algorithm can compute an equilibrium d * of offloading decisions efficiently.

Theorem 7. The COS algorithm terminates in
) iterations, where n ≥ 1, C min and C max are system parameter dependent constants and Ψ min is the minimum value of the potential function.
Proof.First, let us define the minimum cost that WD i can achieve as → R is an exact potential for a finite strategic game if for an arbitrary strategy profile (d i , d −i ) and for any improvement step d * i the following holds: 3 An improvement path is a sequence of strategy profiles in which one player at a time changes its strategy through performing an improvement step.
us define the maximum cost that WD i can achieve if it was the only WD in the system as Consider now an iteration of the COS algorithm where the offloading decision of WD i is updated from d i to d * i .We can then write where the equality follows from the definition of the exact potential function (45), the first inequality follows from the fact that Ci ( iteration decreases the potential function by a constant factor (n can be chosen as a smallest positive constant for which n C min C max ≥ 1).Furthermore, since the COS algorithm starts from an offloading decision vector d 0 in which all WDs perform computation locally, the potential function begins at the value Ψ(d 0 ) = i∈N T ex i and cannot drop lower than Ψ min .Therefore, the COS algorithm converges ) iterations, which proves the result.
In what follows we address the efficiency of the COS algorithm in terms of the cost approximation ratio.Theorem 8.The COS algorithm is a 2.62-approximation algorithm for the optimization problem ( 43)-( 44) in terms of the system cost, i.e., C(d * ) C( d) ≤ 2.62.Proof.Let us denote by D * ⊆ D the set of all vectors of offloading decisions that can be computed using the COS algorithm given any policy P b and the collection ( Pwa , Pwc ) of the optimal resource allocation policies of slices.Furthermore, let us consider a vector d * ∈ D * and an arbitrary vector d ∈ D of offloading decisions.Since there is no WD i for which the cost Ci (d * ) can be decreased by unilaterally changing its offloading decision we have the following where Rd * i ⊂ R and R di ⊂ R denote the the set of resources that WD i uses in d * and d, respectively.By summing (48) over all WDs i ∈ N and by reordering the summations we obtain From the definition (36) of the total weight q r (d) on resource r ∈ R and from i∈Or(d) Next, let us recall the Cauchy-Schwartz inequality and b r √ m r q r ( d) we obtain the following By dividing the right and the left side of (50) by r∈R q 2 r ( d) > 0 and by using (38) we obtain Theorem 9.The COS algorithm is a 2.62-approximation algorithm for the optimization problem ( 41)-( 42) in terms of the system cost, i.e., C(d * ) C( d) ≤ 2.62.Proof.The result can be easily obtained by following the approach used to prove Theorem 8.
Finally, from Theorem 3 and Theorem 9 we obtain the approximation ratio bound for the proposed decomposition-based algorithm.
Theorem 10.Given the collection ( Pb , Pwa , Pwc ) of optimal allocation policies, the proposed decompositionbased algorithm computes a 2.62-approximation solution to the JSS-ERM problem.

V I . N u m e r i c a l R e s u lt s
We used extensive simulations to evaluate the performance of the proposed resource allocation algorithm.To capture the potentially uneven spatial distribution of ECs, WDs and APs in a dense urban area, we consider a square area of 1km × 1km in which WDs and 3 ECs are placed uniformly at random and 5 APs are placed at random on a regular grid with 25 points.The channel gain of WD i to AP a depends on their Euclidean distance d i,a and on the path loss exponent α, which we set to 4 according to the path loss model in urban and suburban areas [21].We set the bandwidth B a of 2 APs to 18MHz and the bandwidth of 3 APs to 27MHz, corresponding to 25 and 75 resource blocks that are 12 × 60KHz and 12 × 30KHz subcarriers wide [22], [23], respectively.We consider that the transmit power P i,a of every WD i is uniformly distributed on [10 −6 , 0.1]W according to [24].We calculate the total thermal noise in a B a MHz channel as N 0 (dBm) = −174 + 10log(B a ) according to [25] and the transmission rate R i,a achievable to WD i at AP a as R i,a = B a log(1+d −α i,a Pi,a N0 ).
To set the values for the computational capabilities of the WDs, we consider a line of Samsung Galaxy phones, from the oldest version with 1 core operating at 1GHz to the one of the newest versions with 8 cores operating at 2.84GHz.We consider that EC c 1 is equipped with 36 vCPUs operating at 2.3GHz and 96 vCPUs operating at 3.6GHz.We consider that EC c 2 and EC c 3 are equipped with 1 GPU each (with 2048 parallel processing cores operating at 557MHz and 2496 parallel processing cores operating at 560MHz, respectively).Given the measurements reported in [26], [27], [28] we assume that a WD, a CPU and a GPU can execute on average 2, 3 and 1 instructions per cycle (IPC ), respectively.Based on this, we consider that the computational capability F l i of every WD i is uniformly distributed on [2, 45.4]GIPS, where the lower and the upper bound correspond to the oldest and the newest version of the phone, respectively.Similarly, we calculate the computational capabilities of ECs, and set them to F c1 = 1285.2GIPS,F c2 = 1140.7GIPSand F c3 = 1397.8GIPS.
The input data size D i is drawn from a uniform distribution on [1.7, 10]Mb according to measurements in [29].The number X of instructions per data bit follows a Gamma distribution [30] with shape parameter k = 75 and scale θ = 50.Given D i and X, we calculate the complexity of a task as L i = D i X.
Motivated by Amazon EC2 instances [31] designed to support different kinds of applications (e.g., G3 and P2 instances for graphics-intensive and general-purpose GPU applications, and C5 and I3 instances for computeintensive and non-virtualized workloads), we evaluate the system performance for the following four cases.S= 1: The slice s 1 contains all ECs, and thus is able to support all of the above applications.S= 2: The ECs are sliced such that slice s 1 supports the G3.4 instance and slice s 2 supports instances C5 and I3.S= 3: The ECs are sliced such that slices s 1 and s 2 support P2 and G3s instances, respectively and slice s 3  supports instances C5 and I3.S= 4: The ECs are sliced such that slices s 1 , s 2 , s 3 and s 4 support P2, G3s, C5 and I3 instances, respectively.The coefficients 1 hi,s were drawn from a continuous uniform distribution on [0, 1] and unless otherwise noted, the results are shown for all of the above scenarios.
We use two bandwidth allocation policies P b of the slice orchestrator as a basis for comparison.The first policy P cp b shares the bandwidth of each AP a among slices proportionally to the ECs' resources that slices have.The second policy P eq b gives an equal share of the bandwidth of each AP a to each slice s.Observe that the COS algorithm computes an approximation vector d * of offloading decisions for both policies (c.f.Theorem 5 and Theorem 8).The results shown are the averages of 300 simulations, together with 95% confidence intervals.

A. System Performance
We start with considering the system performance from the point of view of the slice orchestrator.To do so we define the system performance gain P G(P b ) for an interslice radio allocation policy P b w.r.t. the policy P eq b as . ) > 1, which is due to that the policy P eq b does not take into account that the slices might have different amounts of ECs' resources.We also observe that the policy P * b achieves better performance gain (up to 2.5 times greater) than the policy P cp b because P * b assigns the WDs to slices not only based on the amount of ECs' resources the slices have, but also based on how well the slices are tailored for executing their tasks.This effect is especially evident when there are few WDs, because in this case WDs tend to offload their tasks, and thus the system cost is mostly determined by the offloading cost.

B. Computational Cost
Figure 5 shows the number of iterations in which the COS algorithm computes a decision vector d * as a function of the number N of WDs under the optimal P * b , the cloud proportional P cp b and the equal P eq b inter-slice radio allocation policy of the slice orchestrator.
Interestingly, the number of updates decreases with the number S of slices.This is due to that the congestion on the logical resources decreases as S increases, and thus the COS algorithm updates the offloading decisions less frequently.We also observe that the number of updates scales approximately linearly with N under all considered policies of the slice orchestrator, and thus we can conclude that the COS algorithm is computationally efficient, which makes it a good candidate for computing an approximation d * to the optimal vector d of offloading decisions of WDs.

C. Performance Within the Slices
We continue with considering the performance from the point of view of the slices.For an inter-slice radio allocation policy P b , we denote by n s (P b ) the number of offloaders per slice in the vector d * of offloading decisions computed by the COS algorithm and we define the cost ratio CR s (P b ) per slice w.r.t. the system cost as Figure 6 and Figure 7 show n s (P b ) and CR s (P b ), respectively for the optimal P * b , the cloud proportional P cp b and the equal P eq b inter-slice radio allocation policy of the slice orchestrator.The results are shown for S = 2 and the red lines in Figure 7 show the share of the ECs' resources among the slices s 1 and s 2 (i.e, slices s 1 and s 2 have approximately 72% and 28% of the resources, respectively).We observe from Figure 6 and Figure 7, respectively that the gap between n s1 (P b ) and n s2 (P b ) and the gap between CR s1 (P b ) and CR s2 (P b )  are highest in the case of the policy P cp b and lowest in the case of the policy P eq b .Therefore, WDs whose tasks are a better match with the EC resources in slice s 2 than those in slice s 1 cannot fully exploit the ECs' resources in slice s 2 under the policy P cp b , which allocates bandwidth resources proportionally to the ECs' resources.Similarly, WDs whose tasks are a better match with the EC resources in slice s 1 than in slice s 2 cannot fully exploit the ECs' resources in slice s 1 under the policy P eq b , which allocates bandwidth resources equally.On the contrary, the results show that the optimal policy P * b finds a good match between the EC resources in the slices and the WDs' preferences for different types of computing resources, which makes it a good candidate for dynamic resource management for network slicing coupled with edge computing.

V I I . R e l at e d Wo r k
Closest to our work a recent game theoretic treatments of the computation offloading problem [32], [33], [34], [35], [36].In [32] the authors considered devices that compete for cloud resources so as to minimize their energy consumption, and proved that an equilibrium of offloading decision can be computed in polynomial time.In [33] the authors considered devices that maximize their performance and a profit maximizing service provider, and used backward induction for deriving near optimal strategies for the devices and the operator.In [34] the authors considered that devices can offload their tasks to a cloud through multiple identical wireless links, modeled the congestion on wireless links, and used a potential function argument for proposing a decentralized algorithm for computing an equilibrium.In [35] the authors considered that devices can offload their tasks to a cloud through multiple heterogeneous wireless links, modeled the congestion on wireless and cloud resources, showed that the game played by devices is not a potential game and proposed a decentralized algorithm for computing an equilibrium.In [36] the authors modeled the interaction between devices and a single network operator as a Stackelberg game, and provided an algorithm for computing a subgame perfect equilibrium.Unlike these works, we consider the computation offloading problem together with network slicing and we analyze the interaction between the network operator and the slices.
Another line of works considers the network slicing resource allocation problem [37], [38], [39], [40], [41].In [37] the authors considered an auction-based model for allocating edge cloud resources to slices and proposed an algorithm for allocating resources to slices so as to maximize the total network revenue.In [38] the authors considered the radio resources slicing problem and proposed an approximation algorithm for maximizing the sum of the users' utilities.In [39] the authors modeled the interaction between slices that compete for bandwidth resources with the objective to maximize the sum of their users' utilities, and proposed an admission control algorithm under which the slices can reach an equilibrium.In [40] the authors proposed a deep learning architecture for sharing the resources among network slices in order to meet the users' demand within the slices.In [41] the authors considered a radio access network slicing problem and proposed two approximation algorithms for maximizing the total network throughput.Unlike these works, we consider a slicing enabled edge system in which the slice resource orchestrator assigns WDs to slices and shares radio resources across slices, while the slices manage their own radio and computing resources with the objective to maximize overall system performance.
To the best of our knowledge ours is the first work to consider slicing and computation offloading to edge clouds jointly, capturing the interaction between the slice resource orchestrator and the slices.

V I I I . C o n c l u s i o n
We have considered the computation offloading problem in an edge computing system under network slicing in which slices jointly manage their own communication and computing resources and the slice resource orchestrator manages communication resources among slices and assigns the WDs to slices.We formulated the problem of minimizing the sum over all WDs' task completion times as a mixed-integer problem, proved that the problem is NP-hard and proposed a decomposition of the problem into a sequence of optimization problems.We proved that the proposed decomposition does not change the optimal solution of the original problem, proposed an efficient approximation algorithm for solving the decomposed problem and proved that the algorithm has bounded approximation ratio.Our numerical results show that the proposed algorithm is computationally efficient.They also show that dynamic allocation of slice resources is essential for maximizing the benefits of edge computing, and slicing could be beneficial for improving overall system performance.

Fig. 1 .
Fig. 1.An example of a slicing enabled MEC system that consists of N = 7 WDs, C = 2 ECs and A = 3 APs and S = 4 slices.

I
V .N e t wo r k S l i c e O rc h e s t r at i o n a n d E d g e R e s o u rc e A l l o c at i o n min P b ,P wa ,P wc C(d, P b , P wa , P wc ) = min P b min Pw a ,P wc C(d, P b , P wa , P wc ) (34) Proof.The result follows from the proofs of Lemma 1, Proposition 1 and Proposition 2.
min d,P b ,P wa ,P wc C(d, P b , P wa , P wc ) = min d min P b min Pw a ,P wc C(d, P b , P wa , P wc ) (35)

Fig. 2 .
Fig.2.An example of the potential implementation of a resource allocation and orchestration framework.

Since ( 51 )
holds for any vector d * ∈ D * of offloading decisions computed by the COS algorithm and for any vector d ∈ D of offloading decisions of the WDs, it holds for the worst vector d * = arg max d∈D * C(d) of offloading decisions that can be computed using the COS algorithm and for the optimal d = arg min d∈D C(d) solution too.Therefore, by solving (51) we obtain that the cost approximation ratio C(d * ) C( d) of the COS algorithm is upper bounded by (3 + √ 5)/2 ∼ = 2.62, which proves the theorem.

Figure 4 shows
Figure 4 shows P G(P b ) as a function of the number N of WDs for the optimal P * b and for the cloud proportional P cp b allocation policy of the operator.We observe that P G(P * b ) = P G(P cp b ) = 1 when S = 1 because the three solutions are equivalent when there is no slicing.On the contrary, for S > 1 we observe that P G(P * b ) > 1 and P G(P cp b) > 1, which is due to that the policy P eq b does not take into account that the slices might have different amounts of ECs' resources.We also observe that the policy P * b achieves better performance gain (up to 2.5 times greater) than the policy P cp b because P * b assigns the WDs to slices not only based on the amount of ECs' resources the slices have, but also based on how well the slices are tailored for executing their tasks.This effect is especially evident when there are few WDs, because in
can be satisfied and a policy P b for setting the inter-slice radio resource provisioning coefficients b s a , ∀a ∈ A, ∀s ∈ S. Then the solution to the problem an improvement step of WD i and the last inequality follows from the fact that Ψ(d i , d −i ) ≥ C min for any vector d of offloading decisions.Therefore, from (47) we obtain Ψ(d * i , d −i ) ≤ (1+ C max C min ), i.e., the COS algorithm decreases the potential function by at least a factor of (1+ C max C min ).Next, observe that from the definition of the constants C max and C min we have ≤ e n holds for x, n ≥ 1, we obtain that after every n C min C max iterations of the COS algorithm (1 + C max C n x min ) n C min C max ≤ e n , and thus every n C min C max