Doubt about $n$-queens problem when $\gcd(n,6) = 1$

chessboardgraph theorynumber theory

In the $n$-queens problem, we attempt to place $n$ queens on an $n \times n$ chessboard so that no two of the queens attack each other; that is, no two queens share a row, column, or diagonal.

A modular solution to the $n$-queens problem satisfies a stricter condition. Here, the diagonals wrap around one side of the board to continue around the other side. We still do not want queens to share rows, columns, or diagonals, but now it is harder. Equivalently, a modular solution is a solution which continues to work after a (modular) translation of the board is applied (say, every queen shifts $i$ to the right and $j$ down, identifying the $1^{\text{st}}$ row as the one that comes next the last and likewise for column).

It was shown by PĆ³lya that the $n$-queens problem can only have modular solutions if $\gcd(n,6) = 1$; equivalently, if $n \equiv \pm 1 \pmod 6$. (See section 5 of A survey of known results and research areas for $n$-queens by Bell and Stevens for more details.)

My question is: if $\gcd(n,6) = 1$, then are all solutions modular? Or can there be normal solutions which are not preserved by translation?

Best Answer

It seems that all $5$ queens solutions are modular, but here is a $7$ queens solution which is not: $$ \begin{array}{|c|c|c|c|c|c|c|} \hline &Q\rule[-0.6ex]{0ex}{3ex}\\ \hline &&&Q\rule[-0.6ex]{0ex}{3ex}\\ \hline Q\rule[-0.6ex]{0ex}{3ex}\\ \hline &&&&&&Q\rule[-0.6ex]{0ex}{3ex}\\ \hline &&&&Q\rule[-0.6ex]{0ex}{3ex}\\ \hline &&Q\rule[-0.6ex]{0ex}{3ex}\\ \hline &&&&&Q\rule[-0.6ex]{0ex}{3ex}\\ \hline \end{array} $$ Rotating this board to the left or right will cause a conflict between the queens on the third and fourth rows.