## 4 Decoupled Computation Offloading and Resource Allocation with Coordinate Descent (CD)
To get the optimal allocation scheme for (P2), Lagrange multipliers \(\lambda_{1}\) and \(\lambda_{2}\) and \(\mathbf{\omega}=\{\omega_{m}\}_{m=1}^{|\mathcal{M}_{1}|}\) are introduced, and the Lagrangian function is formulated as:

\[L(p_{m},\alpha,\beta,\lambda_{1},\lambda_{2},\mathbf{\omega})=\sum_{ m\in\mathcal{M}_{1}} e_{m}^{f}(T_{m}^{f}-\frac{l_{m}^{f}}{\alpha_{m}B_{n}\text{log}_{2}(1+ \frac{p_{m}h_{m}^{2}}{\sigma^{2}})}-\frac{\rho_{m}^{f}l_{m}^{f}}{\beta_{m}F_{ e}})+\lambda_{1}(1-\sum_{m\in\mathcal{M}_{1}}\alpha_{m})\] \[\qquad\qquad+\lambda_{2}(1-\sum_{m\in\mathcal{M}_{1}}\beta_{m})+ \sum_{m\in\mathcal{M}_{1}}\omega_{m}(P_{m}^{max}-\text{p}_{m});\]

the Karush-Kuhn-Tucker (KKT) conditions are denoted as:

\[\frac{\partial L}{\partial\alpha_{m}} =\frac{e_{m}^{f}l_{m}^{f}}{\alpha_{m}^{2}B_{n}\text{log}_{2}(1+ \frac{p_{m}h_{m}^{2}}{\sigma^{2}})}-\lambda_{1}=0 \tag{10}\] \[\frac{\partial L}{\partial\beta_{m}} =\frac{e_{m}^{f}\rho_{m}^{f}l_{m}^{f}}{\beta_{m}^{2}F_{e}}- \lambda_{2}=0\] (11) \[\text{s.t.}\quad C1:\;\;f_{n}\leq Fc_{n}\quad,\forall n\in \mathcal{M}_{0}.\]0

\[\text{s.t.}\quad C1:\;\;f_{n}\leq Fc_{n}\quad,\forall n\in \mathcal{M}_{0}.\]1 \[\text{s.t.}\quad C1:\;\;f_{n}\leq Fc_{n}\quad,\forall n\in \mathcal{M}_{0}.\]2 (14) \[\text{s.t.}\quad C1:\;\;f_{n}\leq Fc_{n}\quad,\forall n\in \mathcal{M}_{0}.\]3 (15) \[\text{s.t.}\quad C1:\;\;f_{n}\leq Fc_{n}\quad,\forall n\in \mathcal{M}_{0}.\]4 (16) \[\text{s.t.}\quad C1:\;\;f_{n}\leq Fc_{n}\quad,\forall n\in \mathcal{M}_{0}.\]5 (17) \[\text{s.t.}\quad C1:\;\;f_{n}\leq Fc_{n}\quad,\forall n\in \mathcal{M}_{0}.\]6 (18) \[\text{s.t.}\quad C1:\;\;f_{n}\leq Fc_{n}\quad,\forall n\in \mathcal{M}_{0}.\]7 (19) \[\text{s.t.}\quad C1:\;\;f_{n}\leq Fc_{n}\quad,\forall n\in \mathcal{M}_{0}.\]8

**Corollary 2**. : _The optimal allocation scheme is exhausted because all vacant resources are always allocated to all UDs in \(\mathcal{M}_{1}\). The optimal allocation scheme for \(\mathcal{M}_{1}\) under the optimal \(\lambda_{1}^{*}\) and \(\lambda_{2}^{*}\) is:_

\[\text{s.t.}\quad C1:\;\;f_{n}\leq Fc_{n}\quad,\forall n\in \mathcal{M}_{0}.\]9_where \(\vartheta_{m}=\sqrt{\frac{c_{e}^{f}l_{m}^{f}l_{m}^{s}}{B\log_{2}(1+\frac{\frac{p_{m} \max_{2}^{2}}{\sigma^{2}}})}}\) and \(\zeta_{m}=\sqrt{\frac{c_{e}^{f}l_{m}^{f}l_{m}^{s}}{F_{e}}}\)._

Proof. : Please see the detailed proof in Appendix B. For the sake of illustration, auxiliary functions \(U_{1}(\lambda_{1})\) and \(U_{2}(\lambda_{2})\) used to get \(\lambda_{1}^{*}\) and \(\lambda_{2}^{*}\) are introduced and denoted as

\[\underset{m,m,m,m,m,m,m,m}{Maximize}:H =\sum_{m\in\mathcal{M}_{1}}e_{m}^{f}(T_{m}^{f}-\frac{l_{m}^{f}}{ \alpha_{m}B_{n}\text{log}_{2}(1+\frac{p_{m}h_{m}^{2}}{\sigma^{2}})}-\frac{\rho_ {m}^{f}l_{m}^{f}}{\beta_{m}F_{e}})\]0

\[\underset{m,m,m,m,m,m,m,m}{Maximize}:H =\sum_{m\in\mathcal{M}_{1}}e_{m}^{f}(T_{m}^{f}-\frac{l_{m}^{f}}{ \alpha_{m}B_{n}\text{log}_{2}(1+\frac{p_{m}h_{m}^{2}}{\sigma^{2}})}-\frac{\rho_ {m}^{f}l_{m}^{f}}{\beta_{m}F_{e}})\]1

\(U_{1}(\lambda_{1})\) and \(U_{2}(\lambda_{2})\) are monotonically decreasing with respect to \(\lambda_{1}\) and \(\lambda_{2}\), respectively. Thus, the optimal \(\lambda_{1}^{*}\) and \(\lambda_{2}^{*}\) can be obtained by a bisection search on auxiliary functions \(U_{1}(\lambda_{1})\) and \(U_{2}(\lambda_{2})\). Accordingly, the proposed resource allocation scheme is summarized in Algorithm 2. ## 5 Simulation and Results

In this section, we compare the performance of our proposed linear CD-based algorithm (LCD) with existing schemes and demonstrate the role of the emergency factor in offloading decisions and resource allocation. Additionally, we compare our approach to a DRL-based scheme [29] where the data size of a task was drawn from a distribution with the probability \(p\) on regular size (\([8,10]\) megabits) and \(1-p\) on small size (\([2,4]\) megabits), large size (\([16,25]\) megabits) and immense size (\([70,80]\) megabits).