Conference Paper

Henry V: A linear time algorithm for solving the N-Queens Problem using only 5 patterns

Authors:
To read the full-text of this research, you can request a copy directly from the authors.

No full-text available

Request Full-text Paper PDF

To read the full-text of this research,
you can request a copy directly from the authors.

... This means that solving larger N-Queen problems requires an efficient algorithm that does not grow exponentially with the number of queens. It also shows that brute force methods like depth first and breadth first search will quickly be impractical to use once the number of queens exceeds beyond a certain number [2]- [4]. ...
Conference Paper
Full-text available
This paper presents an analysis of solving the N-Queen problem using a genetic algorithm and compares its performance with traditional search algorithms like breadth-first search (BFS) and depth-first search (DFS). The N-Queen problem is a famous problem in the field of artificial intelligence that has been studied in depth. The genetic algorithm is an optimization algorithm inspired by the process of natural selection and evolution in living organisms. BFS and DFS are classical search algorithms that explore the search space to find a solution. This paper discusses all the main components of the genetic algorithm, such as population generation, fitness function, selection, crossover, and mutation, and also explains how it is used to solve the N-Queen problem. Traditional search methods, i.e., BFS and DFS, are also briefly discussed. The experimental results show that classical searching approaches are better for small-sized problems, but the genetic algorithm outperforms BFS and DFS in computation time for medium and large-sized problems. This paper concludes by analyzing the effect of parameter tuning on the genetic algorithm and suggests possible future work in the field.
Article
Full-text available
The n-queens problem is the placing of n number of queens on an nxn chessboard so that no two queens attack each other. This problem is important due to various usage fields such as VLSI testing, traffic control job scheduling, data routing, dead-lock or blockage prevention, digital image processing and parallel memory storage schemes mentioned in the literature. Besides, this problem has been used as a benchmark for developing new Artificial Intelligence search techniques. However, it is known that backtracking algorithms, one of the most frequently used algorithms to solve this problem, cannot produce all solutions in large n values due to the exponentially growing time complexity. Therefore, various methods have been proposed for producing one or more solutions, not all solutions for each n value. In this study, a pattern based approach that produces at least one unique solution for all n values (n>3) was detected. By using this pattern, a new algorithm that produces at least one unique solution for even very large n values in linear time was developed. The developed algorithm with О(n) time complexity produces quite faster solution to n-queens problem and even in some values, this algorithm produces (n-1)/2 unique solutions in linear time.
Article
Full-text available
N-queen problem represents a class of constraint problems. It belongs to set of NP-Hard problems. It is applicable in many areas of science and engineering. In this paper N-queen problem is solved using genetic algorithm. A new genetic algoerithm is proposed which uses greedy mutation operator. This new mutation operator solves the N-queen problem very quickly. The proposed algorithm is applied on some instances of N-queen problem and results outperforms the previous findings.
Article
Full-text available
The application of a discrete Hopfield-type neural network to solving the NP-Hard optimization problem – the N-queens problem (NQP) – is presented. The applied network is binary, and at every moment each neuron potential is equal to either 0 or 1. The network can be implemented in the asynchronous mode as well as in the synchronous one with n parallel running processors. In both cases the convergence rate is up to 100%, and the experimental estimate of the average computational complexity is polynomial. Based on the computer simulation results and the theoretical analysis, the proper network parameters are established. The behaviour of the network is explained.
Article
Full-text available
We propose a hysteresis neural network system solving NP-Hard optimization problems, the N-Queens Problem. The continuous system with binary outputs searches a solution of the problem without energy function. The output vector corresponds to a complete solution when the output vector becomes stable. That is, this system does never become stable without satisfying the constraints of the problem. Though it is very hard to remove limit cycle completely from this system, we can propose a new method to reduce the possibility of limit cycle by controlling time constants.
Article
Full-text available
The application of a discrete Hopfield-type neural network to solving the NP-Hard optimization problem — the N-Queens Problem (NQP) — is presented. The applied network is binary, and at every moment each neuron potential is equal to either 0 or 1. The network can be implemented in the asynchronous mode as well as in the synchronous one with n parallel running processors. In both cases the convergence rate is up to 100%, and the experimental estimate of the average computational complexity is polynomial. Based on the computer simulation results and the theoretical analysis, the proper network parameters are established. The behaviour of the network is explained.
Article
Full-text available
A natural river often finds good paths among lots of possible paths in its ways from the source to destination. These near optimal or optimal paths are obtained by the actions and reactions that occur among the water drops and the water drops with the riverbeds. The intelligent water drops (IWD) algorithm is a new swarm-based optimisation algorithm inspired from observing natural water drops that flow in rivers. In this paper, the IWD algorithm is tested to find solutions of the n-queen puzzle with a simple local heuristic. The travelling salesman problem (TSP) is also solved with a modified IWD algorithm. Moreover, the IWD algorithm is tested with some more multiple knapsack problems (MKP) in which near-optimal or optimal solutions are obtained.
Conference Paper
Full-text available
This paper addresses the way in which heuristic algorithms can be used to solve the n-queen problem. Metaheuristics for algorithm simulated annealing, tabu search and genetic algorithm are shown, test results are demonstrated and upper bound complexity is determined. The efficiencies of algorithms are compared and their achievements are measured. Due to the reduction of the fitness function complexity to O(1) problem instances with large dimensions are solved.
Article
Full-text available
We present a novel technique, N-queen lattice, to spatially subsample a block of pixels. Although this lattice is pertinent to many applications, we present an application to speed up motion estimation with minimal loss of coding efficiency. The N-queen lattice is constructed to characterize spatial features in all directions. It can be hierarchically organized for motion estimation with variable nonsquare block size. Despite the randomized lattice structure, we demonstrate that it is possible to achieve compact data storage architecture for efficient memory access and simple hardware implementation. Our simulations show that the N-queen lattice is superior to several existing sampling techniques with improvement in speed by about N times and small loss in peak SNR.
Article
Full-text available
A subsampling structure, an N-Queen lattice, for spatially decimating a block of pixels is presented. Despite its use for many applications, we demonstrate that the N-Queen lattice can be used to speed up motion estimation with nominal loss of coding efficiency. With a simple construction, the N-Queen lattice characterizes the spatial features in the vertical, horizontal, and diagonal directions for both texture and edge areas. Especially in the 4-Queen case, every skipped pixel has the minimal and equal distance of unity to the selected pixel. It can be hierarchically organized for variable nonsquare block-size motion estimation. Despite the randomized lattice, we design compact data storage architecture for efficient memory access and simple hardware implementation. Our simulations show that the N-Queen lattice is superior to several existing sampling techniques with improvement in speed by about N times and small loss in peak SNR (PSNR). The loss in PSNR is negligible for slow-motion video sequences and is less than 0.45 dB at worst for high-motion estimation sequences.
Article
In this paper we consider a new variant of Networks of Polarized Evolutionary Processors (NPEP) named Generalized Networks of Evolutionary Polarized Processors (GNPEP) and propose them as solvers of combinatorial optimization problems. Unlike the NPEP model, GNPEP uses its numerical evaluation over the processed data from a quantitative perspective, hence this model might be more suitable to solve specific hard problems in a more efficient and economic way. In particular, we propose a GNPEP network to solve a well-known NP-hard problem, namely the [Formula: see text]-queens. We prove that this GNPEP algorithm requires a linear time in the size of a given instance. This result suggests that the GNPEP model is more suitable to address problems related to combinatorial optimization in which integer restrictions have a relevant role.
Article
N-queen problem represents a class of constraint problems. It belongs to set of NP-Hard problems. It is applicable in many areas of science and engineering. In this paper N-queen problem is solved using genetic algorithm. A new genetic algoerithm is proposed which uses greedy mutation operator. This new mutation operator solves the N-queen problem very quickly. The proposed algorithm is applied on some instances of N-queen problem and results outperforms the previous findings. Copyright © 2018 Institute of Advanced Engineering and Science. All rights reserved.
Article
Quantum computers can potentially solve problems that are computationally intractable on a classical computer in polynomial time using quantum-mechanical effects such as superposition and entanglement. The N-Queens Problem is a notable example that falls under the class of NP-complete problems. It involves the arrangement of N chess queens on an N x N chessboard such that no queen attacks any other queen, i.e. no two queens are placed along the same row, column or diagonal. The best time complexity that a classical computer has achieved so far in generating all solutions of the N-Queens Problem is of the order O(N!). In this paper, we propose a new algorithm to generate all solutions to the N-Queens Problem for a given N in polynomial time of order O(N^3) and polynomial memory of order O(N^2) on a quantum computer. We simulate the 4-queens problem and demonstrate its application to satellite communication using IBM Quantum Experience platform.
Article
This paper presents a new family of low-density parity-check (LDPC) code, the sparse parity-check matrix of which is constructed by self-defining non-diagonal identity sub-matrix that is a solution of the "n-queen problem". So this sub-matrix is called the Q-matrix and these LDPC codes are called the Q-matrixes LDPC codes. The Q-matrixes LDPC codes are good or very good codes with iterative decoding and their Tanner graphs are free of 4-lines cycle. Furthermore, they can be created in cycle form. Their encoding can be achieved in linear time. Especially, their code length and code rate can be flexible and quickly adjusted according to the practical situation, and the performance of high rate is also very good. The other unique excellence is that the large sparse parity-check matrixes of long Q-matrixes LDPC codes require very small storage space. The result of this paper is very significant not only for designing low complexity encoder, improving performance and reducing the complexity of the sum-product iterative decoding algorithm, but also for building practice system of encodable and decodable LDPC code.
Conference Paper
The N-Queens problem is a commonly used example in computer science. There are numerous approaches proposed to solve the problem. We introduce several definitions of the problem, and review some of the algorithms. We classify the algorithms for the N-Queens problem into 3 categories. The first category comprises the algorithms generating all the solutions for a given N. The algorithms in the second category are desinged to generate only the fundamental solutions [34]. The algorithms in the last category generate only one or several solutions but not necessarily all of them.
Conference Paper
We present a technique to improve the speed of block motion estimation using only a subset of pixels from a block to evaluate the distortion with minimal loss of coding efficiency. To select such a subset we use a special sub-sampling structure, N-queen pattern. The N-queen pattern can characterize the spatial information in the vertical, horizontal and diagonal directions for both texture and edge features. In the 4-queen case, it has a special property that every skipped pixel has the minimal and equal distance of one to the selected pixel. Despite of the randomized pattern, our technique has compact data storage architecture. Our results show that the pixel decimation of N-queen patterns improves the speed by about N times with small loss in PSNR. The loss in PSNR is negligible for slow motion video sequence and has 0.45 dB loss in PSNR at worst for high motion video sequence.
Article
In this paper we survey known results for the n-queens problem of placing n nonattacking queens on an n×n chessboard and consider extensions of the problem, e.g. other board topologies and dimensions. For all solution constructions, we either give the construction, an outline of it, or a reference. In our analysis of the modular board, we give a simple result for finding the intersections of diagonals. We then investigate a number of open research areas for the problem, stating several existing and new conjectures. Along with the known results for n-queens that we discuss, we also give a history of the problem. In particular, we note that the first proof that n nonattacking queens can always be placed on an n×n board for n>3 is by E. Pauls, rather than by W. Ahrens who is typically cited. We have attempted in this paper to discuss all the mathematical literature in all languages on the n-queens problem. However, we look only briefly at computational approaches.
Article
We demonstrate a method using linear congruence equations to generate solutions to the N-Queens problem. There are only a few papers in the literature generating solutions for every N. Our method generates solutions for every N, and the number of solutions produced by our method is larger than the number of solutions given in these papers.
Article
This paper presents a computer analysis of statistical secondary structure of nucleic acids. For a given single stranded nucleic acid, we generated “structure map” which included all the annealig structures in the sequence. The map was transformed into “energy map” by rough approximation; here, the energy level of every pairing structure consisting of more than 2 successive nucleic acid pairs was calculated. By using the “energy map”, the probability of occurrence of each annealed structure was computed, i.e., the structure was computed statistically. The basis of computation was the 8-queen problem in the chess game. The validity of our computer programme was checked by computing tRNA structure which has been well established. Successful application of this programme to small nuclear RNAs of various origins is demonstrated.
Linear algorithm for solution N-Queens Completion problem
  • grigoryan
Proposal of 8-queens problem
  • bezzel
A Linear Time Pattern Based Algorithm for N-Queens Problem
  • B Karabulut
  • A Ergüzen
  • H M Ünver
A New Approach to Solve N-Queen Problem with Parallel Genetic Algorithm
  • M Taheri Sarvetamin
  • A Khatibi
  • M Zahedi
A New Approach to Solve N-Queen Problem with Parallel Genetic Algorithm
  • sarvetamin