## 4 Problem Solution
### Problem Conversion
 \tag{32}\]  
As the \(i(t)\)-th (\(i(t)\) denotes user \(\forall i\in K\) in each time block \(\forall t\in\mathcal{T}\)) subproblem is convex and satisfies the Slater condition, we can derive the optimal solution according to the lemma as follows. **Lemma 1**. : _For the optimal Lagrange multiplier \(\theta^{*}(t)\) and the optimal solution (\(q_{i}^{*}(t)\), \(a_{i}^{*}(t)\)), it follows that:_  
\[a_{i}^{*}(t)=\sqrt{\frac{\log_{2}\Bigl{(}1+\frac{p_{i,\rho}(t)h_{i,\rho}(t)}{ \sigma^{2}}\Bigr{)}\theta^{*}(t)}{(\eta_{i}P_{d}(t)g_{i,d}(t)+p_{i,\rho}(t)+p_ {c,i})Z_{i}(t)}} \tag{33}\]  
\[q_{i}^{*}(t)=Z_{i}(t)-\sqrt{\frac{T^{2}(\eta_{i}P_{d}(t)g_{i,d}(t)+p_{i,\rho}( t)+p_{c,i}+\varepsilon C_{i}H(t)+\varepsilon\omega^{\prime}{}_{i}(t))}{3\zeta_{i}C_{i}^ {3}\epsilon\log_{2}\Bigl{(}1+\frac{p_{i,\rho}(t)h_{i,\rho}(t)}{\sigma^{2}} \Bigr{)}}} \tag{34}\]  
**Proof of Lemma 1. ** See Appendix A. \(\square\)  
We define \(F(\theta^{*}(t))=\alpha_{i}^{*}(t)\), where  
\[F(\theta^{*}(t))=\sqrt{\frac{\log_{2}\Bigl{(}1+\frac{p_{i,\rho}(t)h_{i,\rho}( t)}{\sigma^{2}}\Bigr{)}\theta^{*}(t)}{(\eta_{i}P_{d}(t)g_{i,d}(t)+p_{i,\rho}(t)+p_ {c,i})Z_{i}(t)}} \tag{35}\]  
At the optimal primal-dual solution, we get the following equation \(\sum_{i=1}^{K}(\frac{1}{a_{i}(t)}-\varepsilon)-B=0\). Then, we can define \(h(\theta^{*}(t))\) as follows:  
\[h(\theta^{*}(t))=\sum_{i=1}^{K}(\frac{1}{F(\theta^{*}(t))}-\varepsilon)-B=0 \tag{36}\]  
To obtain the root of the function, we can use some existing numerical computing methods, such as Bisection and Secant techniques, are used. Nevertheless, the secant-method needs to first find an initial solution that is close enough to the unique root of the function. Since our function \(h(\theta^{*}(t))\) is monotonically decreasing, we thus adopt the Bisection technique to obtain the only solution of the equation \(h(\theta^{*}(t))=0\) in the open interval (\(0\), \(R(t)\)), where \(h(R(t))<0\). The number of iterations to implement a fixed accuracy in Bisection technique is \(\log_{2}\Bigl{(}\frac{R(t)}{\xi}\Bigr{)}\). The time cost of evaluating \(h(\theta^{*}(t))\) in each iteration is \(O(K)\). Therefore, the time complexity of Algorithm 1 is \(O(K)\). Then, \(\alpha_{i}^{*}(t)\) is obtained by (33). The pseudo code of Algorithm 1 is as follows. ```
0:\(R(t)\): the upper limit of solution interval; \(\xi=0.005\): the tolerance;
0: The optimal Lagrange multiplier \(\theta^{*}(t)\);
1:\(a\gets 0,b\gets R(t)\);
2:\(\theta^{*}(t)\leftarrow\frac{a}{2}+\frac{b}{2}\);
3:while\(|a-b|\geq\xi\) and \(h(\theta^{*}(t))\
eq 0\)do
4:if\((h(\theta^{*}(t))h(b)<0)\)then
5:\(a\leftarrow\theta^{*}(t)\);
6:else
7:\(b\leftarrow\theta^{*}(t)\);
8:endif
9:\(\theta^{*}(t)\leftarrow\frac{a}{2}+\frac{b}{2}\);
10:endwhile
11:return\(\theta^{*}(t)\)
```  
**Algorithm 1** Bisection Algorithm for Optimal Lagrangian  
According to the obtained optimal value \(\alpha_{i}^{*}(t)\), based on \(\alpha_{i}(t)=\frac{1}{\beta_{i\mu}(t)}\), \(Q_{i}(t)=q_{i}(t)\alpha_{i}(t)\), \(T_{i,h}(t)+\frac{q_{i}(t)}{\beta_{i\mu}(t)\log_{2}\left(1+\frac{P_{i\mu}(t)h_{ i\mu}(t)}{\sigma^{2}}\right)}=T\), the residual energy for user \(i\) in each time block can be expressed as:  
\[ \begin{array}{c}E_{i}^{rem}(t)(q_{i}(t))=\eta_{i}TP_{d}(t)g_{i,d}(t))\frac{ \zeta_{i}C_{i}^{3}(Z_{i}(t)-q_{i}(t))^{3}}{\frac{T^{2}}{q_{i}(t)}}\\ -(\eta_{i}P_{d}(t)g_{i,d}(t)+p_{i,\sigma}(t)+p_{c,\lambda})(\frac{q_{i}(t)}{ \beta_{i\mu}^{*}(t)\log_{2}\left(1+\frac{P_{i\mu}(t)h_{i\mu}(t)}{\sigma^{2}} \right)})\end{array}  \tag{37}\]  
Substituting \(\alpha_{i}^{*}(t)\) into the primary problem P1, a constrained convex optimization problem P5 with only variable \(q_{i}(t)\) can be obtained, it follows that  
\[