## 4 Relay Scheme based on FAHP
### Measurement of Relative Importance
#### 4.2.2 Criterion 2: Number of Hops  
Following similar steps regarding the distance criterion, the number of hops is another important measure to compare candidate nodes to be selected for a routing path. The objective is clear: inside a set of several nodes (candidates), a pairwise comparison matrix must be constructed, where every value of importance for a pair of nodes (\(I_{AB}\)) in the matrix should be on the Saaty scale (within the interval [1; 9]).  
Figure 5: Importance value \(I_{AB}\) (circles) when nodes \(A\) and \(B\) are compared under the distance criterion. Data: \(d_{max}=10\) km, \(d_{min}=0.5\) km, \(\delta=1\).  
In order to set the scale of the problem, a starting point is to estimate the limits. In this sense, we can use the latter two parameters: the minimum (\(d_{min}\)) and maximum (\(d_{max}\)) distance to the gateway that a node can have. Assuming two nodes \(A\) and \(B\) with \(d_{A}\) and \(d_{B}\) distances to the gateway (\(d_{B}>d_{A}\) i.e., \(A\) is closer than \(B\) to the gateway), we can consider two scenarios for the best and worst cases for estimating the \(N_{h}\) (number of hops) as follows:  
\[(\text{Best case}:)\quad\{\,d_{A}=d_{min},\,\,d_{B}=d_{max}\}\,\,\xrightarrow{ \,}N_{h,A}=1,\,\,N_{h,B}=\left\lceil\frac{d_{max}}{d_{min}}\right\rceil \tag{21}\]  
\[(\text{Worst case}:)\quad\{\,d_{B}-d_{A}=d<\delta\,\,\}\,\xrightarrow{\,}N_{ h,A}=N_{h,B}\,\in\left[1,\left\lceil\frac{d}{d_{min}}\right\rceil\,\,\right] \tag{22}\]  
where the parameter \(\delta\) has the same meaning as in distance criterion: a threshold to define what is considered as the same distance in a practical way, and \(N_{h,A}\)_and_\(N_{h,B}\) are the number of hops from every node to reach the gateway. In order to have nine equal intervals in the domain of the number of hops (\(1\), \(\left\lceil\frac{d_{max}}{d_{min}}\right\rceil\)), a new interval \(\Delta_{S,h}\) is defined:  
\[\Delta_{S,h}\,\,=\,\frac{d_{max}/d_{min}-1}{9} \tag{23}\]  
When evaluating the comparison between nodes \(A\) and \(B\), the importance \(I_{AB}\) in the best case would have a value of 9 on the Saaty scale, meaning that is very convenient to choose node \(A\) instead of node \(B\) under this criterion of number of hops. In the opposite case (worst), the importance \(I_{AB}\) would have a value of 1, indicating that any node has the same number of hops, and both have the same opportunity to be selected. In a general case, the final expression for the relative importance between two nodes \(A\) and \(B\) can be given by  
\[I_{AB}=\left\{\begin{array}{cl}\left[\frac{d_{B}}{d_{A}}\right]&,\,\,if\,d_ {B}>d_{A}\\ 1&,\,\,if\,\,|d_{B}-d_{A}|\,\,\leq\,\,\delta\end{array}\right. \tag{24}\]  
where \([\cdot]\) stands for the nearest integer function. It can be observed again that \(I_{AB}\in[1,\,9]\). Another waypoint is to compare directly the number of hops between the two nodes \(A\) and \(B\) (\(N_{h,A},\,\,N_{h,B}\)) from the limit value (\(N_{h,max}=\left\lceil\frac{d_{max}}{d_{min}}\right\rceil\), \(N_{h,min}=1\)):  
\[I_{AB}=\left\{\begin{array}{cl}\left\lceil\frac{N_{h,B}-N_{h,A}}{A_{S,NH}} \right\rceil&,\,\,if\,\,N_{h,B}>N_{h,A}\\ 1&,\,\,if\,\left|N_{h,B}-N_{h,A}\right|\,\,\leq\,\,\delta\end{array}\right.,\quad\Delta_{S,NH}\,\,=\,\frac{N_{h,max}-1}{9} \tag{25}\]  
As usual, in the case of \(N_{h,A}>N_{h,B}\), the value of \(I_{BA}\) would be the inverse of the equivalent \(I_{AB}\). A similar example to that given for the distance criterion is shown in Figure 6 to prove the good behavior of (25).  
Figure 6: Importance value \(I_{AB}\) (circles) when nodes \(A\) and \(B\) are compared under the number of hops criterion. Data: \(d_{max}=10\) km, \(d_{min}=0.5\) km, \(\delta=1\).