## 4 Cooperative Computational Offloading Scheme
### Service Time Model  
In this work, we propose a method of computing offload based on coalition game theory, in which the nodes of SN or USN only enter into alliance with those BSs who provide better service performance in terms of minimum service time, minimum computation cost, and minimum total service time. The coalition among USNs, SNs, and BSs, as well as the cooperation between BSs, is formulated based on the coalition game theory [44]. The coalition is established only when the task can be divided and processed in parallel to achieve better service reliability. Once the coalition is established and the task is transmitted to the BS by the SN, computational offloading and intelligent task division are performed based on the ANN model, which is shown in Algorithm 1. In coalition game theory, the players are the nodes of USNs and SNs who try to make a coalition with BSs. The coalition game is formulated by \(\mathcal{K}=(\mathcal{U},\mathcal{N},\mathcal{B},\mathcal{O}_{\mathcal{U}}, \mathcal{X})\). The concept model of coalition game theory is shown in Figure 2. The parameters are discussed as follows:  
1. Players: The USNs and SNs are the game players who try to make a coalition with the BSs, \(\mathcal{B}\). 2. Cooperation strategy: \(\mathcal{O}_{\mathcal{U},\mathcal{N}}\) is the space of feasible cooperation strategies among all the players in the coalition with the BSs, respectively. 3. Characteristics function: The game players exploit the characteristic function, \(\mathcal{X}\), to map every nonempty subset, \(\mathcal{P}{\subseteq}\mathcal{B}\), to the subset of the feasible cooperation strategies, i.e., \(\mathcal{O}(\mathcal{P})\subseteq\mathcal{O}_{\mathcal{U},\mathcal{N}}\). 4. Coalition partition: The coalition partition is the set \(\mathcal{P}=\{\mathcal{P}_{1},\mathcal{P}_{2},\ldots,\mathcal{P}_{\mathrm{P}}\}\), where \(\forall\mathcal{P},\mathcal{O}(\mathcal{P}_{\mathrm{P}})\subseteq\mathcal{O}_ {\mathcal{U},\mathcal{N}}\), and \(\mathcal{P}_{p}\cap\mathcal{P}_{p}^{\prime}=\varnothing\) for \(\mathrm{P}\
eq\mathrm{P}^{\prime}\) and \(\cup_{p=1}^{p}\mathcal{P}_{p}=\mathcal{B}\). Hence, a cooperative coalition is established between the game players and BS. ```
Input:\(T_{s}\) is \(r_{ij}[2744]\in\{100-1000\}\)m, \(r_{n,k}[2744]\in\{25-318\}\)m, \(A_{t}[2744]\in\{500-1000\}\)MB, Output:\(s_{1}[2744]\), \(s_{2}[2744]\), Dataset, \(d_{s}[2744]\), \(F_{s}[2744]\), distance\([2744]\)[14] Step # 1 Calculating time: for\(i=0:2743\)do set delay \([A_{t}[i]+1]\); for\(j=0:A_{t}[i]\)do Calculate: (4) Calculate: (10) Calculate: (5) Calculate: (11) \(\mathrm{delay}[j]=[(4)+\max((10),((5)+(11))]\) end Calculate: minimum from delay \([A_{t}[i]+1]\) array and store the index in [a]. \(s_{1}[i]=\mathrm{divs}[a][0]\) \(s_{2}[i]=\mathrm{divs}[a][1]\) If \(\mathrm{delay}[a]\geq 900\)then \(r_{ij}[i]=0\); \(F_{s}=[i]=1\); else \(F_{s}=[i]=0\) end end Step # 2 Cooperative Computing: for\(i=0:2743\)do if\(F_{s}=0\)then if\(s_{1}[i]=0\)then  Check if \(r_{ij}[i]\) follows the SNR constraint from (15) and store the value in \(f\). if\(f=1\)then \(d_{s}[i]=0\); \(F_{s}[i]=1\); else\(d_{s}[i]=2\); \(F_{s}[i]=0\); end else if \(s_{1}[i]>0\) and \(s_{2}[i]>0\)then  Check if \(r_{ij}[i]\) follows the SNR constraint from (15) and store the value in \(f\). if\(f=1\)then \(d_{s}[i]=0\); \(F_{s}[i]=1\); else\(d_{s}[i]=2\); \(F_{s}[i]=0\); end else if\(s_{2}[i]=0\)then \(d=\mathrm{abs}[r_{ij}[i]]-S_{a,b}\);  Check if \(r_{ij}[i]\) follows the SNR constraint from (15) and store the value in \(f_{1}\).