## 5 Properties Analysis of the Functions \(\varphi_{m}^{s}\)
### Single-Resource-Block Maritime User Allocation
In summary, the recursive relationship among these three arrays (\(\psi\), \(X\), \(Y\)) is divided into four cases:  
Case 1 (line 4-6): If \(\psi[a,\,n,\,m]=\varphi_{1}\),  
\[X[a,\,n,\,m]=\widetilde{p}^{*}, \tag{41}\]  
\[Y[a,\,n,\,m]=(a-1,\,m+1,\,m+1). \tag{42}\]  
Case 2 (line 10-12): If \(\psi[a,\,n,\,m]=\varphi_{2}\),  
\[X[a,\,n,\,m]=X[a,\,n,\,m+1], \tag{43}\]  
\[Y[a,\,n,\,m]=(a,\,n,\,m+1). \tag{44}\]  
Case 3 (line 20-22): If \(a=0\), no valid user is reusing the resource block and  
\[\psi[0,\,n,\,m]=\varphi_{n,T}^{s}(0), \tag{45}\]  
\[X[0,\,n,\,m]=0, \tag{46}\]  
\[Y[0,\,n,\,m]=\varnothing. \tag{47}\]  
Case 4 (line 24-26): If \(m=T,n\leq T\),  
\[\psi[a,\,n,\,m]=\varphi_{n,T}^{s}(\widetilde{p}^{*}), \tag{48}\]  
\[\varphi_{2}=\psi[a,\,n,\,m+1]. \tag{40}\]0  
\[\varphi_{2}=\psi[a,\,n,\,m+1]. \tag{40}\]1```
1:Function RBUA \((\mathbf{\alpha},T,B_{S},G_{t}^{s}(t\in T),\sigma_{t}^{s}(t\in T),A,p^{s})\)
2:#Initialize arrays \(\mathbf{\psi}\), \(\mathbf{X}\), \(\mathbf{Y}\) for \(a=0,m=T\)
3:For\(\mathbf{m}=\mathbf{T}\) to \(1\) and \(n=m\) to \(1\)do
4:\(\psi[0,n,m]\leftarrow\sigma_{n,T}^{s}(0)\)
5:\(X[0,n,m]\gets 0\)
6:\(Y[0,n,m]\leftarrow\varnothing\)
7:Endfor
8:For\(\mathbf{a}=\mathbf{1}\) to A and \(n=T\) to \(1\)do
9:\(\widetilde{p}*\gets argmax\varphi(n,T,\mathbf{\alpha},T,B_{S},G_{t}^{s}(t\in T ),\sigma_{t}^{s}(t\in T),A_{s}*,p^{s})\)
10:\(\mathbf{\psi}[\mathbf{0},\mathbf{n},\mathbf{m}]=\widetilde{p}^{s}\)
11:\(X[0,n,m]=\widetilde{p}^{s}\)
12:\(Y[0,n,m]=\varnothing\)
13:Endfor
14:#Calculate \(\psi,X,Y\) for \(a\in[1,A]\) and \(n\leq m\leq T-1\)
15:For\(\mathbf{m}=\mathbf{T}-\mathbf{1}\) to \(1\) and \(a=1\) to \(A\) and \(n=m\) to \(1\)do
16:\(\widetilde{p}*\gets argmax\varphi(n,m,\mathbf{\alpha},T,B_{S},G_{t}^{s}(t\in T ),\sigma_{t}^{s}(t\in T),p^{s})\)
17:\(\varphi_{1}\leftarrow\sigma_{t,m}^{s}(\widetilde{p}^{s})+\psi[a-1,m+1,m+1]\)
18:\(\varphi_{2}\leftarrow\psi[a,n,m+1]\)
19:If\(\varphi_{1}>\varphi_{2}\) and \(\widetilde{p}*>X[a-1,m+1,m+1]\)then
20:\(\psi[a,n,m]\leftarrow\varphi_{1}\)
21:\(X[a,n,m]\leftarrow\widetilde{p}^{s}\)
22:\(Y[a,n,m]\leftarrow(a-1,m+1,m+1)\)
23:Else
24:\(\psi[a,n,m]\leftarrow\varphi_{2}\)
25:\(X[a,n,m]\leftarrow\chi[a,n,m+1]\)
26:\(Y[a,n,m]\leftarrow(a,n,m+1)\)
27:Endif
28:Endfor
29:#Retrieve the optimum solution \(\widetilde{p}^{S}\)
30:\(\widetilde{p}^{s}_{1},\ldots,\widetilde{p}^{s}_{T}\gets 0\)
31:\((a,n,m)\leftarrow(A,1,1)\)
32:While\((a,m,m)\
eq\varnothing\)do
33:\(\widetilde{p}^{s}_{n,\ldots},\widetilde{p}^{s}_{m}\leftarrow\chi[a,n,m]\)
34:\((a,n,m)\leftarrow\chi[a,n,m]\)
35:Endwhile
36:Return\(\widetilde{p}^{S}\)
37:EndFunction RBUA
```

**Algorithm 3** Single-resource-block maritime user allocation scheme (RBUA)

To avoid the repeated execution of the DP procedure in the multi-resource-blocks system, Algorithm 4 implements a pre-calculated improvement strategy. This subsection essentially optimizes user allocation based on power allocation in the previous subsection. Hence, we define the improved algorithm as a joint power and user allocation scheme on a resource block (RBPUA) to distinguish it from RBUA. In lines 1-4, the algorithm executes RBPA to obtain three arrays (\(\psi,X,Y\)). From lines 5-8, we solve the valid user set \(A_{s}*\) in \(\psi[A,1,m]\) and the corresponding optimal solution \(\widetilde{p}_{1},\widetilde{p}_{2},\ldots,\widetilde{p}_{T}\), then store these values in the global variable set. In line 10, the objective function \(W^{s}_{RBPA}(A_{s}*,p^{s})\) is maximized by searching for the best maritime user selection among \(T\) possibilities in the set. At the end of the algorithm, the returned result is restricted by the power budget \(p^{s}(P^{s}\leq P_{\max})\) in RBPA. The improved RBPUA scheme is prepared for the efficient calculation of the multi-resource-block optimization problem. Consequently, on a single resource block with a power budget, the calculative complexity achieved by both RBPUA and RBUA is equal to \(O(AT^{2})\).