# Opportunistic Multipath Routing in Long-Hop Wireless Sensor Networks
## 3 Energy-Efficient Reliable Multipath Routing Protocol Using Opportunistic Routing
### Bifurcation Transmission Process Based on Opportunistic Routing
```
1:Input:\(p_{i}\leftarrow\) received packet from the intermediate node \(i\)
2:
3:\(p_{j}\leftarrow\) the packet to transmit at node \(j\)
4:\(h\leftarrow\) the number of overhearing (default = 0)
5:
6:\(n=\) GetNumberofPaths(\(p_{i}\)) \(\triangleright\) extract the number of paths \(n\) from the packet \(p_{i}\)
7:StartTimer(\(T\)) \(\triangleright\) timer for waiting according to distance from \(j\) to destination
8:while TRUE do
9:ifT.expired() == TRUE then\(\triangleright\) waiting timer expiration
10:\(n^{\prime}=\) bifurcation_decision_process(\(P_{req},k_{j}\)) \(\triangleright\) calculate the number of path \(n^{\prime}\) (Algorithm 1)
11:\(p_{j}\).SetNumberofPaths(\(n^{\prime}\)) \(\triangleright\) set the number of paths \(n^{\prime}\) to satisfy the \(R_{req}\)
12: Send(\(p_{j}\)) \(\triangleright\) send a packet \(p_{j}\)
13: Exit() \(\triangleright\) quit the competition process
14:endif
15:ifReceive(\(p_{j}\)) == TRUE then\(\triangleright\) when receive the packet \(p_{j}\) from other competitor
16:\(h=h+1\)
17:if\(h\geq n\)then\(\triangleright\) already enough number of paths are constructed
18:\(\top\).Stop() \(\triangleright\) stop timer to transmit the packet
19: Drop(\(p_{j}\)) \(\triangleright\) drop the packet \(p_{j}\)
20: Exit() \(\triangleright\) quit the competition process
21:endif
22:endif
23:endwhile
```  
**Algorithm 2** Pseudocode for the receiver-based transport competition process at neighbor node \(j\)  
In addition, we should consider the distribution of \(P_{req}\) to prevent unnecessary bifurcation. Suppose that each bifurcation path has the same value as \(P_{req}\) of the intermediate node; then, the total \(P_{req}\) increases, leading to an unnecessary bifurcation. For example, consider an application requiring a \(P_{req}\) of 80% with a bifurcation number 2. If the intermediate node does not distribute \(P_{req}\) to each path, each path attempts to achieve a \(P_{req}\) of 80%. That is, the total \(P_{req}\) is 96%, i.e., \(1-(1-0.8)(1-0.8)\). Each node on the path can also perform an unnecessary bifurcation to satisfy \(P_{req}\) when \(P_{req}\) is not properly distributed. Figure 3 shows an example of the bifurcation transmission process and \(P_{req}\) distribution to prevent unnecessary bifurcation. To explain the bifurcation process and \(P_{req}\) distribution, we suppose that the source node, \(S\), and node 3 are decided to perform the branching with two paths and the original \(P_{req}\) at the source node is 80%. To bifurcate the path, the source node \(S\) calculates the proper distribution of \(P_{req}\). In Figure 3, the source node distributes a \(P_{req}\) of 80% to 50% and 60% \(P_{req}\). The source node \(S\) records the number of paths and distributed \(P_{req}\) in the packet and broadcasts the packet. Nodes 1 and 3 receive the packet from the source node \(S\). A timer of node 3 that is closer to the destination expires before the timer expiration of the node 1. At that time, node 3 realizes the given \(P_{req}\) is 50%. In the case of node 1, as for the timer of node 3, node 1 knows that only one node has a transmission opportunity with 60% \(P_{req}\). When a timer of node 1 expires, node 1 broadcasts the packet with the 60% \(P_{req}\). When \(P_{req}\) that is distributed to nodes 1 and 3 are combined, the calculated total \(P_{req}\) is 80%, i.e., \(1-(1-0.5)(1-0.6)\). In other words, even if the path is bifurcated, the original \(P_{req}\) remains unaffected and the proposed scheme can prevent unnecessary branching. If node 3 requires bifurcationof the path, since \(P_{exp}\) of the node 3 is less than 50% \(P_{req}\), it is possible to construct an additional multipath by further distributing \(P_{req}\) to nodes 5 and 6, as shown in Figure 3.