Abstract
The N-Queens problem is relevant in Artificial Intelligence (AI); the solution methodology has been used in different computational intelligent approaches. Max Bezzel proposed the problem in 1848 for eight queens in 8 \(\times\) 8 chessboard. After that, the formulation was modified to an N-Queens problem in a chessboard. There are several ways of posing the problem and algorithms to solve it. We describe two commonly used mathematical models that handle the position of queens and restrictions. The first and easiest way is to find one combination that satisfies the solution. The second model uses a more compact notation to represent the queen’s potions. This generic problem has been solved with many different algorithms. However, there is no comparison of the performance among the methods. In this work, a comparison of performance for different problem sizes is presented. We tested the Backtracking, Branch and Bound, and Linear Programming algorithms for a different number of queens, reaching 17. In addition, we present statistical comparative experimental results of the different methods.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Rivin, I., Vardi, I., Zimmermann, P.: The n-queens problem. Am. Math. Mon. 101(629–639), 08 (1994)
Letavec, C., Ruggiero, J.: The queens problem - delta. INFORMS Trans. Educ. 2(101–103), 05 (2002)
Mu, S.C.: Calculating a backtracking algorithm: an exercise in monadic program derivation (2021)
Osaghae, E.: Solution to n-queens problem: heuristic approach. Trans. Mach. Learn. Artif. Intell. 9, 26–35 (2021)
Sharma, S., Jain, V.: Solving n-queen problem by genetic algorithm using novel mutation operator. IOP Conference Series: Materials Science and Engineering 1116, 012195 (2021)
Andov, L.: Local search analysis n-queens problem. In: Griffith University, School of Information and Communication Technology, Intelligent Systems – 2802ICT (2018)
Stojkoska, B., Davcev, D., Vladimir, T.: N-queens-based algorithm for moving object detection in distributed wireless sensor networks. In: ITI2008 - 30th International Conference on Information Technology Interfaces, pp. 899–904 (2008)
Wang, C.-N., Yang, S.-W., Liu, C.-M., Chiang, T.: A hierarchical decimation lattice based on n-queen with an application for motion estimation. IEEE Signal Process. Lett. 10(8), 228–231 (2003)
Sosic, R., Gu, J.: A polynomial time algorithm for the n-queens problem. ACM SIGART Bull 1 (1996)
Erbas, C., Tanik, M., Aliyazicioglu, Z.: Linear congruence equations for the solutions of the n-queens problem. Inf. Process. Lett. 41, 301–306 (1992)
Al-Gburi, A., Naim, S., Boraik, A.: Hybridization of bat and genetic algorithm to solve N-queens problem. Bull. Electr. Eng. Inform. 7, 626–632 (2018)
Jain, V., Prasad, J.S.: Solving N-queen problem using genetic algorithm by advance mutation operator. Int. J. Electr. Comput. Eng.. 8, 4519–4523 (2018)
Ahmed, A., Shah, S., Kamran, A., Sani, A., Bukhari, H.S.: Particle swarm optimization for N-queens problem. J. Adv. Comput. Sci. Technol. 1 (2012)
Cao, J., Chen, Z., Wang, Y., Guo, H.: Parallel implementations of candidate solution evaluation algorithm for N-queens problem. Complexity 2021, 1–15 (2021)
Jianli, C., Zhikui, C., Yuxin, W., He., G.: Parallel genetic algorithm for N‐Queens problem based on message passing interface‐compute unified device architecture. Comput. Intell. (2020)
Janssen, D.M., Liew, A.W.: Acceleration of genetic algorithm on GPU CUDA Platform. In: 20th International Conference on Parallel and Distributed Computing, Applications and Technologies (PDCAT), 2019, pp. 208–213 (2019)
Nunes, I., Ulson, J., Nunes, A.: Development of neurofuzzy architecture for solving the N-Queens problem. Int. J. Gen Syst 34(6), 717–734 (2005)
Waqas, M., Bhatti, A.: Optimization of N+1 queens problem using discrete neural network. Neural Netw. World. 27, 295–308 (2017)
Funabiki, N., Takenaka, Y., Nishikawa, S.: A maximum neural network approach for N-queens problems. Biol. Cybern. 76, 251–255 (1997)
Lakshmi, A.J., Muthuswamy, V.: A predictive context aware collaborative offloading framework for compute-intensive applications. J. Intell. Fuzzy Syst.. 40, 1–12 (2020)
de Souza, F., de Mello, F.: N-queens problem resolution using the quantum computing model. IEEE Lat. Am. Trans. 15(3), 534–540 (2017)
Draa, A., Meshoul, S., Talbi, H., Batouche, M.: A quantum-inspired differential evolution algorithm for solving the N-queens problem. Int. Arab. J. Inf. Technol. 7, 21–27 (2010)
Nadel, B.: Representation selection for constraint satisfaction: a case study using n-queens. IEEE Expert. 5, 16–23 (1990)
Bell, J., Stevens, B.: A survey of known results and research areas for N-queens. Discret. Math. 309, 1–31 (2009)
Kondrak, G., van Beek, P.: A theoretical evaluation of selected backtracking algorithms. Artif. Intell. 89, 365–387 (1995)
Güldal, S., Baugh, V., Allehaibi, S.: N-queens solving algorithm by sets and backtracking (2016)
Hazama, K., Ebara, H.: Branch and bound algorithm for parallel many-core architecture. 272–277 (2018)
Koontz, W., Narendra, P., Fukunaga, K.: A branch and bound clustering algorithm. IEEE Trans. Comput. C-24, 908–915 (1975)
Stone, H., Stone, J.: Efficient search techniques—an empirical study of the n-queens problem. IBM J. Res. Dev. 31, 464–474 (1987)
Nasira, G., Kumar, S.: A backpropagation neural network implementation for hybrid algorithm in solving integer linear programming problems. In: Computing Communication and Networking Technologies (ICCCNT), pp. 1–6 (2010)
Al-Rudaini, M.: N-queens problem solving using linear programming in gnu linear programming kit (GLPK) (2016)
Olivas, F., Valdez, F., Castillo, O., Gonzalez, C.I., Martinez, G., Melin, P.: Ant colony optimization with dynamic parameter adaptation based on interval type-2 fuzzy logic systems. Appl. Soft Comput. 53, 74–87 (2017)
Olivas, F., Valdez, F., Castillo, O., Melin, P.: Dynamic parameter adaptation in particle swarm optimization using interval type-2 fuzzy logic. Soft Comput. 20(3), 1057–1070 (2016)
Olivas, F., Valdez, F., Melin, P., Sombra, A., Castillo, O.: Interval type-2 fuzzy logic for dynamic parameter adaptation in a modified gravitational search algorithm. Inf. Sci. 476, 159–175 (2019)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this chapter
Cite this chapter
Arteaga, A., Orozco-Rosas, U., Montiel, O., Castillo, O. (2022). Evaluation and Comparison of Brute-Force Search and Constrained Optimization Algorithms to Solve the N-Queens Problem. In: Castillo, O., Melin, P. (eds) New Perspectives on Hybrid Intelligent System Design based on Fuzzy Logic, Neural Networks and Metaheuristics. Studies in Computational Intelligence, vol 1050. Springer, Cham. https://doi.org/10.1007/978-3-031-08266-5_9
Download citation
DOI: https://doi.org/10.1007/978-3-031-08266-5_9
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-08265-8
Online ISBN: 978-3-031-08266-5
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)