Development of an Application for Interactive Research and Analysis of the N-Queens Problem

Velin Kralev, Radoslava Kraleva, Dimitar Chakalov
2021 International Journal on Advanced Science, Engineering and Information Technology  
This paper presents a study on the N-Queens Problem. Different approaches to its solution discussed in the scientific literature are analyzed. The implementation of an algorithm based on the backtracking method is also presented. The algorithm is optimized to find solutions in a specific subset of configurations among all possible ones. With this approach, the computational complexity of the algorithm is reduced from exponential to quadratic. In this way, the algorithm finds all possible
more » ... ns in a shorter time: fundamental and their symmetrical equivalents. The methodology for conducting the experiments is presented. The purpose of the study, the tasks to be performed, and the conditions for conducting the experiments are presented as well. In connection with the research, an application that implements the presented algorithm has been developed. This application generated all the results obtained in this study. The experimental results show that with a linear increase in the number of queens (equivalent to a quadratic increase in the number of fields on the board, the number of recursive calls made by the algorithm increases exponentially. Similarly, the number of possible solutions, as well as the execution time of the algorithm (in the different modes of the application -internal, interactive, and combined), also increases exponentially. However, the algorithm's execution time in the internal mode is significantly shorter than in the other two modes -interactive and combined. The future guidelines for the study are presented.
doi:10.18517/ijaseit.11.5.14523 fatcat:zng5zyncunadrem6odeo2ajdme