*3.2. Stability Check Algorithm for the AHP Method Related to the Evaluations of the Experts*

The stability of the results—the values of the criteria weights depending upon the psychological state of the experts and the incomplete certainty of their evaluations—is understood as follows.

We have repeatedly proved that one and the same expert provides ambiguous evaluations when performing comparative evaluations of the importance of the same criteria, and even when ranking their importance at different moments in time. Naturally, the logic of the expert's thinking process is not undergoing major changes at that time, and the evaluations provided by the expert do not differ significantly.

Therefore, we vary the evaluations provided by the experts using, naturally, the Saaty scale, varying their values by 1 (or 2), both towards an increase and towards a decrease of the values, while the comparative evaluations of the other criteria are also varied. However, internal inconsistency of the evaluations must not occur: the Consistency Ratio *CR* must be less than 0.1.

The stability check algorithm for the AHP method depending on the state and psychological condition of the experts can be represented in the following manner.

Step 1. The matrix *P* (*k*) for the pairwise comparison of the criteria of one of the experts (*k* = 1) is selected. Consistency of the evaluations (*CR* < 0.1) is verified. The criteria weights Ω = (*ω<sup>j</sup>* ) are calculated, *j* = 1, 2, . . . , *m*.

Step 2. A sequence of random numbers *ξ<sup>r</sup>* (r = 1) uniformly distributed within the interval of [0, 1] is selected using the statistical simulation method (Monte Carlo). The values of all the evaluations of the experts—the elements *p* (*k*) *ij* (*i* 6= *j*) of the matrix *P* (*k*)are varied (increased or decreased) by 1. To do that, if <sup>0</sup> <sup>≤</sup> *<sup>ξ</sup><sup>r</sup>* <0.5, the value increases. In the other case (0.5 < *ξ<sup>r</sup>* ≤1), the value decreases. In order to attain complete symmetry, we exclude the value of *ξ<sup>r</sup>* = 0.5, that is, we do not vary the elements of the matrix. The two options have equal probability. If *p* (*k*) *ij* = 1, the value is always increased. If *p* (*k*) *ij* = 9, the value is decreased. The elements of the main diagonal remain unchanged: *p* (*k*) *ii* = 1. The symmetric elements with respect to the main diagonal are *p* (*k*) *ji* <sup>=</sup> <sup>1</sup> *p* (*k*) *ij* . A new random number from the sequence *ξ<sup>r</sup>* is used for each element *p* (*k*) *ij* of the matrix.

Step 3. A random pairwise comparison matrix *P* is formed of the simulated elements *P* = k *p*ˆ (*k*) *ij* k. Consistency of evaluations (*CR* < 0.1) is verified. If the value of the Consistency Ratio is *CR* ≥ 0.1, the matrix is discarded. The criteria weights are calculated Ω = (*ω* (*r*) *j* ), (*r* = 1).

Step 4. New sequences of random numbers *ξ<sup>r</sup>* (*r* = 2, 3, . . . , *T*), are selected, where *T* is the number of repetitions (simulations). Steps 2 and 3 are repeated. The criteria weights (*ω* (*r*) *j* ), (*r* = 2, 3, . . . , T) are calculated.

Step 5. The relative errors of the values of the weight for each of the *j*-th criterion of the AHP method are calculated for every simulation ξ: *δ* (*ξ*) *j* = *ω* (*ξ*) *<sup>j</sup>* −*ω<sup>j</sup> ωj* .

Step 6. The largest values of the relative errors *δ* (*ξ*) *j* of the criteria weights for all the criteria are calculated for every simulation ξ: *δ <sup>ξ</sup>* = max *j δ* (*ξ*) *j* .

Step 7. We take the largest value of the relative errors *δ <sup>ξ</sup>* of the criteria weights over all the simulations ξ as the AHP method error for the given matrix of comparison: δ = max *ξ δ ξ* .
