;Higher dimensions :Find the number of non-attacking queens that can be placed in a
d-dimensional chess of size
n. More than
n queens can be placed in some higher dimensions (the smallest example is four non-attacking queens in a 3×3×3 chess space), and it is in fact known that for any
k, there are higher dimensions where
nk queens do not suffice to attack all spaces. ;Using pieces other than queens :On an 8×8 board one can place 32
knights, or 14
bishops, 16
kings or 8
rooks, so that no two pieces attack each other. In the case of knights, an easy solution is to place one on each square of a given color, since they move only to the opposite color. The solution is also easy for rooks and kings. Sixteen kings can be placed on the board by dividing it into 2-by-2 squares and placing the kings at equivalent points on each square. Placements of
n rooks on an
n×
n board are in direct correspondence with order-
n permutation matrices. ;Chess variations :Related problems can be asked for
chess variations such as
shogi. For instance, the
n+
k dragon kings problem asks to place
k shogi pawns and
n+
k mutually nonattacking
dragon kings on an
n×
n shogi board. ;Nonstandard boards :
Pólya studied the
n queens problem on a
toroidal ("donut-shaped") board and showed that there is a solution on an
n×
n board if and only if
n is not divisible by 2 or 3. ;Domination :Given an
n×
n board, the
domination number is the minimum number of queens (or other pieces) needed to attack or occupy every square. For
n = 8 the queen's domination number is 5. ;Queens and other pieces :Variants include mixing queens with other pieces; for example, placing
m queens and
m knights on an
n×
n board so that no piece attacks another or placing queens and pawns so that no two queens attack each other. ;
Magic squares :In 1992, Demirörs, Rafraf, and Tanik published a method for converting some magic squares into
n-queens solutions, and vice versa. ;
Latin squares :In an
n×
n matrix, place each digit 1 through
n in
n locations in the matrix so that no two instances of the same digit are in the same row or column. ;
Exact cover :Consider a matrix with one primary column for each of the
n ranks of the board, one primary column for each of the
n files, and one secondary column for each of the 4
n − 6 nontrivial diagonals of the board. The matrix has
n2 rows: one for each possible queen placement, and each row has a 1 in the columns corresponding to that square's rank, file, and diagonals and a 0 in all the other columns. Then the
n queens problem is equivalent to choosing a subset of the rows of this matrix such that every primary column has a 1 in precisely one of the chosen rows and every secondary column has a 1 in at most one of the chosen rows; this is an example of a generalized
exact cover problem, of which
sudoku is another example. ;
n-queens completion :The completion problem asks whether, given an
n×
n chessboard on which some queens are already placed, it is possible to place a queen in every remaining row so that no two queens attack each other. This and related questions are
NP-complete and
#P-complete. Any placement of at most
n/60 queens can be completed, while there are partial configurations of roughly
n/4 queens that cannot be completed. ==Exercise in algorithm design==