Abstract

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 solutions 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.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.