search
Get Started
search
N-Queens Problem - Logic Puzzle
zoom_in Click to enlarge

N-Queens Problem

description N-Queens Problem Overview

The N-Queens Problem is a classic combinatorial puzzle first published by chess composer Max Bezzel in 1848. The challenge requires placing N queens on an N×N chessboard so that no two queens threaten each other, meaning no two queens share the same row, column, or diagonal. Beyond its recreational appeal, the problem has become important in computer science as an example for studying algorithm efficiency, constraint satisfaction, and backtracking search techniques.

insights Ranking position

N-Queens Problem ranks #26 of 93 in the Logic Puzzle ranking, behind Blue Eyes Puzzle, ahead of Shikaku.

help N-Queens Problem FAQ

Who invented the N-Queens Problem?

The N-Queens Problem was first published by German chess composer Max Bezzel in 1848 as the 8-Queens Problem. It was later generalized to N queens on an N×N board by mathematicians including Édouard Lucas in the 1870s.

How many solutions does the 8-Queens Problem have?

The standard 8-Queens Problem on a conventional 8×8 chessboard has 92 total solutions. When rotations and reflections are excluded, there are 12 fundamentally distinct solutions.

What is the smallest board size where N-Queens has solutions?

Solutions exist for N=1 and for all N≥4. There are no possible solutions for N=2 or N=3, making N=4 the smallest non-trivial case, which has exactly 2 total solutions (or 1 fundamental solution).

What algorithm is commonly used to solve N-Queens programmatically?

Backtracking is the most common algorithm taught for N-Queens, where the program places queens column by column and backtracks when a conflict is detected. It is frequently used in computer science courses to demonstrate recursion and constraint satisfaction techniques.

Reviews & Comments

Write a Review

rate_review

Be the first to review

Share your thoughts with the community and help others make better decisions.

Save to your list

Save your favorites and follow how their scores change over time.

Save favorites
Get updates
Compare scores

Already have an account? Sign in

Compare Items

See how they stack up against each other

Comparing
VS
Select 1 more item to compare