## 4 Partition Aware-RPL Protocol Overview
### Parent Selection Algorithm  
Assume a sensing node \(S_{i}\) that belongs to a given parcel \(P\). In principle, the parent selection algorithm may face several cases of parents' candidates. These cases can be categorized in two main situations. The first corresponds to the selection between two potential parents \(P_{1}\) and \(P_{2}\), located in the same parcel \(Q\). The second situation happens when \(P_{1}\) and \(P_{2}\) belong to two different parcels, namely \(Q\) and \(R\), respectively:  
* \(P_{1}\) and \(P_{2}\) are both in parcel \(Q\): in this situation, we can distinguish between three cases:  
Figure 4: DODAG resulting from Partition Aware (PA)-RPL deployed in a sample farmland—5 duly covered parcels. \(P\) and \(Q\) denote the same parcel and (\(P_{1}\), \(P_{2}\)) using different bridge: In this case, and to foster the creation of one bridge per parcel, \(S_{i}\) should select the one going through the best bridge (by comparing the respective ETX values of the bridges as depicted in Figure 5a). 2. \(P\) and \(Q\) denote the same parcel and (\(P_{1}\), \(P_{2}\)) using the same bridge: In this case, shown in Figure 5b, the decision could be made as usual, i.e., by comparing the ETX of \(P_{1}\) and \(P_{2}\) 3. \(P\) and \(Q\) are different: In this case, illustrated in Figure 5c, \(S_{i}\to P_{1}\) and \(S_{i}\to P_{2}\) are then both bridges towards the same neighboring parcel. Here again, a usual decision based on the path ETX of \(P_{1}\) and \(P_{2}\) should be fine. * \(P_{2}\) is in \(Q\), but \(P_{1}\) belongs to a different parcel \(R\): Once again, we can enumerate three different scenarios. The parcel \(P\) where sensor \(S_{i}\) is located can either be parcel \(Q\): (or interchangeably parcel \(R\)), or different from \(Q\): and \(R\): 4. \(P\), \(Q\), and \(R\) are different: Here, \(S_{i}\), \(P_{1}\), and \(P_{2}\) are located in three different parcels. In this case illustrated by Figure 5d, \(S_{i}\to P_{1}\) and \(S_{i}\to P_{2}\) are bridges linking parcel P to neighboring parcels. We may here select the sensor with the best path ETX. 5. \(P\) and \(Q\) (respectively \(R\)) denote the same parcel and \(S_{i}\) does not belong to the bridge used by \(P_{2}\) (resp. \(P_{1}\)): In this case, \(S_{i}\) and \(P_{2}\) (respectively \(P_{1}\)) are in the same parcel, while \(P_{1}\) (resp. \(P_{2}\)) is in a neighboring parcel. As shown in Figure 5e, \(S_{i}\) selects \(P_{2}\) (resp. \(P_{1}\)), that is the node located in its same parcel. Again, this is to foster the creation of one bridge per parcel and thus creating a duly covered parcels. 6. \(P\) and \(Q\) (respectively \(R\)) denote the same parcel and \(S_{i}\) belong to the bridge used by \(P_{2}\) (resp. \(P_{1}\)): in this case, \(S_{i}\) and \(P_{2}\) (respectively \(P_{1}\)) are in the same parcel, while \(P_{1}\) (resp. \(P_{2}\)) is in a neighboring parcel. As shown in Figure 5f, if \(S_{i}\to P_{1}\) (resp. \(S_{i}\to P_{2}\)) also represents the bridge selected by \(P_{2}\) (resp. \(P_{1}\)), then \(S_{i}\) is already selecting \(P_{1}\) (resp. \(P_{2}\)) as the preferred parent and it should keep doing it. The parcel is identified by a specific color. A node belonging to a given parcel, inherits its color. As previously assumed, this information is accessible by the node itself, say through a method (or function) entitled \(myColor()\). As explained above, the sink node has a different color from the rest of the network. When a node \(S_{i}\) has to select the best parent from two node candidates \(P_{1}\) and \(P_{2}\), the decision is made after performing a set of successive tests as previously described. For this purpose, the node \(S_{i}\) requires to know a list of information including: its own color (a), the path ETX value (b), the Id (c), the color (d), the bridge Id (e) corresponding to each candidate. While local information (i.e., (a)) is easily extracted from the node itself, information regarding all candidates (i.e., (b)-(e)) need to be obtained from the candidates themselves.