Unlike the famous 8 Queens Problem (where the goal is to place eight queens without them threatening each other), the Queens Domination Problem poses the inverse question from a spatial control standpoint: what is the minimum number of queens needed to attack or guard all squares on a chessboard?
In graph theory, this challenge is equivalent to finding the domination number ($\gamma$) of the queen’s graph. A square is considered “dominated” if it contains a queen or if it is within direct reach of at least one queen (in the same row, column, or diagonal).
Given a standard $8 \times 8$ chessboard, we must determine the smallest possible number of queens that can be deployed so that no empty square is left unattacked.
Would you like to try solving it logically before looking at its mathematical formulation?
Challenge solution
By solving the model with an integer optimization solver like Gurobi, it can be proven that the minimum domination number for an $8 \times 8$ board is 5 queens.
One of the optimal configurations obtained places the queens as shown in the following figure:
How do we translate this coverage of attack lines into a Binary Linear Optimization model?
To model this problem, we define the attack range of a queen from each cell on the board. If we place a queen in cell $(r,c)$, it dominates all cells aligned horizontally, vertically, or diagonally.
\(\mathcal{A}_{ij} \subset \mathcal{I} \times \mathcal{J}\): Set of cells $(r,c)$ from which a queen would attack cell $(i,j)$ (including cell $(i,j)$ itself). A cell $(r,c) \in \mathcal{A}_{ij}$ if it satisfies any of these conditions:
Same row: \(r = i\)
Same column: \(c = j\)
Same diagonal: \(\lvert r - i \rvert = \lvert c - j \rvert\)
Decision variables
\(x_{ij} = 1\) if a queen is placed in cell $(i,j)$, and $0$ otherwise, $\forall i \in \mathcal{I}, \; \forall j \in \mathcal{J}$
Objective function
We want to minimize the total number of queens placed on the board:
\[\min z = \sum_{i \in \mathcal{I}} \sum_{j \in \mathcal{J}} x_{ij}\]
The domination constraints ensure that every cell $(i,j)$ is covered:
Coverage (Domination) Constraint:
For each cell $(i,j)$, the sum of queens in cells that can attack it must be at least $1$:
Martín-Campo, F. Javier (2026). Dominating the chessboard with queens. https://www.fjmartincampo.com/blog/2026/queensdomination/
As a BibTeX entry:
@misc{martín-campo2026dominating-the-chessboard-with-queens,title={Dominating the chessboard with queens},author={Martín-Campo, F. Javier},year={2026},month={jun},url={https://www.fjmartincampo.com/blog/2026/queensdomination/}}