## 3 System Model and Problem Formulation
### Problem Formulation  
This section formalizes the offloading problem. Let \(\xi=(V,E)\) denote DAG, where each vertex \(v_{i}\) in \(\xi\), represents a task (\(v_{i}\in V\)), and the directed edge e(\(v_{i},v_{i}\))\(\in\)\(E\) represents the dependency between task \(v_{i}\) and task \(v_{j}\). The next task can be started only when the current task is complete.  
Any task in the DAG can choose whether to offload to the MEC host or run locally on UE. If task \(v_{i}\) is offloaded to MEC, the task execution is divided into the sending phase, execution phase, and receiving phase. In particular, the data transfer between the UE and the MEC host can be ignored for tasks executed locally. Let us assume that the set of tasks in the DAG is \(N\) = {1,2,..., _n_}, and the set of MEC server is \(M\) = {1,2,..., _m_}. Let \(a_{i}\) denote the offloading decision of task \(v_{i}\). When \(a_{i}\) = 0, it means that \(v_{i}\) is scheduled to the local processor, and when \(a_{i}=m\) (\(m\in\)\(M\)), it means \(v_{i}\) is offloaded to the MEC server numbered m.  
SACDTO is designed to make offloading decisions with limited computing resources in multi-user and multi-MEC server scenarios. The offloading decision can shorten the completion time of all dependent tasks and optimize the system's energy consumption.  
Objective function \(J\) is a linear weighting method for multi-objective optimization, which can be defined as:  
\[\begin{array}{rcl}J\ =\ \beta_{1}(1\ -\ \frac{\sum\limits_{i\ =\ 1}^{N}T_{off}}{T_{loc}^{all}})\ +\ \beta_{2}(1\ -\ \frac{\sum\limits_{i\ =\ 1}^{N}E_{off}}{E_{loc}^{all}})\end{array} \tag{11}\]  
where \(T_{off}\) and \(E_{off}\) denote the time and energy consumed to complete the task after the offloading decision is executed. \(T_{loc}^{all}\) and \(E_{loc}^{all}\) denote the sum of time and energy consumed when all tasks are running on the local device. The ratio shows the advantage of offloading decisions over local execution. Therefore, \(1\ -\ \frac{\sum\limits_{i\ =\ 1}^{N}E_{off}}{E_{loc}^{all}}\) is the ratio of reducing energy consumption, and \((1~{}-~{}\frac{\sum\limits_{i=1}^{N}T_{off}}{T_{loc}^{all}})\) is the ratio of shortening completion time. \(\beta_{1}\) and \(\beta_{2}\) (\(\beta_{1}\), \(\beta_{2}\)\(\in\)[0, 1], \(\beta_{1}\)\(+\)\(\beta_{2}\) = 1) represent the proportions of delay and power consumption, respectively. These two values can be adjusted according to user requirements. Our purpose is to maximize the objective function \(J\):  
\[\begin{array}{l}\underset{A,F}{Max}J~{}=~{}\underset{A,F}{Max}~{}[\beta_{1} (1-~{}\frac{\sum\limits_{i=1}^{N}T_{off}}{T_{loc}^{all}})~{}+~{}\beta_{2}(1~{}- \frac{\sum\limits_{i=1}^{N}E_{off}}{T_{loc}^{all}})]\\ A~{}=~{}[a_{1},a_{2},\ldots,a_{i},\ldots,a_{N}]\\ F~{}=~{}[f_{1},f_{2},\ldots,f_{i},\ldots,f_{N}]\\ f_{i}~{}=~{}\left\{\begin{array}{l}f_{n}^{all},a_{i}~{}=~{}0\\ f_{m}^{all},a_{i}~{}\
eq~{}0,m\in M\end{array}\right.\\ s.t.\\ \text{C1}:a_{i}\in\{0,1,\ldots,m\},\forall m\in M,\forall i\in N\\ \text{C2}:f_{i}~{}>~{}0,\forall i\in N\\ \text{C3}:\sum\limits_{i\in N}f_{i}~{}\leq~{}C_{m}^{MEC},\forall m\in M\end{array} \tag{12}\]  
where \(A\) is a task offloading decision vector and \(F\) is the computing resource allocation vector. Restriction C1 to C2 indicates that each task can only be offloaded to the local or one MEC server for calculation. C3 indicates that the computing resources allocated to task \(v_{i}\) by the MEC server numbered m do not exceed the total computing resources of the MEC server.