## 3 Algorithm Design
### Feasibility Analysis  
In this section, we analyze the feasibility of PCFL and ACFL, through the following theorems:  
**Theorem 1**: _Assume that \(n_{i}\) is the mobile node, and \(n_{j}^{\prime}\) is the task projection of task anchor \(n_{j}\) (\(n_{j}\in A_{i}^{\prime}\)) for \(n_{i}\), that is, \(d(n_{j},n_{i})\leq R\) and \(x_{j}=x_{j}^{\prime},y_{j}=y_{j}^{\prime}\). Then, \(n_{i}\) is inside the intersection area of the rings taking \(n_{j}^{\prime}\) as the center and \(\sqrt{R^{2}-\left(k_{j}^{\prime}\right)^{2}}\) as the radius, correspondingly._  
Figure 4: The architecture for PCFL and ACFL algorithm. _Proof._ As for all \(n_{j}\in\lambda_{i}^{t}\), there is \(d(n_{j},n_{i})\leq R\), we can see that \(n_{i}\) is in the intersection area of the spheres taking \(n_{j}\) as the centers and \(R\) as the radius, respectively, as shown in Figure 3. While, every sphere intersects the \(n_{i}\) plane so as to get its ring. In view of these rings inside the \(n_{j}\) plane would be the task-rings defined in Equation (7). Then, is in the intersection of these task-rings, such as one of them takes \(n_{j}^{\prime}\) as the center and \(\sqrt{R^{2}-\left(k_{ij}^{t}\right)^{2}}\) as the radius. The theorem can also verify correctness of the constraints in Equations (11) and (12) for the sampling area. _Lemma 1._ Each RGB sequence is unique. _Proof._ The lemma can be proved by _redectio ad absurbum_. Suppose that in PCFL and ACFL there are two different mobile nodes (or samples) with the same RGB sequence at time instant \(t\). This indicates that the two sets of corresponding task anchors are the same, and the two corresponding distances or corresponding projection distances are also same, although the mobile nodes (or samples) are different. However, this is a contradiction as, by the trilateration algorithm, two different nodes (or samples) in a three-dimensional region are the same when the distances between four anchors are known. _Theorem 2._The smaller the nearness degree \(\mu_{s_{k}M}^{t}\) is, the closer sample \(s_{k}\) gets to mobile node \(n_{i}\). _Proof._ It is clear that \(\{R_{i}^{Mt},G_{i}^{Mt},B_{i}^{Mt}\}\) is unique to the mobile node \(n_{i}\) and \(\{R_{i}^{s_{k}t},G_{i}^{s_{k}t},B_{i}^{s_{k}t}\}\) is unique to the sample \(s_{k}\) from Lemma 1. Consider two samples, represented as \(s_{l}\)and \(s_{k}\), respectively. Next, we assume that \(\tilde{d}_{ij}^{t}(\tilde{d}_{ij}^{t})\) denotes the distance between the sample \(s_{l}\)(\(s_{k}\)) and the task projection \(n_{j}^{\prime}\) (or task anchor \(n_{j}\)), respectively. Assume that:  
\[\mu_{s_{l}M}^{t}\leq\mu_{s_{l}M}^{t} \tag{22}\]  
Then, the theorem can be proved by _redectio ad absurbum_. Suppose the sample \(s_{k}\)is closer to the mobile node \(n_{i}\) than the sample \(s_{l}\) and:  
\[\left|\tilde{d}_{ij}^{t}-d_{ij}^{t}\right|<\left|\tilde{d}_{ij}^{t}-d_{ij}^{t }\right|,d_{ij}^{t}=p_{ij}^{t},(or\ d^{t}(n_{i},n_{j})) \tag{23}\]  
So:  
\[\left|\tilde{V}  
\[\left|R_{i}^{s_{i}t}-R_{i}^{Mt}\right|>\left|R_{i}^{s_{i}t}-R_{i}^{Mt}\right|, \left|G_{i}^{s_{i}t}-G_{i}^{Mt}\right|>\left|G_{i}^{s_{i}t}-G_{i}^{Mt}\right|, \left|B_{i}^{s_{i}t}-B_{i}^{Mt}\right|>\left|B_{i}^{s_{i}t}-B_{i}^{Mt}\right| \tag{27}\]  
Then:  
\[\mu_{s_{j}M}^{t}>\mu_{s_{k}M}^{t} \tag{28}\]  
However, this is a contradiction to Equation (22). Next we will analysis the time and space consumption in the worst case for PCFL and ACFL. **Theorem 3**. : The new algorithms take O(\(n\)) worst case time and O(\(n\)) worst case space. Proof. : Let's consider a 3D UASNs _UN_ with \(p\) anchors as stated before, in the process (a) determination of the sampling area, it takes O(\(p\)) time for the mobile node to obtain the angles w.r.t. each task anchor using the AOA method and it requires O(\(p\)) space to store angles.