## 5 Algorithm Design  
From \(\mathcal{P}\), it can be seen that \(y_{i,1}\) and \(f_{i,1}\), \(y_{i,j}\) and \(f_{i,j}\) interact with each other, respectively. Since the variables are coupled, it is necessary to decouple them. Assuming \(y_{i,0}^{*}\), \(y_{i,1}^{*}\), and \(y_{i,j}^{*}\), \(\forall i\in\mathcal{N}\), \(\forall j\in\mathcal{M}\) are given, the sets \(\mathcal{N}^{\text{D}}=\{i|y_{i,0}^{*}=1\}\), \(\mathcal{N}^{\text{L}}=\{i|y_{i,1}^{*}=1\}\), and \(\mathcal{N}^{\text{N}}=\{i|y_{i,j}^{*}=1,\forall j\in\mathcal{M}\}\) can be obtained. \(\mathcal{P}\) can be transformed into \(\mathcal{P}1\). \[\mathcal{P}1: \min_{\{f_{i,1},f_{i,j}\}}\,\sum_{i\in\mathcal{N}^{\mathsf{L}}}\frac{c _{i}a_{i}}{f_{i,0}}+\sum_{i\in\mathcal{N}^{\mathsf{L}}}\left(\frac{a_{i}}{r_{i, 1}}+\frac{2d_{i,1}}{c}+\frac{c_{i}a_{i}}{f_{i,1}}\right)+\sum_{i\in\mathcal{N}^ {\mathsf{N}}}\sum_{j\in\mathcal{M}}\left(\frac{a_{i}}{r_{i,1}}+\frac{2d_{i,1}} {c}+\frac{a_{i}}{r_{1,j}}+\frac{2l_{1,j}}{c}+\frac{c_{i}a_{i}}{f_{i,j}}\right), \tag{8a}\] \[\text{s.t.}\,\sum_{i\in\mathcal{N}^{\mathsf{L}}}f_{i,1}\leq F_{1},\] (8b) \[\sum_{i\in\mathcal{N}^{\mathsf{N}}}f_{i,j}\leq F_{j},\forall j\in \mathcal{M},\] (8c) \[0<f_{i,1}\leq F_{1},\forall i\in\mathcal{N}^{\mathsf{L}},\] (8d) \[0<f_{i,j}\leq F_{j},\forall i\in\mathcal{N}^{\mathsf{N}},\forall j \in\mathcal{M}. \tag{8e}\]  
Equation (8a) is the objective function. The meanings of (8b)-(8e) are similar to the meanings of (7b)-(7e). From \(\mathcal{P}1\), it can be seen that the delay of local computing is a constant. Moreover, the computing resource allocation problem of the local satellite's MEC server and the computing resource allocation problem of the neighboring satellites' MEC servers are independent of each other. Therefore, \(\mathcal{P}1\) can be decomposed into two sub-problems, i.e., \(\mathcal{P}1.1\) and \(\mathcal{P}1.2\), and then \(f_{i,1}^{*}\) and \(f_{i,j}^{*}\) can be obtained by solving \(\mathcal{P}1.1\) and \(\mathcal{P}1.2\), respectively. \(\mathcal{P}1.1\) is the computing resource allocation problem for the local satellite's MEC server, which is represented as:  
\[\mathcal{P}1.1: \min_{\{f_{i,1}\}}\sum_{i\in\mathcal{N}^{\mathsf{L}}}\left(\frac{ a_{i}}{r_{i,1}}+\frac{2d_{i,1}}{c}+\frac{c_{i}a_{i}}{f_{i,1}}\right),\] (9) s.t. (8b) and (8d). The objective function in (9) is set as \(U^{\mathsf{L}}\). Then we can have \(\partial U^{\mathsf{L}}/\partial f_{i,1}=-c_{i}a_{i}/\left(f_{i,1}\right)^{2}\), which is less than 0. \(\partial^{2}U^{\mathsf{L}}/\partial\left(f_{i,1}\right)^{2}=2c_{i}a_{i}/\left( f_{i,1}\right)^{3}\), which is greater than 0. \(\partial^{2}U^{\mathsf{L}}/(\partial f_{i,1}\partial f_{i,1})\)\(=0\), \(i,j\in\mathcal{N}^{\mathsf{L}}\), \(i\
eq j\). The Hessian matrix of \(U^{\mathsf{L}}\) is positive definite, so \(U^{\mathsf{L}}\) is convex. \(\mathcal{P}1.1\) can be solved by using the Lagrange multiplier method. The Lagrangian function is constructed as:  
\[L(f_{i,1},\theta)=\sum_{i\in\mathcal{N}^{\mathsf{L}}}\left(\frac{a_{i}}{r_{i, 1}}+\frac{2d_{i,1}}{c}+\frac{c_{i}a_{i}}{f_{i,1}}\right)+\theta\bigg{(}\sum_{ i\in\mathcal{N}^{\mathsf{L}}}f_{i,1}-F_{1}\bigg{)}, \tag{10}\]  
where \(\theta\) is the Lagrange multiplier and \(\theta\geq 0\). The KKT conditions of \(\mathcal{P}1.1\) are listed as:  
\[\frac{\partial L(f_{i,1},\theta)}{\partial f_{i,1}} = -\frac{c_{i}a_{i}}{\left(f_{i,1}\right)^{2}}+\theta=0, \tag{11}\] \[\frac{\partial L(f_{i,1},\theta)}{\partial\theta} = \sum_{i\in\mathcal{N}^{\mathsf{L}}}f_{i,1}-F_{1}=0,\] (12) \[\theta\bigg{(}\sum_{i\in\mathcal{N}^{\mathsf{L}}}f_{i,1}-F_{1} \bigg{)} = 0,\] (13) (8b) and (8d), \[\text{s.t.}\,\sum_{i\in\mathcal{N}^{\mathsf{L}}}f_{i,1}\leq F_{1},\]0  
\(f_{i,1}=\sqrt{c_{i}a_{i}/\theta}\) is obtained from (11). Substituting it into (12), we can obtain \(\sum_{i\in\mathcal{N}^{\mathsf{L}}}\sqrt{c_{i}a_{i}/\theta}-F_{1}=0\), i.e., \(\sqrt{\theta}=\big{(}\sum_{i\in\mathcal{N}^{\mathsf{L}}}\sqrt{c_{i}a_{i}}\big{)} /F_{1}\).