## 7 Approximation Algorithm
By calculating, for the first data stream, the node \(v\) is replaced with its neighbor node \(a\); for the second data stream, the direct transmitting from the node \(p_{2}\) to the node \(v\) is instead of the forwarding through the node \(v\)'s neighbor node \(a\). Then the sum of the ETXs of the new paths \(s_{1},...,p_{1},a,n_{1},...,d_{1}\) and \(s_{2},...,p_{2},a,v,n_{2},...,d_{2}\) is much smaller. Therefore, this local path strategy should be used as an alternative local path strategy to adjust the routing paths associated with the current node. Figure 4b illustrates the case that the quality of the current node \(v\)'s output link (e.g., \(v\),\(n_{2}\)) is poor, and gives an alternative local path strategy. Figure 4c shows the case that the current node \(v\) has no any coding opportunity, and gives an alternative local path strategy with a coding opportunity. \begin{table}
\begin{tabular}{l l} \hline \hline
**No.** & **Sentence of Algorithm** \\ \hline
1: & **if** node \(v\) is a cross node; \\
2: & L(v) = \(\phi\); \\
3: & compute \(E(Int)\) of two local paths: \(p_{1}\to v\to n_{1}\), \(p_{2}\to v\to n_{2}\); \\
4: & **for** each \(v\)’s neighbour node \(a\); \\
5: & **if \(\alpha_{a,v}<\alpha_{p_{2},v}\) then** \\
6: & there is a local path strategy \(St\): \(p_{1}\to a\to n_{1}\), \(p_{2}\to a\to v\to n_{2}\); \\
7: & \(E(St)=max(\alpha_{p_{1},a},\alpha_{p_{1},v})+max(\alpha_{p_{2},a},\alpha_{p_{ 2},n_{1}})+max(\alpha_{a,n_{1}},\alpha_{a,v})+\alpha_{v,n_{2}}\); \\
8: & **if \(E(Int)>E(St)\) then** \\
9: & \(L(v)=L(v)+St\); \\
10: & **endif** \\
11: & **endif** \\
12: & **if \(\alpha_{v,a}<\alpha_{v,n_{2}}\) then** \\
13: & there is a local path strategy \(St\): \(p_{1}\to a\to n_{1}\), \(p_{2}\to v\to a\to n_{2}\); \\
14: & \(E(St)=max(\alpha_{p_{1},a},\alpha_{p_{1},n_{2}})+max(\alpha_{v,a},\alpha_{v,n _{1}})+max(\alpha_{a,n_{2}},\alpha_{a,n_{1}})+\alpha_{p_{2},v}\); \\
15: & **if \(E(Int)>E(St)\) then** \\
16: & \(L(v)=L(v)+St\); \\
17: & **endif** \\
18: & **endif** \\
19: & **end for** \\
20: & get \(l(v)\) and use \(l(v)\) as new local paths; \\
21: & **else if** node \(v\) is a pseudo cross node **then** \\
22: & \(L(v)=\phi\); \\
23: & compute \(E(Int)\) of two local paths: \(p_{1}\to n_{1}\), \(p_{2}\to v\to n_{2}\); \\
24: & there is a local path strategy \(St\): \(p_{1}\to v\to n_{1}\), \(p_{2}\to v\to n_{2}\); \\
25: & \(E(St)=max(\alpha_{p_{2},p},\alpha_{p_{2},n_{1}})+max(\alpha_{p_{1},p},\alpha_{ p_{1},n_{2}})+max(\alpha_{v,n_{2}},\alpha_{v,n_{1}})\); \\
26: & **if \(E(Int)>E(St)\) then** \\
27: & \(L(v)=L(v)+St\); \\
28: & **endif** \\
29: & **for** each \(v\)'s neighbour node \(a\)**do** \\
30: & there is a local path strategy \(St\): \(p_{1}\to a\to n_{1}\), \(p_{2}\to a\to n_{2}\); \\
31: & \(E(St)=max(\alpha_{p_{2},a},\alpha_{p_{2},n_{1}})+max(\alpha_{p_{1},a},\alpha_{ p_{1},n_{2}})+max(\alpha_{a,n_{2}},\alpha_{a,n_{1}})\); \\
32: & **if \(E(Int)>E(St)\) then** \\
33: & \(L(v)=L(v)+St\); \\
34: & **endif** \\
35: & **end for** \\
36: & get \(l(v)\) and use \(l(v)\) as new local paths; \\
37: & **endif** \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Main part of optimal local path Algorithm.