# Improved Networks Routing Using an Arrow-Based Description
## 3 An Arrow-Based Description and Its Algebra  
### Graph Arrows  
In this section we define graph arrows as an algebraic object, then proceed to describe operations on such objects. We depart from a (finite) set of nodes N. We define an arrow as an ordered tuple \(\overrightarrow{(I,\ J)}\) with \(I,\ J\in N\). Intuitively, this object will correspond to a directed arrow from node I to node J, as depicted in Figure 3:  
In addition to arrows of the form \(\overrightarrow{(i,\ j)}\), we define two special types of arrows. The first is called the zero arrow \(\overrightarrow{0}\), defined as an arrow from any node to itself. Thus, \(\overrightarrow{(i,i)}=\overrightarrow{(j,j)}=\ \overrightarrow{0}\). This special zero arrow is in fact an equivalence class of self-loops. The second is the neutral arrow, denoted \(\overrightarrow{\infty}\).  
We define an \"addition\" operation on graph arrows, which we denote as \(\overrightarrow{+}\).  
Figure 1: Adjacency definition. Reprinted with permission from [1].  
Figure 3: Graph arrow from node I to node J. Reprinted with permission from [1].  
Figure 2: Merging two cycles. Reprinted with permission from [1].  
**Definition 1**.: _Let \(N\) be a node set and let \(i,j,\,k,\,l\in N\) be nodes in that node set. Let \(\overrightarrow{\infty}\) and \(\overrightarrow{0}\) be the two special nodes defined above. We define the addition operation \(\overrightarrow{+}\) as follows:_  
* \(\overrightarrow{(i,j)}\) _+ \(\overrightarrow{(j,k)}\) = \(\overrightarrow{(i,k)}\);_
* \(\overrightarrow{(i,j)}\) _+ \(\overrightarrow{(i,j)}\) = \(\overrightarrow{(i,j)}\);_
* \(\overrightarrow{(i,j)}\) _+ \(\overrightarrow{(k,i)}\) = \(\overrightarrow{(k,j)}\);_ \(\overrightarrow{(i,j)}\) _+ \(\overrightarrow{(k,l)}\) = \(\overrightarrow{\infty}\)_ _if_ \(i\
eq l\) _and_ \(j\
eq k\)_;_
* \(\overrightarrow{(i,j)}\) _+ \(\overrightarrow{0}\) = \(\overrightarrow{0}\) + \(\overrightarrow{(i,j)}\) = \(\overrightarrow{(i,j)}\);_
* \(\overrightarrow{\infty}\) _+ \(\overrightarrow{(i,j)}\) = \(\overrightarrow{(i,j)}\) + \(\overrightarrow{\infty}\) = \(\overrightarrow{\infty}\);_
* \(\overrightarrow{0}\) _+ \(\overrightarrow{\infty}\) = \(\overrightarrow{\infty}\)_+ \(\overrightarrow{0}\) = \(\overrightarrow{\infty}\)_._
* \(\overrightarrow{0}\) _+ \(\overrightarrow{0}\) = \(\overrightarrow{0}\)_  
Consider the set of arrows defined by \((N\,x\,N)\cup\ \overrightarrow{0}\cup\ \overrightarrow{\infty}\) under the operation of arrow addition +. This structure is closed under addition, it has an identity element \(\overrightarrow{0}\), and it is commutative. Moreover, using the first rule it holds that \(\overrightarrow{(i,\,j)}\) + \(\overrightarrow{(j,\,i)}\) = \(\overrightarrow{(i,\,j)}\) = \(\overrightarrow{0}\). As a result, we usually call \(\overrightarrow{(j,i)}\) the inverse of \(\overrightarrow{(i,\,j)}\). Note that for each arrow of the form \(\overrightarrow{(i,\,j)}\) there is a unique inverse. The inverse of \(\overrightarrow{0}\) is itself. However, the neutral element has no inverse. In addition, the addition operation we have defined is not generally associative. Indeed, it holds that:  
\[\left[\overrightarrow{(i,j)}\ \overrightarrow{+}\ \overrightarrow{(k,l)} \right]+\ \overrightarrow{(j,k)}\ =\ \overrightarrow{\infty}+\ \overrightarrow{(j,\,k)}\ =\ \overrightarrow{\infty}\]  
However, associating the second and third terms yields a different result:  
\[\overrightarrow{(i,j)}+\ \left[\overrightarrow{(k,l)}\ +\ \overrightarrow{(j,k)} \right]\ =\ \overrightarrow{(i,j)}+\ \overrightarrow{(j,\,l)}\ =\ \overrightarrow{(i,l)}\]  
The operation of inverting a graph arrow is shown in Figure 4, where the inverse of the full arrow is the dotted one.