# Multipath Routing in Wireless Body Area Sensor Network for Healthcare Monitoring
## 3 Proposed Methodology
### Design of Region-Based Energy Efficient Multipath Routing Algorithm
Our algorithm relies on probabilistic minimalism (\(P_{m}\)) in selecting a reliable region. There is a very slight chance where priority is given to \(R_{e}(x,y)\) just because when \(C_{r}(x,y)\) has all new tags/sensors and CR has no information about them. The relation between \(R_{e}\) and \(C_{r}\) by probabilistic minimalism is given by an integrated function over both regions and coordinates of nodes in them as shown by Equation (2). \[P_{m}=\ \int_{i}^{t}f\binom{R_{e}(x_{i},y_{i}),C_{r}(x_{i},y_{i})}{g(x_{i},y_{i })}dx \tag{2}\]  
Here, \(i\) denotes the tags/nodes and identifiers, and \(g(x,y)\) is a function that returns all the locations of all tags and identifiers. The function \(f\) in Equation (2) shows how the most trusted values are extracted from both regions, each being donated by its coordinates and the number of keys stored in it. This is further elaborated by expanding \(f\) as follows:  
\[P_{m}=\ \int_{i,j}^{t}\sum\frac{\sum_{u_{i}=1}^{w}l(K_{Ru\in St}\ \bigcap K_{Su\in Ri}),\ l(K_{CRu}\bigcap K_{Ru})}{\varphi(R_{u},\ S_{u},CR_{u})} \tag{3}\]  
Equation (3) shows the summation of the list of secret identifiers \(K\) of all the tags governed by the RFID identifier and the list of all the RFID identifiers governed by all tags sorted out by their respective owners, including the CR. This integrated summation shows the probability of the successful region which contains most of the keys showing which part of the network is most trustable. All the functions discussed in Equation (3) are explained in the following algorithms. Algorithm 2 selects a list of secret identifiers from either \(R_{e}(x,y)\) or \(C_{r}(x,y)\). Algorithm 3 selects the strongest tags/nodes among normal nodes/tags and CR. Algorithm 4 identifies the most trustable amongst the normal nodes/tags, CR, and RFID identifiers. ```
1:Set of RFID Identifiers
2:Set of Secret RFID Identifiers K
3:Begin:
4:for each tag ID from u to w do
5: Select secret ID K from all the tags set by RFID identifier
6: Populate array from K(tags)
7: Select secret ID K from all the RFID identifiers set by tags
8: Populate array from K(ID)
9:endfor
10:if K(tags) is bigger and old than K(ID) then
11: Sum all K(tags)
12:else
13: Sum all K(ID)
14:endifreturn K end:
```  
**Algorithm 2** Selecting list of secret identifiers  
```
1:Set of CRs
2:Set of strong tags/nodes K
3:Begin:
4:for each tag ID from u to w do
5: Select secret ID K from all the tags set by CR
6: Populate array from K(tags)
7: Select secret ID K from all the CRs set by tags
8: Populate array from K(CR)
9:endfor
10:if K(tags) is bigger and old than K(CR) then
11: Sum all K(tags)
12:else
13: Sum all K(CR)
14:endifreturn K end:
```  
**Algorithm 3** Selecting strong tags/nodes  
```
1:Set of CRs
2:for each tag ID from u to w do
3: Select secret ID K from all the tags set by CR
4: Populate array from K(tags)
5: Select secret ID K from all the CRs set by tags
6: Populate array from K(CR)
7:endfor
8:if K(tags) is bigger and old than K(CR) then
9: Sum all K(tags)
10:else
11: Sum all K(CR)
12:endifreturn K end:
```  
**Algorithm 4** Selecting most trustable set