# Improved Networks Routing Using an Arrow-Based Description
## 5 Routing Algorithm Using Arrows  
As discussed in Section 1, our graph-arrow addition method will be applied to a specific path-finding algorithm, namely one based on cycle-merger.  
In this method, in order to find a route between an initial node \(i\) and a final node \(f\), we must first identify which cycles comprise those nodes. Recall that if a node has a degree d then the respective node can be found in d cycles [7]. Once all such cycles have been identified, one creates a Laplacian of the cycles, and we perform the cycle-merger algorithm until the two nodes are within the same larger cycle [9; 10; 11]. At this moment we know which cycles have participated in a merger. Furthermore, because the result of the program is a larger cycle, a direct path and a return paths exist. The program can be extended to provide all possible routing paths connecting the starting node and the final node, but this will be more time consuming.  
The next step should be identifying the routing paths. The result of the algorithm of [6] was a list of the traveled cycles. The complexity of translating this list to usable routes was not taken into account for the complexity analysis and is indeed costly. In the following, we will optimize the format of the results towards a possible use in routing.  
Suppose that in our example of the dodecahedron we want to find a path between the start node \(i=1\) and the final node \(f=20\). In the original paper, cycle merger is done starting from rows of the cycle-links incidence matrix. We do the same here, but we depart from the cycle-arrow incidence matrices. Each time we are meant to merge two cycles, we add the corresponding rows by using the rules of the addition operation described in Definition 1.  
Following the algorithm ultimately results in (for instance) the following vector for which non-zero entries are given in Equation (1).  
\[\frac{\left[\overrightarrow{(5,1)},\overrightarrow{(1,2)},\overrightarrow{ (3,4)},\overrightarrow{(6,15)},\overrightarrow{(7,6)},\overrightarrow{(8,9 )},\overrightarrow{(9,19)},\overrightarrow{(10,3)},\overrightarrow{(13,20)}, \overrightarrow{(14,5)},\overrightarrow{(14,5)},\overrightarrow{(28,8)}, \overrightarrow{(12,13)},\overrightarrow{(4,12)},\overrightarrow{(14,5)}, \overrightarrow{(18,19)},\overrightarrow{(11,10)},\overrightarrow{(20,16)}, \overrightarrow{(16,17)},\overrightarrow{(17,7)},\overrightarrow{(19,11)}} \tag{1}\]  
We note that each entry of this vector represents a tuple of values, each in the set of nodes N. As a first step, we create two node lists: a list denoted \(T\) which will contain the first nodes (tails) of each arrow, and a list denoted \(H\) which will contain the second nodes (heads) of each arrow. Our goal is to find a path between our chosen nodes, 1 and 20.  
We first apply the Knuth-Morris-Pratt (KMP) algorithm [12] to the tail list \(T\) to find node 1. Subsequently we find the node that is at the same index in the head list \(H\) as the node 1 was in the list \(T\); denote this node by \(j\). We now remove node \(i\) from list \(T\) and \(j\) from \(H\). We subsequently search for node \(j\) in list \(T\) (using the KMP algorithm), and then continue in the same way until we reach node \(f\). This will give us a path from \(i\) to \(f\).  
For our example, we start from node 1 in list \(T\): we find it on the second position. To this corresponds the value 2 in list \(H\). We remove the two values and continue. We find node 2 in \(T\) and the corresponding value is node 10 in list \(H\), etc.  
The following operations involving the arrows can be defined and described.