## 3 Proposed Methodology
### Hybrid Algorithm for Finding the Highest Stable Least Delay Path or Highest Stable Shortest Path
Next, the size of the route to reach the \(j\)th node is set to \"n\", as evident from Line 15. If the route size is zero, then the destination node with default link type 0 should be added to the route, and the stable shortest distance or stable least delay from the source (\(j\)th) node to the destination node should be updated, as shown in Line 27 of the code snippet given in Figure 1. The default link type is added as zero because there is no link in the route with destination being the only element; note that this link type is not used in decision-making. Thus, \(P_{s}[j,0,0]\) does not represent any link type in the path, while all other elements in the path indeed represent link types, including the source node. Accordingly, \(P_{s}[j,0,0]\) is a dummy link type. Otherwise, if the size is greater than zero, the last parent from the stable route to the \(j\)th node will be set as \"index\", as evident from Line 17. Then, it is necessary to determine the link type that exists between \"neaVer\" and \"index\". For that, we have to inspect the link type in one of the stable least distance or stable least delay modes. Note that \"type\" is a variable that holds the type of communication channel for the link between \"neaVer\" and \"index\". If the mode is distance, then the communication channel having the highest link lifetime will be selected, as evident from Lines 18 and 19. Otherwise, if the mode is delay, the combined effect of link lifetime and delay will be inspected, as specified previously, to select the communication channel \"type\" with the combined effect of low delay and high link lifetime, as evident from Lines 20 and 21. Link lifetime checks in both distance mode and delay mode ensure that the most stable links out of the two communication channels are selected, ensuring higher reliability in routing. Next, \"EdLife\" is a local variable which stores the link lifetime from the nearest vertex to the last parent of the route from the \(j\)th node (\"index\") in the communication channel \"type\", as evident from Line 22. The if-condition in Line 23 checks whether the link lifetime of the edge (from the nearest vertex to the last element of the parent vector containing a stable least distance or least delay path from the \(j\)th node: \"EdLife\") is greater than the link lifetime threshold (\(T_{th}\)). Note that the previous if-condition is satisfied if and only if there is a stable link from the nearest vertex to the last parent of the path containing the route from the \(j\)th node to destination node \(S\). Therefore, if that condition is true, the nearest vertex with the corresponding link type will be added as a parent to the stable route having the source as the \(j\)th node, as evident from Line 24. Furthermore, when a link is added to the path, the route valid time should be updated. If the added edge's link lifetime (\"EdLife\") is less than the present path valid time (\(V_{s}[j]\)), then the value of \(V_{s}[j]\) should be updated as \"EdLife\", as shown in Line 24. Next, the total stable shortest distance or total stable least delay from the \(j\)th node (\"shoStaDisDel[j]\") is updated as the distance or delay from the nearest stable vertex (\"sho\") plus edge distance or delay (\"EdDisDel\"), as evident from line 25. Therefore, this approach ensures that only the nearest stable vertices with link types are added to the adjacency list \(P_{s}[j,x,1]\), which contains a list of parent nodes and link types to choose from, in order to traverse from the source node \"\(j\)\" to the destination node \(S\). At the end of the algorithm, the adjacency list \(P_{s}[N,x,1]\) and path valid time vector \(V_{s}[N]\) are returned, as given in line 28 of Figure 1. Note that all the routes in the adjacency list \(P_{s}[N,x,1]\) are guaranteed to be free from routing loops, since an already added vertex will not be added to the route again, which is achieved by tracking added vertices using the \"added\" vector, as explained in the algorithm.