# Search of the Shortest Path in a Communication Network with Fuzzy Cost Functions
## 4 Dijkstra Algorithm for Type V Fuzzy Graph
### Ranking Method of Triangular Fuzzy Numbers  
For the comparison of the fuzzy costs, we use the ranking criterion proposed by [9]. This method compares the Total Integral of fuzzy numbers based on a parameter \(\alpha\), called _index of optimism_. This index represents the degree of optimism of the decision-maker. For \(\alpha\) taking values greater than 0.5, the comparison between the fuzzy numbers is executed giving priority to numbers higher than the central value. When \(\alpha\) is lower than 0.5, the comparison is made considering those values that are lower than the central value.  
Let \(\tilde{C}_{(u,v)}=(a,b,c,d,\omega)\) be a generalized trapezoidal fuzzy number representing the fuzzy cost in a link joining the vertexes \(u\) and \(v\). For a fixed \(\alpha\), the _Total Integral_ of \(\tilde{C}_{(u,v)}\) is defined in Equation (5):  
\[S_{T}^{\alpha}(\tilde{C}_{(u,v)})=\frac{\omega}{2}[(1-\alpha)(a+b)+\alpha(c+d) -2X_{\min}], \tag{5}\]  
where \(X_{\min}\leq a\). For simplicity, since every cost in \(\tilde{G}\) is assumed to be a positive fuzzy number in our study, we set \(X_{\min}=0\) without altering the process performance.  
By making the proper modifications on \(a\), \(b\), \(c\) and \(d\), the total integral for a normalized triangular fuzzy number can be obtained.  
A ranking criterion for the fuzzy costs must be created for our algorithm. To obtain this ranking, an _order relation_ on the set of fuzzy numbers is defined. Let \(\tilde{C}^{1}\) and \(\tilde{C}^{2}\) be two fuzzy costs (defined either on an edge or a path), for \(\alpha\in[0,1]\), each \(\tilde{C}^{i}\), \(i=1,2\) has total integral \(S_{T}^{\alpha}(\tilde{C}^{i})\), then,  
* If \(S_{T}^{\alpha}(\tilde{C}^{1})>(<)\,S_{T}^{\alpha}(\tilde{C}^{2})\), then \(\tilde{C}^{1}\) is greater (smaller) than \(\tilde{C}^{2}\). This is denoted as \(\tilde{C}^{1}\succ(\prec)\,\tilde{C}^{2}\).
* If \(S_{T}^{\alpha}(\tilde{C}^{1})=S_{T}^{\alpha}(\tilde{C}^{2})\) and \(\mathrm{Me}(\tilde{C}^{1})>(<)\,\mathrm{Me}(\tilde{C}^{2})\), then \(\tilde{C}^{1}\succ(\prec)\,\tilde{C}^{2}\).
* If \(S_{T}^{\alpha}(\tilde{C}^{1})=S_{T}^{\alpha}(\tilde{C}^{2})\) and \(\mathrm{Me}(\tilde{C}^{1})=\mathrm{Me}(\tilde{C}^{2})\), then \(\tilde{C}^{1}=\tilde{C}^{2}\).  
where \(\mathrm{Me}(\tilde{C}^{i})\) (\(i=1,2\)) denotes the median of the fuzzy number \(\tilde{C}^{i}\). To compute the median of the fuzzy cost \(\tilde{C}^{i}=(a,b,c)\), first it is necessary to identify if the median is smaller or greater than the value \(b\).  
* If \(b-a\geq\frac{c-a}{2}\), then \(a\leq\mathrm{Me}(\tilde{C}^{i})\leq b\) and \(\mathrm{Me}(\tilde{C}^{i})=a+\sqrt{\frac{(b-a)(c-a)}{2}}\).
* If \(c-b\geq\frac{c-a}{2}\), then \(b\leq\mathrm{Me}(\tilde{C}^{i})\leq c\) and \(\mathrm{Me}(\tilde{C}^{i})=c-\sqrt{\frac{(c-b)(c-a)}{2}}\).  
This relation is an order relation because it meets the antisymmetry, reflexivity and transitivity properties. On the other hand, since the total integral satisfies the linearity property, we can apply this order relation for both the comparison between the cost of two links and the cost of two paths using the comparison between their total integrals. Therefore, the classic Dijkstra algorithm can be applied.