EventsThe 6th International Electronic Conference on Applied Sciences
Published
This submission belongs to the session S3. Computing and Artificial Intelligence of the event The 6th International Electronic Conference on Applied Sciences
Published date
03 Dec, 2025
Academic Editor
author-avatarLucia Billeci
Citation
Umme Rabab Syed, Kimia Sadat Karbasi, Aiman Darakhshan, Balancing Time, Memory, and Accuracy: Algorithmic Insights into the N-Queens Challenge, in Proceedings of The 6th International Electronic Conference on Applied Sciences, 9 December–11 December 2025, MDPI: Basel, Switzerland
Share
Email
Facebook
Twitter
LinkedIn

Balancing Time, Memory, and Accuracy: Algorithmic Insights into the N-Queens Challenge

Kimia Sadat Karbasi 1
1. Department of Business, University of Europe for Applied Sciences, Potsdam, 14469, Germany, Germany
2. School of Management Sciences, Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi, 23460, Pakistan, Pakistan
Abstract

The N-Queens problem remains a benchmark for evaluating optimization strategies in artificial intelligence due to its combinatorial complexity. This study investigates the performance of four algorithmic approaches—Exhaustive Search (Depth-First Search with Backtracking), Greedy Search (Hill Climbing), Simulated Annealing, and Genetic Algorithm—on varying board sizes (N = 10, 30, 50, 100, 200). The aim is to assess each method's ability to find conflict-free queen placements, and to evaluate their computational efficiency, scalability, and memory usage.
Each algorithm was implemented in Python and tested under identical hardware settings. We designed specific parameter tuning strategies for metaheuristic methods, including cooling schedules for Simulated Annealing and crossover/mutation rates for Genetic Algorithms. Experiments revealed that Exhaustive Search is suitable only for small boards (N ≤ 10), while Greedy Search performs effectively up to N = 50 but struggles with local optima on larger boards. Simulated Annealing offered the best trade-off between time and memory, successfully solving instances up to N = 100. Genetic Algorithm also scaled to N = 100 but with significantly higher memory demands and runtime.
These findings demonstrate that no single algorithm excels universally, highlighting the need for hybrid strategies and parameter optimization to extend scalability. This comparative analysis contributes to understanding algorithm behavior under combinatorial constraints and supports the development of more adaptive optimization techniques for complex real-world problems.

Keywords
N-Queens
Depth First Search
Greedy Search
Simulated Annealing
Hill Climbing
Genetic Algorithm
Memory usage
Time Performance
Scalability
Fabrication of physically crosslinked polyvinyl alcohol and sodium alginate hydrogels for the delivery of curcumin and tranexamic acid
Detection of Biomarkers for Human Health Monitoring Using an Easy-to-Use Array Sensor Based on Fluorescent Organic Molecules in Human Saliva