## 3 Algorithm Description
### Amending  
For any individual \(\Delta=\{\aleph;\ \Upsilon\}\) in \(\Psi_{all}\), Algorithm BD can be used to obtain a solution \(\theta\). However, it is possible that the solution does not comply with the precedence constraints. ```
Input: an individual \(\Delta=\{\aleph;\ \Upsilon\}\); Output: a solution \(\theta=\{\theta_{k}\ |\ k\in\mathbb{N}_{n}\}\);
1: Let each \(\theta_{k}=\emptyset\), \(k\in\mathbb{N}_{n}\);
2:for\(i\in\mathbb{N}_{p}\)
3: Insert task \(m_{\aleph[i]}\) to the end of task sequence \(\theta_{\Upsilon[i]}\)
4:end
5: Output solution \(\theta\)
```  
**Algorithm BD (Basic decoding method)**  
**Example 1**. : _Consider the individual in Figure 4; the solution \(\theta=\{\theta_{1}\),..., \(\theta_{7}\}\) is obtained by Algorithm BD, where \(\theta_{1}=\{m_{3}\}\), \(\theta_{2}=\{m_{8}\), \(m_{4}\}\), \(\theta_{3}=\{m_{1}\}\), \(\theta_{4}=\{m_{2}\}\), \(\theta_{5}=\{m_{5}\), \(m_{7}\}\), \(\theta_{6}=\emptyset\), and \(\theta_{7}=\{m_{6}\}\). Then, we use the Wait-For Graph (WFG) [50]\(\mathcal{W}\ =\ (\mathcal{T},\ \mathcal{A})\) in Figure 5 to represent \(\theta\), where \(\mathcal{T}\) contains all task nodes, the dotted arcs represent data-dependent constraints in Figure 3, and the task sequence of edge servers is indicated by colored solid arcs. According to the assigned results, task \(m_{8}\) should be performed before \(m_{4}\), task \(m_{7}\) is before \(m_{8}\), and \(m_{5}\) is before \(m_{7}\); thus, task \(m_{5}\) must be executed before \(m_{4}\), which contradicts the precedence constraint between tasks \(m_{4}\) and \(m_{5}\). It can be characterized by a loop composed of nodes (\(m_{4}\), \(m_{5}\), \(m_{7}\), \(m_{8}\)), which can be detected by the DFS algorithm [51]._  
To address this undesired phenomenon, we propose a Petri-net-based amending method to ensure that the precedence constraints are satisfied between any two consecutive tasks. Readers are expected to be familiar with the properties and definition of Petri nets, which can be found in the supplemental file [47; 52]. For any individual \(\Delta\), we obtain solution \(\theta\) using Algorithm BD; then, the Petri-net-based amender (\(N,M_{0}\), \(\theta\)) can be established as follows:  
Step 1: For each application \(w_{q}\in\mathbf{W}\), let Petri net (\(\alpha_{q}\), \(M_{q}\)) = (\(P_{q}\), \(T_{q}\), \(F_{q}\), \(M_{q}\)), where \(P_{q}\) = \(\{p_{q,x}\}\cup\{p_{q,h}\ |\ m_{h}\in w_{q}\}\), \(T_{q}\) = \(\{t_{q,h}\ |\ m_{h}\in w_{q}\}\), \(F_{q}\) = \(\{(p_{q,h},t_{q,h})\),(\(t_{q,p},t_{q,h})\ |\ m_{h}\in w_{q},\ m_{i}\in pre(m_{h})\}\cup\{(t_{q,p},t_{q,e})\ |\ m_{h}\in w_{q}\ \wedge succ(m_{h})=\emptyset\}\), \(M_{q}(p_{q,h})=1\) if \(pre(m_{h})=\emptyset\), and \(M_{q}(p)=0\) otherwise. Step 2: For each satellite \(s_{k}\in\mathbf{S}\), we define Petri net (\(\beta_{k}\), \(M_{k}\)) = (\(P_{k}\), \(T_{k}\), \(F_{k}\), \(M_{k}\)), where \(P_{k}\) = \(\{p_{j}\ |\ \forall sat(u)_{j}\)=\(s_{k}\}\) denotes the _resource_ place of \(s_{k}\), \(T_{k}\) = \(\{t_{q,h}\ |\ m_{h}\in w_{q},\ \forall m_{h}\in\theta_{j},\ p_{j}\in P_{k}\}\), \(F_{k}\) = \(\{(t,p)\), \((p,t)\ |\ t\in T_{k},p\in P_{k}\}\), \(M_{k}(p)=1\), \(\forall p\in P_{k}\). Figure 5: WFG of a constraint-violating solution. Step 3: The amended (\(N,M_{0}\), \(\Theta\)) can be constructed by combining all (\(\alpha_{q}\), \(M_{q}\)) and (\(\beta_{k}\), \(M_{k}\)):  
\[(N,M_{0},\Theta)=\oplus_{w_{q}\in\mathbf{W}}(\alpha_{q},M_{q})\oplus_{s_{k}\in \mathbf{S}}(\beta_{k},M_{k}) \tag{23}\]  
where operator \(\oplus\) indicates the combination of two Petri nets via their common places and transitions. The subnet (\(\alpha_{q}\), \(M_{q}\)) generated by Step 1 represents the data dependencies of tasks in \(w_{q}\). Each transition \(t_{q,h}\in T_{q}\) corresponds to a specific task \(m_{h}\) in \(w_{q}\). The _sink_ place is represented by \(p_{q,e}\), while the intermediate states are represented by other places in \(P_{q}\). Initially, _source_ place \(p_{q,s}\) (where \(m_{s}\) is the entry task of \(w_{q}\)) is marked by a unique token.