# A Robust Routing Protocol in Cognitive Unmanned Aerial Vehicular Networks
## 4 Proposed Routing Protocol
### Cluster Formation  
Based on the availability of spectrum, our proposed clustering mechanism strategically organizes the network into distinct logical groups. After completing the neighbor discovery phase, each node compiles its list of neighbors and exchanges Accessible Channels Lists (ACLs) with neighboring nodes within a single hop. Our clustering scheme is designed to minimize the number of clusters while simultaneously maximizing the common channels within each cluster. The process of forming clusters, as outlined in Algorithm 2, is framed as a maximum edge biclique problem. The objective is to create clusters that encompass the greatest number of nodes while incorporating the maximum possible number of shared channels within each cluster, as illustrated in Figure 4.  
```
START: \(UN_{i}\) scans and constructs \(ACL_{i}\); \(UN_{i}\) transmits \(ACL_{i}\) and \(NL_{i}\) to \(UN_{n}\); \(UN_{i}\) constructs \(G_{ci}\), based on \(G_{pi}\); while(\(UN_{i}\) determines \(CNRF_{i}\) and shares with \(UN_{n}\))do if\(CNRF_{i}>CNRF_{n}\)then \(UN_{i}\) states as \(CN\) and forms a cluster; \(UN_{i}\) selects \(SCN\) based on \(CNRF\), form the \(CM\); elseif\((CNRF_{n}>CNRF_{i})\)then if\(|N|>1\)then if\(|(CNRF_{highest}|>1)\)then \(UN_{i}\) asks \(UN_{n}\) to join as CM, with \(ID_{n}\) minimum; else \(UN_{n}\) with the highest \(CNRF_{n}\) selects as \(CN\); \(UN_{i}\) asks \(UN_{n}\) to join as \(CM\);  end; else \(UN_{i}\) requests \(UN_{n}\) to join as \(CM\);  end; if\(ID_{i}<ID_{n}\)then \(UN_{i}\) states itself as \(CN\) and forms a cluster; else \(UN_{i}\) asks \(UN_{n}\) to join as \(CM\) where \(ID_{n}\) is minimum;  end while
```  
**Algorithm 2**Cluster Formation  
Initially based on nodes and channel list, the maximum bipartite vertices set can be split into two disjoint sets. where the connected nodes to the ACL's big set can be split into a weighted graph and maximum biclique are taken into consideration. Using this, all  
Figure 4: (**a**) Bipartite Graph formation by node \(UN_{a}\), (**b**) Maximum edge Biclique graph of node \(UN_{a}\), (**c**) Nodes with CNRF value, (**d**) Proposed cluster-based network. nodes are connected to the available channels, so if one of the channels need to get back to it's PU and the other nodes can move forward with the other maximum left ACLs. The nodes then forms a cluster using the accessible channel list and the maximum biclique. Using Equation (12), it set the value for all the nodes, and by the maximum weight value it decides the Central Node (CN) in the cluster. Same as that the second highest valued node becomes the Secondary Central Node (SCN). By following the same process, all the nearby nodes creates their own cluster and cluster heads. Moreover, the node that is connected with two or more clusters CN is nominated as Nearby Node (NN). which works as a bridge into two nearby clusters while communication and optimizes the energy and makes the communication faster. From the proposed Algorithm 2, the Initial UAV Node (\(UAV_{i}\)) scans and constructs the initial Available Channel List (\(ACL_{i}\)). Then the \(UN_{i}\) transmits \(ALC_{i}\) and initial Neighbor List \(NL_{i}\) to the neighboring UAV nodes \(UN_{n}\). \(UN_{i}\) then generates the initial Maximum edge biclique graph (\(G_{ci}\)) from the initial bipartite graph (\(G_{pi}\)). \(UN_{i}\) then determines the value of the initial Central Node Resolution Factor (\(CNRF_{i}\)) and shares with the \(UN_{n}\). If the value of \(CNRF_{i}\) is greater than the value of the Neighboring Central Node Resolution Factor (\(CNRF_{n}\)), the \(UN_{i}\) node states as the Central Node (CN) and forms its cluster. Moreover, it selects the Secondary Central Node (\(SCN\)) based on the second highest value of \(CNRF_{i}\) among the Cluster Members (\(CM\)). If the \(CNRF_{n}\) is greater than the \(CNRF_{i}\), then it check if the number of channels is more than 1 or not.