ArticlePDF Available

Abstract and Figures

The classic n-queens problem asks for placements of just n mutually non-attacking queens on an n × n board. By adding enough pawns, we can arrange to fill roughly one-quarter of the board with mutually non-attacking queens. How many pawns do we need? We discuss that question for square boards as well as rectangular m × n boards.
Content may be subject to copyright.
Games and Puzzles
the maximum queens problem
with pawns
Doug Chatham
Morehead State University, Department of Mathematics and Physics
d.chatham@moreheadstate.edu
Abstract: The classic n-queens problem asks for placements of just nmutually
non-attacking queens on an n×nboard. By adding enough pawns, we can
arrange to fill roughly one-quarter of the board with mutually non-attacking
queens. How many pawns do we need? We discuss that question for square
boards as well as rectangular m×nboards.
Keywords: chess, n-queens problem, combinatorics.
The n-queens problem
Take a standard chessboard and as many queens as possible. How many queens
can you put on the chessboard, with at most one queen in each square, so that no
queen “attacks” (i.e. is a vertical, horizontal, or diagonal move away from) any
other queen? Figure 1 shows a placement of eight mutually
non-attacking queens. Finding such arrangements is the classic
“8-queens problem”, first proposed by M. Bezzel in 1848. In 1869 this problem
was generalized to the “n-queens problem” of placing nmutually non-attacking
queens on an n×nboard. The n-queens problem has solutions for N= 1
and N>4. Hundreds of papers have been written on this problem and its
variations, including versions on other board shapes (including cylinders, toruses,
and three-dimensional boards) and other piece types (including bishops, rooks,
and fairy pieces) . We refer interested readers to the book Across the Board:
The Mathematics of Chessboard Problems by J. J. Watkins [5], the n-queens
survey article by J. Bell and B. Stevens [1], and the online n-queens
bibliography maintained by W. Kosters [4].
Recreational Mathematics Magazine, Number 6, pp. 95–102
DOI 10.1515/rmm–2016–0010
Unauthenticated
Download Date | 12/9/16 1:39 PM
96 the maximum queens problem with pawns
80Z0Z0l0Z
7Z0ZqZ0Z0
60Z0Z0ZqZ
5l0Z0Z0Z0
40Z0Z0Z0l
3ZqZ0Z0Z0
20Z0ZqZ0Z
1Z0l0Z0Z0
a b c d e f g h
Figure 1: Eight mutually non-attacking queens on a standard chessboard.
Peppering the problem with pawns
Can we do better? Can we put more than eight queens on a standard
chessboard or more than nqueens on an n×nchessboard? If we follow the
rules of the classic problem, the answer is clearly “no”: each queen attacks every
other square on its row (or column), so there is at most one queen per row (or
column) and thus at most nqueens on an n×nboard.
We now change the rules in order to allow more queens on the board. Recall
that in chess, queens do not move through other pieces. If we put a pawn in a
square between two queens that are in the same row, column, or diagonal, those
queens no longer attack each other. If we allow the placement of some pawns,
how many mutually non-attacking queens can we place on the board? This is
the “maximum queens problem”, posed in 1998 by K. Zhao in her disseration [6].
For n>6, we can put n+ 1 queens on the board with 1 pawn [3, Theorem 1].
Figure 2 shows an example arrangement. Zhao proved that we need 3 pawns to
put 6 queens on a 5 ×5 board [6]. For each k > 0, we can place n+kmutually
non-attacking queens on an n×nboard with kpawns, if nis sufficiently large
[2, Theorem 11].
Recreational Mathematics Magazine, Number 6, pp. 95–102
DOI 10.1515/rmm–2016–0010
Unauthenticated
Download Date | 12/9/16 1:39 PM
Doug Chatham 97
80Z0l0Z0Z
7l0ZpZ0Zq
60Z0ZqZ0Z
5ZqZ0Z0Z0
40Z0Z0l0Z
3Z0l0Z0Z0
20Z0Z0ZqZ
1Z0ZqZ0Z0
a b c d e f g h
Figure 2: Nine mutually non-attacking queens with one pawn on a standard
chessboard.
How much further can we go? If we don’t care how many pawns we place on
the board, we can place n2
4queens if nis even and (n+1)2
4queens if nis odd.
To see this, take an n×nboard and divide it into two-column strips (with
a one-column strip at the end if nis odd) and divide each strip into two-row
block (with one-row blocks at the bottom if nis odd) as shown in Figure 3. Now
consider the blocks. If we put two queens in any of these blocks, they will be
in adjacent squares and will attack each other, regardless of how many pawns
are on the board. So, the maximm number of queens we can put on the board
equals the number of blocks, which is n2
4queens if nis even and (n+1)2
4queens
if nis odd. To see that we can place that many queens, on the first, third, etc.
rows place a queen in the first, third, etc. squares and then place pawns in every
empty square, as indicated in Figure 3.
lplpl
popop
lplpl
popop
lplpl
Figure 3: A 5 ×5 chessboard divided into blocks, each of which can hold at
most one queen if no queens can attack other queens.
Recreational Mathematics Magazine, Number 6, pp. 95–102
DOI 10.1515/rmm–2016–0010
Unauthenticated
Download Date | 12/9/16 1:39 PM
98 the maximum queens problem with pawns
Can we place the maximum number of queens with fewer pawns? If nis odd, the
answer is “no”. Consider Figure 3 again. When nis odd, the
partition produces a 1 ×1 block in the last row and column. To get the
maximum number of queens, each block must have a queen, so the 1 ×1 corner
must have a queen. This forces the placement of all the other queens. There
is only one way to place the queens, and the squares without queens are each
between two queens and therefore require pawns. We now consider the case
where nis even.
Proposition 1. For n= 4k+ 2 with k>1, it is possible to place n2
4queens
and n2
43pawns on an n×nboard so that no queens attack each other.
Proof Sketch: We present a pattern with n2
4queens and n2
4pawns. Label the
rows and columns 0,1. . . n 1 as shown in Figure 4. In rows with labels of the
form 4k+ 1 (i.e. rows 1, 5, 9,etc.) in the squares whose row number exceeds
their column number, place queens in even-numbered columns and pawns in
odd-numbered columns. In rows with labels of the form 4k+ 3 (i.e. rows 3, 7,
etc.) , in the squares whose row number exceeds their column number, place
pawns in even-numbered columns and queens in odd numbered columns. To
obtain the rest of the pattern, reflect across the main diagonal and change the
piece type, so for each position (x, y), the piece in (y, x) is a queen if and only
if the piece in (x, y) is a pawn.
9qoqoqoqoqZ
8Z0Z0Z0Z0ZP
7plplplpZ0L
6Z0Z0Z0ZQZP
5qoqoqZ0O0L
4Z0Z0ZPZQZP
3plpZ0L0O0L
2Z0ZQZPZQZP
1qZ0O0L0O0L
0ZPZQZPZQZP
0123456789
Figure 4: “Corner” pattern.
Recreational Mathematics Magazine, Number 6, pp. 95–102
DOI 10.1515/rmm–2016–0010
Unauthenticated
Download Date | 12/9/16 1:39 PM
Doug Chatham 99
We can show that the board has n2
4queens and n2
4pawns and that none of the
queens attack each other. Finally, we note that we can remove the pawns in
positions (0,1),(0, n 1),and (n2, n 1) and the queens will still not attack
each other.
When nis a multiple of 4, we can do slightly better.
Proposition 2. For n= 4kwith k>1, it is possible to place n2
4queens and
n2
44pawns on an n×nboard so that no queens attack each other.
Proof Sketch: Again we present a pattern (as illustrated in Figure 5) that
produces the desired results. Given a 4k×4kboard, label the rows and
columns 2k . . . 2k1. In the upper-right quadrant (i.e. the positions with both
coordinates nonnegative), place queens and pawns in the “corner” pattern of the
previous Proposition, except do not remove any pawns like we did
previously. Rotate the board a quarter-turn, relabel rows and columns, and
place queens and pawns in the new upper-right quadrant in the corner pattern.
Repeat the previous sentence two more times.
We now have a “dartboard” pattern, symmetric with respect to quarter-turn
rotation, with n2
4queens and n2
4pawns. We can check that none of the queens
attack any of the other queens. We conclude by noting that four pawns in
the outer ring formed by the first and last rows and the first and last columns
(circled in Figure 5) can be removed.
0lplplpZ
o0Z0Z0Zq
qZ0oqZ0o
o0l0ZpZq
qZpZ0l0o
o0Zqo0Zq
qZ0Z0Z0o
Zplplpl0
Figure 5: “Dartboard” pattern
Can we do better? Are there patterns on even-order boards with the maximum
number of queens but fewer pawns? Computer experiments for small board
sizes indicate that the answer is “no”, but we don’t have a general proof.
Recreational Mathematics Magazine, Number 6, pp. 95–102
DOI 10.1515/rmm–2016–0010
Unauthenticated
Download Date | 12/9/16 1:39 PM
100 the maximum queens problem with pawns
Stretching to Rectangles
We can extend the results to rectangular boards of size m×nwhere mis not
necessarily equal to n. Dividing the board into blocks as we did for square
boards, we get that the maximum number of non-attacking queens we can
place on such boards is dm
2edn
2e, where dxeis the smallest integer greater
than or equal to x. For example, on a 4 ×7 board we can place at most
d4
2ed7
2e=d2ed3.5e= (2)(4) = 8 queens, as illustrated in Figure 6. If both m
and nare odd, there is only one way to place the queens and every other square
requires a pawn.
So we make at least one of the dimensions even.
Proposition 3. If mor nis even, we can place dm
2edn
2equeens and dm
2edn
2e− 2
pawns on an m×nboard so that no two queens attack each other.
Proof sketch: Suppose without loss of generality that mis even. Label the
rows 0,1, . . . , m 1 and the columns 0,1, . . . , n 1. In columns with labels
of the form 4k, place queens in the even-numbered rows and pawns in the
odd-numbered rows. In columns with labels of the form4k+ 2, place pawns
in the even-numbered rows and queens in the odd-numbered rows. We get a
striped pattern as illustrated in Figure 6. We can check that none of the queens
attack each other and that there are the right number of queens. We conclude
by eliminating a pawn in the first and last non-empty columns, as indicated in
Figure 6.
3pZqZpZq
2l0o0l0o
1pZqZpZq
0l0o0l0o
0123456
Figure 6: “Stripe” pattern
If mor nis 2, that is the best possible result: A 2-row board without pawns
can hold at most 2 queens, one per row. Each pawn increases the number of
available “rows” by at most 1. So the total number of queens on such a board
is at most 2 more than the number of pawns. The number of pawns needed to
get dm
2edn
2equeens on a 2-row (or 2-column) board is dm
2edn
2e − 2.
If both mand nare even and larger than 2, we can do better, using portions of
the “corner” pattern.
Recreational Mathematics Magazine, Number 6, pp. 95–102
DOI 10.1515/rmm–2016–0010
Unauthenticated
Download Date | 12/9/16 1:39 PM
Doug Chatham 101
Proposition 4. If m > 2and n > 2are even, then we can place dm
2edn
2equeens
and dm
2edn
2e − 3pawns on an m×nboard so that no two queens attack each
other.
Proof Sketch: Suppose without loss of generality that m < n. Take an n×n
board and place queens and pawns according to the procedure for the
corner pattern, without the final pawn removal. If mis a multiple of 4, remove
rows m, . . . , n 1, and note that the pawns at positions (0,1),(m1,0) and
either (0, n 1) or (m1, n 1) can be removed. If mis not a multiple of 4,
remove columns m, . . . , n 1, note that pawns at (0,1),(0, m 1),and either
(n1, m1) or (n1,0) can be removed, and then transpose rows and columns.
Can we do better? The results of computer experimentation with low values of
mand nindicate that the answer is “no”, but, again, we have no general proof.
Other Directions
This paper leaves many questions open for future research. Here are a few:
1. A common thing to do with the classic n-queens problem is to count the
number of solutions for particular values of n. Except when mand n
are both odd, we haven’t done that with the maximum queens problem.
Given the maximum number of queens and the minimum
necessary number of pawns, how many ways can those pieces be arranged
on an m×nboard (with mor neven) so that none of the queens attack
each other?
2. Clearly, with enough pawns, we can place qmutually non-attacking queens
for 0 6q6dm
2edn
2e. How many pawns are needed?
3. What results can we get on other types of board, such as cylindrical
boards, Mobius strips, and toruses? Observe that the
maximum number of queens is the same as the maximum number of kings
you can put on the board so that no kings are on adjacent squares: If
no two pieces are on adjacent squares, we can separate them with pawns.
The maximum number of nonadjacent kings is referred to as the “kings
independence number” and it is known for many board types [5]. For
example, the kings independence number on an m×ntorus is
min{bmbn
2c
2c,bnbm
2c
2c} [5, Theorem 11.1] (where bxcis the largest
integer less than or equal to x) and that number is also the maximum
number of non-attacking queens we can put on that board with
sufficiently many pawns. So, the interesting question is “How many pawns
do we need?”
Recreational Mathematics Magazine, Number 6, pp. 95–102
DOI 10.1515/rmm–2016–0010
Unauthenticated
Download Date | 12/9/16 1:39 PM
102 the maximum queens problem with pawns
References
[1] Bell, J., Stevens, B. “A survey of known results and research areas for
n-queens”, Discrete Math, 309, 1–31, 2009.
[2] Chatham, R. D., Doyle, M., Fricke, G. H., Reitmann, J., Skaggs, R.
D., Wolff, M. “Independence and domination separation on chessboard
graphs”, J. Combin. Math. Combin. Comput, 68, 3–17, 2009.
[3] Chatham, R. D., Fricke, G. H., Skaggs, R. D. “The queens separation
problem”, Util. Math, 69, 129–141, 2006.
[4] Kosters, W. A. n-Queens bibliography, 2016.
http://www.liacs.nl/home/kosters/nqueens/
[5] Watkins, J. J. Across the Board: The Mathematics of Chessboard Problems,
Princeton University Press, 2004.
[6] Zhao, K. The Combinatorics of Chessboards, Ph.D. dissertation, City
University of New York, 1998.
Recreational Mathematics Magazine, Number 6, pp. 95–102
DOI 10.1515/rmm–2016–0010
Unauthenticated
Download Date | 12/9/16 1:39 PM
... Proof: On a 1 × 1 or a 2 × 2 board, a single dragon horse placed on any square leaves all other empty squares attacked, so β(H 1 ) = β(H 2 ) = 1. To see that β(H 4 ) 4, place dragon horses on squares (0, 0), (0, 2), (2, 1), and (2,3). To see that β(H 4 ) 4, partition the board into a 2 × 2 array of 2 × 2 blocks and note that each block can only hold one dragon horse of an independent set. ...
... 5. Since chess queens do not move through other pieces, placing pawns on a board may increase the maximum number of independent queens we can put on that board. In [3] it is noted that the maximum number of mutually nonattacking queens that can be placed on an n × n board with pawns is n 2 4 if n is even and (n+1) 2 ...
... That argument also works for dragon kings and dragon horses. So, as [3] asks for queens, how many pawns are needed to allow the maximum number of dragon kings or dragon horses on the board? ...
Article
Full-text available
Given a (symmetrically-moving) piece from a chesslike game, such as shogi, and an n×n board, we can form a graph with a vertex for each square and an edge between two vertices if the piece can move from one vertex to the other. We consider two pieces from shogi: the dragon king, which moves like a rook and king from chess, and the dragon horse, which moves like a bishop and rook from chess. We show that the independence number for the dragon kings graph equals the independence number for the queens graph. We show that the (independent) domination number of the dragon kings graph is n − 2 for 4 ≤ n ≤ 6 and n − 3 for n ≥ 7. For the dragon horses graph, we show that the independence number is 2n − 3 for n ≥ 5, the domination number is at most n−1 for n ≥ 4, and the independent domination number is at most n for n ≥ 5.
... Conclusively, the problem has been told in the process of integer programming corresponding to the assignment program. The below figure [6] explains about one of the example for 8*8 queen problem. The solutions for n queen value in N*N chessboard are fixed. ...
Article
Full-text available
The combinatorial optimization problem is a collection of problems which need a sample amount of time and effort to be solved. Vast difficulties have been occurring to solving these types of problem that there is no exact formula to solve the problem. Each feasible solution works on some order and the size of the probability increases algorithmically as the number of the problem also increases dynamically. This paper discusses about N-Queen problem, it is also a type of NP-hard problem. Many researchers have proposed various methods and algorithms for this problem. Henceforth, Genetic Algorithm is one kind of famous algorithm for solving NP hard problems. This paper mainly focuses on the review work of genetic algorithm to solve the N-Queen Problems (NPQ).
Article
Full-text available
We define a legal placement of Queens to be any placement in which any two attacking Queens can be separated by a Pawn. The Queens separation number is defined to be equal to the minimum number of Pawns which can separate some legal placement of m Queens on an order n chess board. We prove that n + 1 Queens can be separated by 1 Pawn and conjecture that n + k Queens can be separated by k Pawns for large enough n. We also provide some results on the separation number of other chess pieces.
Article
Full-text available
A legal placement of Queens is any placement of Queens on an order N chessboard in which any two attacking Queens can be separated by a Pawn. The Queens independence separation number is the minimum number of Pawns which can be placed on an N × N board to result in a separated board on which a maximum of m independent Queens can be placed. We prove that N + k Queens can be separated by k Pawns for large enough N and provide some results on the number of fundamental solutions to this problem. We also introduce separation relative to other domination-related parameters for Queens, Rooks, and Bishops.
Article
In this paper we survey known results for the n-queens problem of placing n nonattacking queens on an n×n chessboard and consider extensions of the problem, e.g. other board topologies and dimensions. For all solution constructions, we either give the construction, an outline of it, or a reference. In our analysis of the modular board, we give a simple result for finding the intersections of diagonals. We then investigate a number of open research areas for the problem, stating several existing and new conjectures. Along with the known results for n-queens that we discuss, we also give a history of the problem. In particular, we note that the first proof that n nonattacking queens can always be placed on an n×n board for n>3 is by E. Pauls, rather than by W. Ahrens who is typically cited. We have attempted in this paper to discuss all the mathematical literature in all languages on the n-queens problem. However, we look only briefly at computational approaches.
A. n-Queens bibliography
  • W Kosters
Kosters, W. A. n-Queens bibliography, 2016. http://www.liacs.nl/home/kosters/nqueens/
The Combinatorics of Chessboards
  • K Zhao
Zhao, K. The Combinatorics of Chessboards, Ph.D. dissertation, City University of New York, 1998.
The of Chessboards Ph dissertation City University of New York
  • Zhao
n Queens bibliography http www liacs nl home kosters nqueens
  • Kosters