# REDUCE--A Tool Supporting Inconsistencies Reduction in the Decision-Making Process
## 2 Overall Structure and Features of the Application  
REDUCE is an online tool available at [37], based on the Flask framework, which enables the integration of Python logic with a web application [38] (Figure 1). In addition to its primary functionality, the application also includes a second module available at [39]. This module allows users to efficiently generate multiple pairwise comparison matrices with desired parameters, streamlining the process of creating matrices with specified inconsistency coefficients. This functionality is described in detail in a separate publication by [PERSON] and [PERSON] [40]. Python was chosen as the programming language because the core library of the application, REDUCE.py [41], is written in Python. The front end of the application is built using standard web technologies, such as HTML, CSS, JavaScript, and the jQuery library [42], which handles AJAX requests [43] to the Flask service [44,45]. The back end utilizes Python, REDUCE.py, Flask, and additional packages such as NumPy [46], SciPy [47], and SymPy [48], which support the implementation of matrix reduction algorithms and eigenvector calculations. The application is hosted on a server at the Department of Complex Systems [49] as a part of the Faculty of Electrical and Computer Engineering, Rzeszow University of Technology, Poland, running Ubuntu Server [50], with services like Gunicorn [51], NGINX [52], and Certbot [53] for SSL certificate management. The entire system is protected by a Cisco ASA 5505 firewall [54], the Snort system [55], and a virtual firewall ufw [56], and it is accessible via a public address in the University Computer Network [57].  
REDUCE allows for the input of pairwise comparison matrices of size \(n\times n(n\leq 10)\), where comparisons are manually entered into the appropriate cells using Saaty's scale from 1 to 9 [58,59]. The application offers two inconsistency reduction algorithms: Xu and Wei [60], and Szybowski [61], with the latter requiring integer comparison values. These two algorithms were chosen as the most popular, frequently used, proven, and effective working methods that can be implemented in REDUCE tool for both real and integer input values. In this paper, these algorithms will not be analyzed since they are not the main topic of the paper.  
From a practical point of view, the REDUCE interface allows the user to select the matrix size (Figure 1, Size of a matrix), then, the expected inconsistency threshold \(CR\) (Figure 1, Threshold of reducing CR) in accordance to [59], next, the reduction algorithm (Figure 1, Algorithm for reducing CR), and, finally, to fill the pairwise matrix according to available numbers after the assessing process. After pressing the REDUCE button,the results of processing are seen, as shown in Figure 2. There are also possibilities for generating a random matrix, or for resetting the values in the matrix. The results of processing include the reduced matrix, the consistency index \(CI\)[59], the consistency ratio \(CR\)[59], the priority vector, and various inconsistency indices calculated by the Reduce.py library, such as KI [62], GCI [63], GWI [64], PLI [65], TGCI [66], REI [67], and HCI [68] (Figure 2).  
These indices were taken into account as the most popular and frequently used ones.  
Data validation occurs on the client side, ensuring compliance with application requirements, such as restricting input values to the range of 1 to 9 and verifying that the selected Szybowski algorithm only accepts integer values. Form data are serialized and sent via a POST request in AJAX to the server, where they are converted into a SymPy matrix object, allowing for further calculations. After processing, the results are returned to  
Figure 1: The tool REDUCE ([[https://reduce.prz.edu.pl/](https://reduce.prz.edu.pl/)]([https://reduce.prz.edu.pl/](https://reduce.prz.edu.pl/)), accessed on 19 August 2024).  
the client for display, and upon clicking the \"REDUCE\" button, the server also returns the reduced matrix.