N-Queens Problem

From Algorithm Wiki
Jump to navigation Jump to search

Problem Description

The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two queens attack each other. Generate all possible configurations of queens on board and print a configuration that satisfies the given constraints.

Bounds Chart

N-Queens problemBoundsChart.png

Step Chart

N-Queens problemStepChart.png

Improvement Table

Complexity Classes Algorithm Paper Links Lower Bounds Paper Links
Exp/Factorial [ Naive Algorithm (1848)]

[ Naive + 1 queen per row restriction (1850)]

Dijkstra (1972)

[ Nauck (1850)]

[ Gunther Determinants solution (1874)]

Rivin, Zabih (1992)

Grigoryan (2018)

Polynomial > 3
Cubic
Quadratic
nlogn
Linear
logn