How to place eight queens on a chessboard so that none can attack another

How to place eight queens on a chessboard so that none can attack another
Image: Intellect (generated)

In short: The eight queens puzzle challenges you to place eight queens on a standard chessboard so that no two threaten each other. While it seems like a simple game, it hides 92 distinct solutions and has served as a classic benchmark for computer programming techniques since the 19th century.

First posed by chess composer Max Bezzel in 1848, the eight queens puzzle requires placing eight queens on an 8x8 grid such that no two share a row, column, or diagonal. Franz Nauck provided the first solutions in 1850 and later expanded the concept into the n-queens problem, which explores placing n queens on an n x n board. While solutions exist for all n except 2 and 3, the complexity grows rapidly; there are over 4.4 billion possible arrangements for an 8x8 board, yet only 92 valid configurations.

These 92 solutions are not all unique in a geometric sense. By accounting for symmetry—specifically rotations and reflections—mathematicians identify 12 fundamental solutions. Most of these fundamental solutions have eight variants, but one unique solution is identical to its own 180-degree rotation, resulting in only four variants. This brings the total count to 92. Beyond simple counting, the puzzle has been a testing ground for algorithmic efficiency. In 1972, Edsger Dijkstra famously used it to demonstrate the power of structured programming and depth-first backtracking.

The problem extends into fascinating mathematical territory. For large n, Michael Simkin proved in 2021 that the number of solutions grows at an asymptotic rate involving a constant between 1.939 and 1.945. Researchers have also explored toroidal boards, where diagonals wrap around the edges, and higher-dimensional chess spaces where the number of non-attacking queens can exceed the board's side length. Even on a standard board, the puzzle remains a vital case study in combinatorics, illustrating how simple constraints can generate complex, non-obvious patterns.

Opens the Intellect+ feed with this card first. Swipe up for the next one.

Sources

To cite this card, link to https://intellectplus.co.uk/app/science-eight-queens-puzzle.

How we source, check and correct cards: Editorial standards.

General information, not professional advice. Spotted an error? Flag the card or see corrections and complaints.

Intellect Plus is a visual educational discovery platform for exploring fascinating facts and ideas. Brain Food, Not Brain Rot. What is Intellect Plus?

Related

Finding something worth knowing…