## 5 RC-LARR: RSU-Assisted Cloud-Based Location-Aware Hybrid Routing
### Route Discovery
End
```

**Algorithm 4**PacketForward (S, D, H, P)

## 6 Computational Complexity of RC-LAHR

The computational complexity of any algorithm defines the viability of the algorithm in the real world. In this section, we compute the complexity of the proposed algorithm. Nomenclature lists some symbols used in the analysis. **Theorem 1**. : _The upper bound of the route discovery with \(n\) number of nodes is always \(O(n^{3})\)._

**Proof of Theorem 1. ** The route discovery overhead can be calculated by the sum of the RREQ overhead and the overhead lay on RREP. Hence, the route discovery overhead can be represented by the following formula. \[\text{Route discovery overhead}= \prod_{\text{RREQ}}+\prod_{\text{RREP}} \tag{1}\]

The overhead of sending the RREQ packet to the RSU has only the overhead of propagation delay from the node to the RSU. Hence, the overhead can be defined by the following formula. \[\prod_{\text{RREQ}}=\Delta\mathbf{t}_{1} \tag{2}\]

The delay of RREP consists of the time of route discovery and the propagation delay of the transmission of RREP to the nodes. The framework finds the route at layer 1, and if the destination is not present at layer 1, it sends the RREQ to layer 2, where the route is calculated and is sent to the RSU, and then the RSU sends the RREP to the nodes. Hence, the delay at route discovery can be defined as follows. \[ \begin{split}\delta_{\text{RREP}}&=\tau_{\text{ Rdiscv}}+\Delta\mathbf{t}_{1}\\ \tau_{\text{Rdiscv}}&=\max\begin{cases}\text{D}_{ \text{Rdisc1}}\\ \text{D}_{\text{Rdisc1}}\end{cases}\end{split}  \tag{3}\]

The route discovery at layer 1, i.e., the RSU, involves the process of finding source and destination, route calculation, propagation delay from the RSU to the nodes, and some other constraints like distraction, etc. The following equation summarizes it. \[\text{D}_{\text{Rdisc1}}=\text{T}_{\text{Froute}}+\tau_{\text{sonder}}+ \Delta\mathbf{t}_{1}+\text{C} \tag{4}\]

The route discovery at layer 2 takes place when the destination node is not present in the range of the RSU where the RREQ was initiated. Hence, the route discovery at layer 2 involves the node search, route calculation, and propagation delay in addition to the time taken to search for the node at layer 2. The following formula completely describes it. C represents the other constant. \[\text{D}_{\text{Rdisc1}}=\tau_{\text{sonder}}+\Delta\mathbf{t}_{2}+\text{T}_{ \text{Froute}}+\tau_{\text{sondel2}}+\text{C} \tag{5}\]

We use the hashing technique at the RSU to search for the node, hence \(\tau_{\text{sonder}}\) will take O(1) time. We assume the propagation delay is constant, therefore it takes \(\Delta\mathbf{t}_{2}=\text{O(1)}\). The route find also requires to traverse n node's neighbor, the time taken by the algo i.e., \(\text{T}_{\text{Froute}}=\text{O(n^{2})}\). However, at layer 2, we have the global view of the topology, we do not have any constraint of storage, and we can afford the high-speed processor; we used B+ Tree to store the nodes. The time taken to search for the node at layer 2, \(\tau_{\text{sondel2}}=\text{O(nlogn)}\). Hence, the time complexity of \(\text{D}_{\text{Rdisc1}}=\text{O(1)}+\text{O(1)}+\text{O(n^{2})}+\text{O(nlogn )}+\text{O(1)}=\text{O(n^{2})}\). Likewise, the time complexity of \(\text{D}_{\text{Rdisc1}}=\text{O(n^{2})}+\text{O(1)}+\text{O(1)}+\text{O(1)}= \text{O(n^{2})}\). Hence, the routing overhead is O(n\({}^{2}\)) for one route discovery. Let us suppose, in the worst-case scenario, there are \(n\) nodes, and all these nodes send the RREQ. In this case, the complexity is \(n^{*}\text{O(n^{2})}=\text{O(n^{3})}\). ## 7 Performance Evaluation and Analysis of Results

In this study, Mininet Wi-Fi [47] along with SUMO [48] was used for the simulation. This model was setup on Ubuntu Server, which runs on a virtual machine. Figure 13a,b illustrate the topology and SUMO map used for the simulation. Table 1 lists the essential parameters used in the simulation. The performance of the routing protocol was assessed through simulation.