{'fraction_non_alphanumeric': 0.04620008587376556, 'fraction_numerical': 0.01328180907399456, 'mean_word_length': 4.352535621265512, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Min-Max Latency Optimization for IRS-aided Cell-Free Mobile Edge Computing Systems

Mobile-edge computing (MEC) is expected to provide low-latency computation service for wireless devices (WDs). However, when WDs are located at cell edge or communication links between base stations (BSs) and WDs are blocked, the offloading latency will be large. To address this issue, we propose an intelligent reflecting surface (IRS)-assisted cell-free MEC system consisting of multiple BSs and IRSs for improving the transmission environment. Consequently, we formulate a min-max latency optimization problem by jointly designing multi-user detection (MUD) matrices, IRSs' reflecting beamforming vectors, WDs' transmit power and edge computing resource, subject to constraints on edge computing capability and IRSs phase shifts. To solve it, an alternating optimization algorithm based on the block coordinate descent (BCD) technique is proposed, in which the original non-convex problem is decoupled into two subproblems for alternately optimizing computing and communication parameters. In particular, we optimize the MUD matrix based on the second-order cone programming (SOCP) technique, and then develop two efficient algorithms to optimize IRSs' reflecting vectors based on the semi-definite relaxation (SDR) and successive convex approximation (SCA) techniques, respectively. Numerical results show that employing IRSs in cell-free MEC systems outperforms conventional MEC systems, resulting in up to about 60% latency reduction can be attained. Moreover, numerical results confirm that our proposed algorithms enjoy a fast convergence, which is beneficial for practical implementation.


I. INTRODUCTION
Recently, the rapid development of the internet of thing (IoT) and artificial intelligence (AI) techniques have enabled various new applications (such as natural language processing, face/fingerprint recognition, autonomous driving, 3D media, etc.) based on real-time communication. Generally, these applications require low latency and need more computing resources. However, this is challenging for IoT devices due to their limited computing capabilities [1]- [3]. To address this challenge, mobile edge computing (MEC) was proposed, where the computing tasks of IoTs devices can be offloaded to the edge servers that are usually equipped with huge computing resources [4]- [7]. However, the transmission latency needs to be considered in a MEC system, which is determined by the offloading links. When wireless devices (WDs) are located at the cell edge or communication links between base stations (BSs) and WDs are blocked, the offloading links will be poor, which leads to large transmission latency. Therefore, it is crucial to study how to improve the wireless communication environment for further exploiting the potential of MEC systems.
To provide better offloading links, the ultra-dense network (UDN) architecture with a lot of small BSs can be applied in order to shorten the distances between BSs and WDs or provide direct links between them [8]. However, as the number of BSs increases, inter-cell interference becomes the bottleneck [9]- [12]. Thus, the user-centric-based cell-free network structure is proposed, where BSs simultaneously serve all WDs to avoid the multi-cell interference. On the other hand, the energy consumption and hardware cost are still high for the cell-free network due to the deployment of massive BSs. Recently, an intelligent reflecting surface (IRS) composed of a large number of low-power passive reflecting elements was developed, which can focus signal energy in the desired spatial direction by adjusting phase shifts, thus enlarging the wireless converge [13]- [16]. Therefore, to reduce the system cost, some BSs can be replaced by IRSs. In this paper, we will investigate the latency optimization problem in the IRS-aided cell-free MEC systems.

A. Related Works
Recenty, there have been many works focusing on MEC. Initially, the binary offloading model was considered, and each computation task is treated as a whole. Specifically, Zhang et al. [17] investigated to minimize the energy consumption (EC) of a single user by dynamically configuring the clock frequency of the local central processing unit (CPU) for local computing and varying the offloading rate for cloud computing according to the stochastic channel condition. Then, Wang et al. [18] extended the single-user MEC system to the multi-user one, and aimed to minimize the weighted sum of all users' EC. For the binary offloading model, the offloading design in multi-user MEC is usually a typical mixed-integer nonlinear programming problem that is usually nonconvex. To deal with it, the authors in [18] proposed a low-complexity two-stage algorithm by iteratively optimizing the offloading decision and resource allocation. The authors in [19]- [21] formulated the offloading decision optimization problem as a multi-user noncooperative computing offloading game, and then an effective algorithm based on game theory was proposed. The authors in [22], [23] considered a partical offloading model, in which a task can be further divided into multiple modules, which can be performed locally or remotely. The weighted sum of EC and computing latency was minimized by jointly optimizing offloading decision and CPU frequency in [22], or offloading desicion and transmit power as in [23]. Additionally, several researchers also investigated the edge computing problem under multi-tier computing systems. For example, the authors in [24]- [26] integrated cloud computing with MEC and proposed a three-tier system model ( "terminal-edge-cloud" ). Particularly, Ning et al. [24] considered both single-user and multi-user scenarios, and for the single-user scenario, a branch and bound algorithm was proposed. For the multiuser scenario, an iterative heuristic MEC resource allocation algorithm was developed for making the offloading decision dynamically. In [25], the optimal offloading node selection problem was formulated as a Markov decision process, and then an iterative optimization algorithm was proposed. Gao et al. [26] considered a three-tier system consisting of multiple WDs, multiple edge nodes, and a central cloud, and then proposed two offloading algorithms by iteratively optimizing the WD-edge matching strategy and resource allocation.
Additionally, there are several works investigating edge computing problem in IRS-aided MEC systems. Haber et al. [27] proposed an IRS-aided single-user MEC system, where the computing task can be offloaded to multiple MEC nodes for guaranteeing high reliability. Later, Sun et al. [28] considered both the flat-fading channel and frequencyselective channel model under the IRS-aided multi-user MEC scenario, and proposed an alternating optimization algorithm to minimize users' energy consumption. The authors in [29], [30] investigated the energy consumption problem, where, compared with the conventional MEC system, about 80% energy consumption reduction was achieved in the proposed IRS-aided wireless powered MEC system. Besides, to avoid the interference among WDs, the authors in [31], [32] applied the time division multiple access protocol in the computing offloading stage. Similarly, the authors of [31] also considered the IRS-aided wireless powered MEC system, and they jointly optimized downlink/uplink IRS reflecting beamforming vector, transmit power, time allocation for energy transmission of downlink and computing offloading of uplink, and local CPU frequency. In [32], the authors jointly optimized offloading time, CPU frequency, transmit power, and IRS phase shift vector in the IRS-aided MEC system. Note that both [31] and [32] aim to maximize the total computation data bits of all users. To minimize the total latency, Zhou et al. [33] proposed a new flexible timesharing non-orthogonal multiple-access (NOMA) scheme, in which the offloading data can be divided into two parts, and then the optimal solution was obtained for both the cases of finite and infinite edge computation capacities.
Based on the above brief literature survey, we note that, although there have been several works considering the latency problem in IRS-aided MEC system, WDs' fairness was not investigated. Furthermore, for future IRS-aided cellfree MEC systems, how to jointly optimize multiple BSs' received matrix, multiple IRSs' reflecting beamforming, WDs' transmit power and edge computing resource based on WDs' fairness is challenging.

B. Contributions
In this paper, considering WDs' fairness during the computation offloading, we investigate the min-max WD's latency in IRS-aided cell-free MEC systems, and the main contributions are summarized as follows.
• We investigate the latency minimization problem in the designed IRS-aided cell-free MEC systems. To guarantee the WDs' fairness, we formulate a min-max WD's latency optimization problem by jointly designing offloading date size, edge computing resource, multi-user detection (MUD) matrix and reflecting beamforming vector. Meanwhile, the limited edge computing resource is considered. Since it is challenging to directly solve the formulated optimization problem, the block coordinate descent (BCD) technique is adopted to decouple it into two subproblems based on the alternate optimization approach. • The first subproblem is to jointly optimize the offloading data size and edge computing resource based fixed MUD matrix and reflecting beamforming vector. To solve it, we first analyze the relation between offloading data size and edge computing resource, and then transform it into a convex optimization problem with the aid of the bisection search method. Next, an iterative algorithm is proposed to solve the first subproblem. • The second subproblem is to jointly optimize the MUD matrix and reflecting beamforming vector based on obtaining offloading data size and edge computing resource from the first subproblem. To solve it, we propose an alternate optimization iterative algorithm based on MUD matrix and reflecting beamforming vector. Then, we solve for the MUD matrix based on the second-order cone programming (SOCP) technique, and solve for the reflecting beamforming vector based on the semi-definite relaxation (SDR) and successive convex approximation (SCA) techniques. Finally, two subproblems are alternately and iteratively solved until convergence. Furthermore, we analyze the convergence of the proposed schemes. The rest of this paper is organized as follows. Section II introduces the system model and the formulated problem. In Sections III, we develop an alternating algorithm for solving the formulated min-max latency optimization problem. Section IV investigates the latency optimization problem in an IRS-aided cell-free MEC system with single WD. Section V   Euclidean norm / 2-norm V 0 Positive semi-definite matrix Re Real part Im Imaginary part .
The floor operations .
The ceiling operations Vm,n The element of V in the m-th row, n-th row. The total latency induced by the data offloading and edge computing provides the performance evaluation. Finally, the conclusions are given in Section VI. For clarity, we list the mathematical operations adopted throughout this paper in Table I.

A. Communication Model
As shown in Fig. 1, we consider an IRS-aided cell-free MEC system, where multiple distributed BSs cooperatively serve WDs with the help of IRSs. All IRSs and BSs are connected to a central processing unit by high-throughput optical cables. The considered system consists of . . , K} denote the index sets of IRS elements, BSs, IRSs, and WDs, respectively. We consider a block-fading channel model, where the wireless channels remain constant during the current time block but change over different time blocks, and assume that the channel state information (CSI) of all involved channels are available by using existing advanced channel estimation methods [34], [35].
The direct channel vector from the k-th WD to the b-th BS is denoted by h d,b,k ∈ C M ×1 , and the reflect channel vectors from the k-th WD to the i-th IRS and the i-th IRS to the b-th BS are denoted by h r,i,k ∈ C N ×1 and G b,i ∈ C M ×N , respectively. The phase shift coefficient vector of the i-th IRS is denoted by T , where θ i,n ∈ [0, 2π) for all i ∈ I and n ∈ N . Then, the diagonal reflecting matrix of the i-th IRS is given by where β i,n ∈ [0, 1] stands for the reflection amplitudes of the IRS elements and each of them is fixed to one for maximizing the reflected signal power. Thus, the combined effective channel from the k-th WD to the b-th BS can be defined as Let P t and s = [s 1 , s 2 , ..., s K ] T denote the offloading power and signal of K WDs, respectively. Here, we assume that all WDs transmit the same power for simplicity as in [36]. Let w b,k ∈ C M ×1 denote the MUD vector of the b-th BS for the k-th WD. Hence, the detected signal at BSs for the k-th WD can be formulated aŝ hjsj + n , and the corresponding achievable rate is given by

B. Computing Model
In this paper, the partial offloading scheme is considered, and the computing models for both local and edge processing are presented, respectively.
• Local computing: Let f l k , L k , k and c k denote the CPU-cycle frequency (cycles/s), total computing data size, offloading data size, and computational complexity of input data for the k-th WD, respectively. Thus, the latency imposed by local computing is formulated as The latency for edge computing usually includes three parts: a) offloading latency for transmitting computing data to BSs; b) processing latency for executing offloaded data at MEC server; c) return latency for transmitting computing results to WDs. Let f e total and f e k denote the total computing resource of MEC server and the computing resource allocated to the k-th WD, respectively, satisfying K k=1 f e k ≤ f e total . Here, we ignore the return latency since the returning results are usually of small size [18], [37]. Therefore, the total latency for edge processing can be written as On this basis, the overall latency for the k-th WD can be formulated as: (6)

C. Problem Formulation
Considering WDs' fairness, we minimize the maximum WD's latency by jointly optimizing offloading data size .., f e K ] T , MUD matrix W, and reflecting beamforming vector θ, which can be formulated as where (7a) is IRS reflection coefficients constrains, (7b) implies that the k-th WD's offloaded data size should be an integer between zero and the total input data L k . (7c) denotes the computing resource allocated to all WDs should not exceed the total edge computing resource. (7e) represents unit-norm detection vector constrains for the k-th WD. It is clear that P0 is difficult to be directly solved. Next, we first introduce an auxiliary variable t to transform P0 into the following P1, given as Remark 1: Although the objective function (OF) of P1 and constraints in (8b) are linear, it is still challenging to directly solve P1 due to the following three aspects: a) the segmented form of (8a), b) MUD matrix W and reflecting beamforming vector θ are coupled together, c) (8a) is nonconvex with respect to θ. In general, there is no standard method to find a globally optimal solution of such a nonconvex optimization problem. To proceed, we develop an iterative framework to obtain a locally optimal solution. Specifically, the segmented form of (8a) is reformulated as a linear form relying on the BCD technique. Then, fixing the computing setting, we optimize the MUD matrix and reflecting beamforming vector alternately. Finally, we develop two efficient algorithms based on SDR and SCA techniques to obtain a locally optimal solution of θ, respectively.

III. PROBLEM SOLUTIONS
In this section, we first divide P1 into two independent subproblems relying on the BCD technique. Specifically, given W and θ, the offloading data size and edge computing resource f e are optimized. Then, based on the obtained and f e , the MUD matrix W and reflecting beamforming vector θ are optimized. The above procedure is repeated until convergence.
A. Jointly Optimizing and f e for Given W and θ For given W and θ, P1 can be reformulated as follows Based on the following Proposition 1, we optimize the offloading data size . Proposition 1: For given f e , the optimal offloading data size is given by * where . and . denote the floor and ceiling operations, respectively, and the value ofˆ * k is selected for ensuring that After obtaining the relation between offloading data size and edge computing resource, we substitute (11) into (9a), then P2 can be written as: Note that P2.1 is a non-convex problem. To proceed it, we first reformulate (12a) as L k c 2 Then, with the help of a bi-Algorithm 1 Joint optimization scheme for solving P2 Input: h k , B, p t , σ 2 , L k , c k , K, f e total , 1 , W, and θ Output: Optimal and f e 1. Initialization Initialize l 1 = 0, calculate R k according to (5), ∀k ∈ K 2. Joint optimization of t and f e repeat: Calculate t (l1) using the bisection search method Solving P2.2 to obtain optimal f e(l1) Update l 1 ← l 1 + 1 until Convergence 3. Calculate k using (11), ∀k ∈ K section search over t, P2.1 can be equivalently transformed into the following feasibility problem, given as where t l1 is the value of t at the l 1 -th iteration. For a given latency target t l1 , the above optimization problem is convex, and thus the global optimal solution of P2.2 can be found via existing convex optimization techniques, e.g., CVX solver. Note that if P2.2 is feasible, the given latency t can be achieved. Assuming that the optimal solution of P2.1 ist, we can infer that, for any given t, if P2.2 is feasible, we have t ≥t, while if P2.2 is infeasible, we have t ≤t. Therefore, with the aid of a bisection search over t, P2.1 can be equivalently solved by checking the feasibility of P2.2 for a given t ≥ 0.
In summary, the procedure for solving P2 is presented as Algorithm 1.

B. Jointly Optimizing W and θ for Given and f e
Based on obtaining and f e , P1 can be simplified as Remark 2: Solving P3 involves a joint optimization of MUD matrix W, reflecting beamforming vector θ and latency t, which is challenging. Next, we develop an alternately iterative optimization algorithm to solve P3. 1) Optimization of MUD Matrix W: For given reflecting beamforming vector θ, P3 can be rewritten as Since P3.1 is still non-convex, we introduce the following feasibility-check problem P3.2 by fixing t like P2.1.
Assuming that the optimal solution of problem P3.1 is t * , similar to the analysis in Section III A, for any given t ≥ t * , t is a feasible solution to P3.2. Whereas, if t ≤ t * , P3.2 is infeasible. Thus, with the aid of a bisection search over t ≥ 0, P3.1 can be solved equivalently by checking the feasibility of P3.2.
Next, we investigate how to solve P3.2. The inequality in (15a) can be rewritten as where t c,k = k c k /f e k . According to (17), it is clear that for a feasible solution {w k }, P3.2 is still feasible after any phase rotation. Here, we select a set of {w k }, satisfying Let Re (x) and Im (x) denote the real and imaginary parts operation. The real part and imaginary part of w H k (h d,k + GΘh r,k ) are non-negative and zero, respectively, i.e., Re w H k (h d,k + GΘh r,k ) ≥ 0 and Im w H k (h d,k + GΘh r,k ) = 0. Then, we define a matrix A, in which the (j, k)-th element is √ p t w H k (h d,j + GΘh r,j ). Let . 2 denote the 2-norm of a vector, and thus (17) can be reformulated as where e k ∈ C K×1 represents a vector, in which the kth element is one and other elements are zero. Hence, for a given t at the l-th iteration, P3.2 can be equivalently expressed as It is not difficult to observe that P3.3 is an SOCP problem and can be solved using the existing standard convex optimization techniques (i.e., CVX solver) [38].
2) Optimization of Reflecting Beamforming Vector θ: Different from solving W, the SOCP technique cannot be used to find the optimal θ since Θ is common, resulting in w H k (h d,k +GΘh r,k ) cannot be ensured to be real numbers for all k ∈ K.
To proceed, After obtaining W, P3 can be reformulated as P3.4 is still difficult to be solved directly due to non-convex constraints (22a) and (22b). Next, we develop two effective schemes based on SDR and SCA techniques to solve it.

Solving P3.4 Based on SDR
To solve P3.4, we first reformulate it as where α k (t) = 2 k B t− k c k f e k − 1, R k,j and v are defined as respectively. Define V = vv H , which needs to satisfy V 0 and rank(V) = 1. Accordingly, P3.5 can be re-expressed as P3.6 : min (25a) V n,n = 1, n = 1, ..., IN + 1, where Tr(.) represents the trace operation. P3.6 is nonconvex due to the rank-one constraint. To proceed it, we relax this rank-one constraint and solve P3.6 by solving the following feasibility problem based on the above analysis, with a bisection search over t, which is formulated as where t l2 is the value of t at the l 2 -th iteration. It is obvious that P3.7 is a classical SDR problem, and the optimal solution can be found by CVX solver. However, the SDR may not be tight for P3. 6. In this case, we can use the Gaussian randomization technique [39] to obtain a feasible solution to P3.6 based on the high-rank solution obtained in P3.7.
In summary, we solve P3 by alternately solving P3.1 and P3.4, and the detailed procedure is presented in Algorithm 2. For each iteration, P3.1 is first solved based on obtained θ at the previous iteration, and then P3.4 is solved based on obtained W in step 3. We start from solving P3.1 instead of solving P3.4 because P3.1 is always feasible under any given θ, but the reverse may not be true. Furthermore, the rigorous proof of convergence is provided in Proposition 2.
Proposition 2: The OF of P3 is monotonically nonincreasing based on the proposed Algorithm 2.
Proof: See Appendix B. Remark 3: When the solution of P3.7 is not rank-one, we need to reconstruct a rank-one solution by leveraging the Gaussian randomization procedure. Therefore, the performance of the reconstructed solution critically depends on the generated Gaussian randomization number. For example, due to the uncertainty in randomizations, we may find a highly suboptimal solution to P3.4, which will lead to a compromised performance. In addition, to find a better solution, we need to generate a large number of Gaussian randomizations. Besides, solving the SDR problem is timeconsuming, especially when the matrix dimension is large. Therefore, in order to reduce the computational complexity and guarantee performance, we need to further develop an efficient algorithm.

Solving P3.4 Based on SCA
To overcome the drawbacks of the SDR technique, we propose an efficient scheme to update the reflecting beamforming vector v based on the SCA technique. Instead of solving P3.4 directly, we try to find a feasible solution v to reduce the maximum edge computing latency. Particularly, for a specific iteration l ≥ 1, we first define v (l−1) as the value of v obtained at the previous Under given t (l2) , θ (l2) , solving P3.1 to obtain t and W , and set t * (l2) = t , W (l2) = W

3:
Under given t * (l2) , W (l2) , solving P3.4 to obtain t and θ , and set t (l2+1) = t , θ (l2+1) = θ 4: Update l 2 ← l 2 + 1 5: until Convergence iteration. Then, for given w l k , v (l−1) , the achieved maximum WD's edge computing latency is denoted by t (l) = max k∈K D e k w l k , v (l−1) . Firstly, according to (22a), we introduce an auxiliary function F k , which is defined as If (v, {w k } , t) is a set of feasible solutions to P3.4, we have F k ≤ 0, ∀k ∈ K. After solving P3.1 at each iteration, the maximum F k at WDs is equal to 0, i.e., , t (l) = 0. Consequently, the reflecting beamforming vector can be updated by equivalently solving the following optimization problem , i.e., the maximum edge computing latency is reduced. Thus, P3.4 can be equivalently solved by solving P3.8. Next, we investigate how to solve P3.8.
Since the OF of P3.8 is non-convex, it is difficult to solve P3.8 directly. Inspired by the SCA technique, we first obtain a convex upper bound on F k by approximating the second convex term based on its first-order Taylor expansion. Therefore, under given t (l) , w (l) k , and local point v (l−1) , the lower bounded of F k is Algorithm 3 Joint optimization of t, W and θ with SCA technique Input: Initialize the phase shift vector v (0) , set l 3 = 1 and accuracy threshold 3 > 0. 1: repeat: 2: Under given t (l3−1) , v (l3−1) , solve P3.1 to obtain t and W , and set t (l3) = t , W (l3) = W

3:
Under given t (l3) , W (l3) , solve P3.9 to update v, and set v l3 = v 4: and introduce another auxiliary variable z, P3.8 can be approximated as So far, we have transformed P3.8 into a convex form, which can be solved by existing convex optimization solvers such as CVX [38]. Suppose that v * is the optimal solution to P3.9. By substituting (v * , w (l) k , t (l) ) into P3.8, it is observed that the feasible solution of P3.9 is still feasible to P3.8, and thus solving P3.9 can achieve a smaller value than solving P3.8. The details of the SCA-based algorithm are presented in Algorithm 3.

IV. THE SINGLE WD SCENARIO
To further investigate the beneficial role of IRS in the cell-free MEC system, we consider a single WD scenario in this section. Compared with the multi-WD scenario, the single-user scenario is more tractable. This is because a) the min-max latency optimization problem P0 becomes a simple latency minimization problem, which is more tractable, b) there is no involved computing resource allocation, c) there is no multi-WD interference. Thus, the overall latency is reformulated as On this basis, P0 is simplified to Like Proposition 1, fixing w and θ, D(w, θ, ) reaches its minimum threshold when is chosen to ensure that local computing latency is equivalent to edge compting latency, i.e., (L− )c Thus, the optimal offloading data size is given bŷ * = LcRf e total f e total f l + cR (f e total + f l ) .
Based on (4) and (5), P4.1 can be simplified to Next, we jointly optimize w and θ by using the BCD technique. Specifically, fixing θ, the maximum ratio combining (MRC) technique can be applied to find optimal w, which is formulated as Then, after obtaining w, we optimize the reflecting beamforming vector θ. The SINR is upper bounded by Algorithm 4 Joint Optimization of , f e , W and θ Input: h k , B, p t , σ 2 , L k , c k , K, f e total , and 4 . Output: Optimal , f e , W and θ 1. Initialization Initialize l 4 = 1, 4 ≥ 0 Initialize W (0) satisfying (7e), θ (0) satisfying (7a), and calculate R k according to (5), ∀k ∈ K 2. Joint optimization of t, and f e , given R (l4−1) Calculate f e(l4) and (l4) and update t relying on Algorithm 1 3. Joint optimization of t, W and θ, given (l4) and f e(l4) Calculate W (l4) and θ (l4) and update t relying on the Algorithm 2 or Algorithm 3 4. Convergence checking The equality in (37) is achieved when θ satisfies arg w H h d = arg w H GΘh r . Thus, the optimal θ is given by

V. SIMULATION RESULTS
In this section, we evaluate the performance of the proposed algorithms by simulation. Similar to [40], we consider a three-dimensional system model, which is presented in Fig.  3. Five BSs simultaneously serve two WDs, and WDs can choose to offload a portion of the computing data to MEC nodes for remote execution with the help of two IRSs. The detailed location settings for BSs and IRSs are provided in the "Location model" block of Table II. The distance-dependent path loss model is given by [41] L where C 0 = −30dB refers to the path loss at a reference distance d 0 = 1m, d stands for the individual channel distance, κ denotes the path loss exponent. The specific setting is presented in the "Communication model" block of Table II. Then, for the small-scale fading, we consider a Rician fading channel model for all involved channels. Thus, the channel model H is given by where β UB refers to the Rician factor, H LoS and H NLoS denote the LoS deterministic components and the non-LOS Rayleigh fading components, respectively. H is equivalent to a Rayleigh fading channel when β UB = 0 and a LoS channel when β UB → ∞. Note that for the WD-BS channel model, we need to multiply the square root of the large-scale fading coefficient by the elements of the small scale fading coefficient. Similarly, the WD-IRS and IRS-BS channels can also be generated by following the above procedure with β U I and β IB denoting the Rician factors of them. Furthermore, we set β IB → ∞, β U I = 0, and β U B = 0 as [41]. The default settings of these parameters are specified in the "Communications model" block of Table II. Besides, the computing settings follow [36], and are specified in the "Computing model" block of Table II. In the following, we provide simulation results to evaluate the maximum WD's latency achieved by our proposed BCD-based algorithm in various simulation environments, and compare them with the following baseline algorithms: • Without IRS: The reflection matrix Θ is set to a zero matrix, while the other optimization variables are optimized using Algorithm 4. • Without direct link: Assume that all direct links between WDs and BSs are completely blocked by some moving or static object, i.e., H = 0, then, we optimize all variables using Algorithm 4. 1) Impact of WDs' Locations: Fig. 4 shows the latency achieved under different algorithms/schemes versus WDs' locations. It is observed that, compared to baseline algorithms, our proposed two algorithms can achieve a lower latency, especially when WDs are close to IRSs. Besides, for all considered schemes with IRS, there are two obvious valleys at L = 60 m and L = 100 m. This is because IRSs can receive stronger signals transmitted from WDs when WDs approach either of two IRSs. Additionally, we observe that the latency increases when WDs are far away from BSs under the "Without IRS" scheme. Compared to "Without IRS" scheme, the reduced latency by the "Random phase shift" scheme is very limited. Furthermore, it is observed that "Without direct link" scheme achieves the highest latency, and the latency gap is larger than that of the proposed schemes when WDs approach one of two IRSs. Therefore, we conclude that deploying IRSs with optimized phase shift design can extend the signal coverage, improve signal transmission environment, and reduce latency.
2) Impact of Edge Computing Capability: Fig. 5 shows the latency versus the edge computing capability f e total under different schemes. It is observed that, for all schemes, when f e total is small, the latency reduces drastically with the increase of f e total , while the latency reduces slowly when f e total reaches a certain value, i.e., 30 × 10 9 cycle/s. This is because when f e total is small, the edge processing latency plays a dominant role, while when f e total becomes large, the offloading latency dominates. This indicates that, to minimize latency, adding appropriate computing capability at edge server is cost-effective.
3) Convergence: To show the convergency of the proposed algorithms, we present the latency against the number of iterations I o in Fig. 6. It is observed that all the considered algorithms enjoy a fast convergence, which verifies its practical implementation. 4) Impact of WDs' Transmit Power: Fig. 7 shows the latency versus WDs' transmit power p t . It can be readily observed that, for all schemes, the increase of transmit power p t leads to a decrease in latency. Moreover, the reduced latency by employing IRSs is significant when WDs' transmit power is moderate. To elaborate, when WDs' transmit power is low (i.e. -20 dBm), the signals reflected by IRSs are so weak that the contribution of employing IRSs is limited. In addition, the reduced latency by employing IRSs is also negligible when the transmit power is high (i.e., 20 dBm), and this is because the WD-BS link is dominant for high transmit power. Additionally, it can be observed that as the transmit power increases, the latency gap between "Without direct link" scheme and "Without IRS" scheme becomes large. Here, "Without direct link" scheme means that BSs only receive signal transmitted from the WD-IRS-BS links, while "Without IRS" means that BSs only receive signals transmitted from the WD-BS links [41]. This implies that, compared to "Without direct link" scheme, the "Without IRS" scheme can achieve a lower latency. In this case, the BSs will tend to design sophisticated MUD matrix to receive more power from the WD-BS links, which weakens the role of IRSs. 5) Impact of Inter-Cell Interference: It is worth pointing out that the inter-cell interference (ICI) also affects computing offloading in realistic scenarios. Fig. 8 shows the latency versus ICI-to-noise power ratio. It is observed that, when the ICI-to-noise power ratio is small, upon increasing ICIto-noise power ratio, the latency increases. Whereas, when the ICI-to-noise power ratio reaches a certain threshold, (i.e., 30 dB), the latency remains unchanged. This is because that, increasing the ICI-to-noise power ratio, WDs will choose to offload less data for edge computing, and when the ICI-    to-noise power ratio reaches a certain threshold, all data computing will be performed locally. This demonstrates the necessity to eliminate inter-cell interference.

VI. CONCLUSION
In this paper, we aimed to minimize the maximum WD's latency by jointly optimizing offloading data size , edge computing resource f e , reflecting beamforming vector θ, and MUD matrix W, subject to the edge computing capability constraint and IRS phase shift constraint. To address this non-convex problem, we developed a BCD-based algorithm, in which the optimization variables related to the computing and communication setting were solved via an alternating iterative manner. Extensive simulation results verified the benefits of deploying IRSs in MEC systems. In particular, compared with the conventional MEC system, the latency can be effectively reduced from 160 ms to 100 ms for distances L = 60 m and 100 m. Moreover, our simulation results confirmed that our proposed algorithms enjoy a fast convergence, which validates its engineering viability.

APPENDIX A THE PROOF OF PROPOSITION 1
For notational convenience, letˆ k ∈ [0, L k ] denote the relaxation of integer value k ∈ {0, 1, . . . , L k } [42]. In addition, fixing f e , we denote the overall latency of the k-th <ˆ k ≤ L k .
(41) It is obvious that, whenˆ k increases from 0 to , latencyD k ˆ k reduces, whereas, when k increases from to L k , latencyD k ˆ k increases. Thus, when we setˆ k =ˆ * k = L k c k R k f e k f e k f l k +c k R k (f l k +f e k ) , the minimum latency of the k-th WD is achieved. Note that the value of offloading data size has to be a non-negative integer, and thus, we can obtain the optimal k after carrying out the operation * k = arg min