## 4 Problem Decomposition and Solution
### Best Response-Based Centralized Multi-TaV Computation Resource Allocation Algorithm
#### 4.3.1 Algorithm Design  
The BR-CMCRA algorithm based on the best response is proposed here, and the algorithm follows one design principle of game theory, namely, the finite improvement property. Based on the property, the game player can improve its utility step by step. This principle is embodied in many learning algorithms, e.g., best response and better reply [29].  
The best response can find the best solution in each iteration. Specifically, the chosen TaVn updates its decision if and only if it can improve more properties than the other TaVs. Otherwise, TaVn decides to keep its decision unchanged. The specific algorithm process is shown in Algorithm 1.  
```
Initialization:
1. Each TaV chooses its SeV based on the channel gains from its nearest three candidate SeVs.
2. The processing time of a TaV's task is first initialized according to the time of Loc execution mode and Loc + SeV execution mode. Specifically, if the local execution time is smaller, it is initialized to the Loc mode. Otherwise, it is initialized to the Loc + SeV mode.
3. The edge computing resources are divided into \(\lambda\)N parts, and the ratio of each part is \(1/\lambda\)N, where \(\lambda\) is a constant factor. The iteration index \(k\) of the proposed algorithm is set to 1. Repeat Iterations: Step 1: One part computation resource \(\mathbb{F}^{dg}\Big{/}\lambda\)N is taken out and will be allocated in this iteration. Step 2: The ES maintains a table that stores the processing time of each TaV in different modes, i.e., Loc + SeV mode, Loc + Edge mode, Loc + SeV + Edge mode, and Loc execution mode. Step 3: Evaluate the completion status of each TaV and if \(\Delta\)T\({}_{n}<0\). The picked TaVn updates its allocated computation ratio \(\rho_{n}\) based on the following rule:

\[a_{n}(k+1)=\left\{\begin{array}{l}a_{n}^{\prime},\,if\,\min\Delta\text{T}_{ n}\\ a_{n}(k),\,else\end{array}\right. \tag{28}\]

Step 4: If \(\Delta\)T\({}_{n}\geq 0\), evaluate the improved utility of each TaV according to the BS/RSU for an update opportunity. The picked TaVn updates its allocated computation ratio \(\rho_{n}\) based on the following rule:

\[a_{n}(k+1)=\left\{\begin{array}{l}a_{n}^{\prime},\,if\,\max\Delta U_{n}\\ a_{n}(k),\,else\end{array}\right. \tag{29}\]

where \(a_{n}^{\prime}\) and \(a_{n}^{\prime\prime}\) is the decision based on Equations (30) and (31) of TaVn; \(a_{n}(k+1)\) is [PERSON]'s decision in the \((k+1)\)th iteration, while other TaVs keep their decision unchanged. Step 5: Update the offloading strategy based on Equations (19)-(21); \(k=k+1\). The algorithm will terminate when the utility reaches the maximum number of iterations, i.e., \(\lambda\)N. End
```  
**Algorithm 1** BR-CMCRA algorithm  
It's worth noting that the new action \(a_{n}^{\prime}\), selected from the strategy space of player n, is updated if player n cannot complete processing its tasks, i.e.,  
\[a_{n}^{\prime}=\min\bigl{(}\{a_{n}^{\prime}|a_{n}^{\prime}\in A_{n}\Delta\text {T}_{n}\}\bigr{)},\forall n\in\mathcal{N}, \tag{30}\]  
where \(A_{n}\) indicates [PERSON]'s strategy space, and \(\Delta\)T\({}_{n}=\tau_{n}-\text{T}_{n}(a_{n},a_{-n})\) denotes the difference between the maximum delay and the processing time. Similarly, the new action \(a_{n}^{\prime\prime}\) is updated if and only if \(a_{n}^{\prime\prime}\) can bring the highest improved utility than the other players, i.e.,  
\[a_{n}^{\prime\prime}=\max\bigl{(}\{a_{n}^{\prime\prime}|a_{n}^{\prime\prime} \in A_{n}\Delta U_{n}\}\bigr{)},\forall n\in\mathcal{N}, \tag{31}\]  
where \(\Delta U_{n}=U_{n}(a_{n}^{\prime},a_{-n})-U_{n}(a_{n},a_{-n})\) represents the improved utility.  
We adopt a pre-allocation mechanism to achieve the improved benefit comparison between multi-TaV interactions. Specifically, a part of edge computing resource \(\mathbb{F}^{dg}\Big{/}\lambda\)N is pre-allocated to each TaV, and the processing time is calculated and stored in ES.  
Then, the improved benefits can be acquired based on the pre-allocated resources and the previous results.