## 4 Problem Decomposition and Solution  
### Problem Decomposition  
Figure 2 shows the relationship of the three terminals: TaV, SeVs, and ES. They all can provide computation resources. Moreover, the ES can manage the matching of TaVs and SeVs and make task-offloading strategies.  
The total task processing time is minimal only when the processing time of each execute terminal is the same.  
Proof of Theorem 4.: Take the Loc + SeV + EdgeV mode as an example. Suppose there exist \(\alpha_{n}^{\prime}\), \(\beta_{n}^{\prime}\), and \(\theta_{n}^{\prime}\) that make \(\text{T}_{n}=\max\{\alpha_{n}^{\prime}\text{C}_{n}/\text{f}_{n},\beta_{n}^{ \prime}\text{C}_{n}/\text{f}_{n^{\prime}}+\beta_{n}^{\prime}\text{D}_{n}/\text {R}_{n}^{22p},\theta_{n}^{\prime}\text{C}_{n}\Big{/}\rho_{n}\text{F}^{edg}+ \theta_{n}^{\prime}\text{D}_{n}\Big{/}\text{R}_{n}^{alg}\}\) reach the minimal value, while satisfying  
\[\alpha_{n}^{\prime}\text{C}_{n}/\text{f}_{n}>\beta_{n}^{\prime}\text{C}_{n}/ \text{f}_{n^{\prime}}+\beta_{n}^{\prime}\text{D}_{n}/\text{R}_{n}^{22p}>\theta_ {n}^{\prime}\text{C}_{n}\Big{/}\rho_{n}\text{F}^{edg}+\theta_{n}^{\prime} \text{D}_{n}\Big{/}\text{R}_{n}^{alg},\]  
Figure 2: The relationship of TaV, SeV, and ES.  
it must be possible to adjust the ratio of \(\alpha_{n}^{\prime}\), \(\beta_{n}^{\prime}\), and \(\theta_{n}^{\prime}\) to enable the task performed locally to decrease and the task performed remotely to increase so that the values of the three parts are gradually nearer and equal. Only if it satisfies  
\[\alpha_{n}^{*}\mathrm{C}_{n}/\mathrm{f}_{n} = \beta_{n}^{*}\mathrm{C}_{n}/\mathrm{f}_{n^{\prime}}+\beta_{n}^{* }\mathrm{D}_{n}/\mathrm{R}_{n}^{v2v}=\theta_{n}^{*}\mathrm{C}_{n}/\rho_{n} \mathrm{F}^{vdg}+\theta_{n}^{*}\mathrm{D}_{n}/\mathrm{R}_{n}^{vdg}\], does \[\mathrm{T}_{n}\] reach the minimal value.  
Therefore, when offloading modes and allocating ratio \(\rho_{n}\) of TaVs are determined, the offload proportion can be directly obtained. To get the offloading ratio of \(\mathrm{Loc}+\mathrm{SeV}+\mathrm{EdgeV}\) mode, we set  
\[\alpha_{n}\mathrm{C}_{n}/\mathrm{f}_{n} = \beta_{n}\mathrm{C}_{n}/\mathrm{f}_{n^{\prime}}+\beta_{n} \mathrm{D}_{n}/\mathrm{R}_{n}^{v2v}=\theta_{n}\mathrm{C}_{n}/\rho_{n} \mathrm{F}^{vdg}+\theta_{n}\mathrm{D}_{n}/\mathrm{R}_{n}^{vdg}, \tag{17}\]  
and define  
\[\left\{\begin{array}{l}\Phi_{1}=\mathrm{f}_{n}/\mathrm{C}_{n}\\ \Phi_{2}=\mathrm{R}_{n}^{v2v}\mathrm{f}_{n^{\prime}}/\left(\mathrm{R}_{n}^{v2v }\mathrm{C}_{n}+\mathrm{D}_{n}\mathrm{f}_{n^{\prime}}\right)\\ \Phi_{3}=\rho_{n}\mathrm{F}^{vdg}\mathrm{R}_{n}^{vdg}\Big{/}(\mathrm{R}_{n}^{ vdg}\mathrm{C}_{n}+\rho_{n}\mathrm{F}^{vdg}\mathrm{D}_{n})\end{array}\right.. \tag{18}\]  
When we put (18) into (17), we have \(\alpha_{n}\Phi_{1}=\beta_{n}\Phi_{2}=\theta_{n}\Phi_{3}\). Thus, the offloading ratio can be obtained by  
\[\left\{\begin{array}{l}\alpha_{n}=\Phi_{1}/(\Phi_{1}+\Phi_{2}+\Phi_{3})\\ \beta_{n}=\Phi_{2}/(\Phi_{1}+\Phi_{2}+\Phi_{3})\\ \theta_{n}=\Phi_{3}/(\Phi_{1}+\Phi_{2}+\Phi_{3})\end{array}\right.. \tag{19}\]  
Similarly, the offloading ratio of \(\mathrm{Loc}+\mathrm{SeV}\) mode is denoted by  
\[\left\{\begin{array}{l}\alpha_{n}=\Phi_{1}/(\Phi_{1}+\Phi_{2})\\ \beta_{n}=\Phi_{2}/(\Phi_{1}+\Phi_{2})\end{array}\right., \tag{20}\]  
and the offloading ratio of \(\mathrm{Loc}+\mathrm{Edge}\) mode is denoted by  
\[\left\{\begin{array}{l}\alpha_{n}=\Phi_{1}/(\Phi_{1}+\Phi_{3})\\ \theta_{n}=\Phi_{3}/(\Phi_{1}+\Phi_{3})\end{array}\right.. \tag{21}\]  
The point is to find the proper offloading mode, and when TaVn offloads its tasks to ES, \(\rho_{n}\) is also needed. In addition, the purpose of finding a proper offloading mode and \(\rho_{n}\) for a TaV is to maximize the benefit of the utility. In this process, each TaV should compete for computing resources and cooperate to maximize the overall benefit, which can be solved by a game.