8

Is it possible to place one queen and at least 29 knights in a 8$\times$8 chess board such that no 2 pieces attack each other?

I thought to try to use the bound $\lceil \frac{mn}{2} \rceil $ for the number of knights in a $m \times n$ chessboard such that they don't attack each other, but that requires $m,n >2$, and for some queen positions, that doesn't apply.

I also thought that if we had a queen, there are at most 7 rows to place the knights, so then there have to be 5 knights in one row. I'm not sure what use that could be though.

RobPratt
  • 45,619
  • Huh? Your answer might be right, but I don't think your reasoning is. Why can't several knights all attack the same empty square? – David G. Stork Aug 20 '21 at 19:16
  • 3
    You can put $32$ knights on an $8 \times 8$ chessboard, with none of them attacking any other, by simply putting a knight on every white (or every black) square. – Robert Shore Aug 20 '21 at 19:18
  • @justadumbguy: Are you sure there isn't a typo in your problem. I think $29$ is way too large to work. Might the question state instead $19$? THAT works. – David G. Stork Aug 20 '21 at 19:37
  • @DavidG.Stork how does one even transform this problem into a combinatorial one, solved with algebraic or combinatorial technique? These puzzles defy parametrising as far as I can tell – FShrike Aug 20 '21 at 19:49
  • @FShrike: Indeed. I think the only viable approach is computer search... possibly with some increase in efficiency based on the symmetries of the problem (e.g., we need only consider positions for the queen in one quadrant). Anyway, my current answer to the OP is: "no." – David G. Stork Aug 20 '21 at 19:51
  • @DavidG.Stork How do you place $24$ knights on the board without one of them attacking the queen? I can't do better than $22$. – Robert Shore Aug 20 '21 at 22:03
  • @RobertShore: Forgive me... I was wrong. I noticed two of my knights actually attacked the queen, so yes: 22. (I'll delete the old comment.). Thanks. Nevertheless, I think we agree the answer to the OP's question is "no." – David G. Stork Aug 20 '21 at 22:07
  • Do the sides matter (e.g., 14 white knights and 15 black)? – Robert Soupe Aug 21 '21 at 01:29
  • See also https://math.stackexchange.com/questions/3257858/independence-problem-one-rook-and-maximum-number-of-knights-on-the-chessboard/3278158#3278158 – RobPratt Aug 21 '21 at 01:30
  • If the sides matter, then here's one solution: http://www.chessvideos.tv/bimg/126omnfkdyz6.png But if the sides don't matter, then it's not a solution... – Robert Soupe Aug 21 '21 at 01:35

2 Answers2

7

First of all, here is the proof that you can put no more than $32$ non-attacking knights on a chessboard. You can pair up the squares of the board into $32$ pairs, where each pair is a knight's move apart, as shown below. Since you can place at most one knight in each pair, you can place at most $32$ knights.

Now, imagine placing a queen on some square in this same diagram, and then placing an X on every square attacked by the queen, as well as an X on the squares a knight's move away from the queen. No matter where you place the queen, at least $4$ of these pairs will have both of their squares X'ed out. Therefore, the number of knights you can place is reduced by at least four, so you cannot place more than $28$ knights.

For example, when the queen is placed at $\mathrm A1$, the lower left corner, then the pairs $\mathrm {A1-C2, A2-C1,B2-D1}$, and $\mathrm{A4-C3}$ are all X'ed out (the letter is the column, and the number is the row). It is not too hard to verify case by case that the queen always X's out at least $4$ of these pairs. In fact, as the queen moves closer to the center, she X's out more pairs.

Mike Earnest
  • 75,930
4

Via integer linear programming I have found that if you force at least one queen, you can place at most $22$ knights, and here is one such solution: $$ \begin{matrix}&.&N&.&N&.&N&.&.\\&N&.&N&.&N&.&N&.\\&.&N&.&N&.&N&.&.\\&N&.&N&.&N&.&N&.\\&.&N&.&N&.&N &.&.\\&N&.&N&.&N&.&.&.\\&.&N&.&N&.&.&.&.\\&.&.&.&.&.&.&.&Q\\\end{matrix} $$


As in this problem where the queen is replaced with a rook, for each of the $10$ essentially different placements of the queen, linear programming duality provides a certificate of optimality. For example, if the queen is placed in the bottom right corner, the following partition of the remaining unattacked squares into $22$ sets shows that at most $22$ knights can be placed: $$\begin{matrix} . &19 &1 &20 &2 &3 &4 &. \\ 1 &. &2 &5 &4 &6 &21 &. \\ 7 &8 &. &9 &10 &5 &3 &. \\ 11 &12 &7 &. &13 &9 &6 &. \\ 8 &14 &15 &12 &. &10 &16 &. \\ 17 &11 &18 &13 &16 &. &. &. \\ 14 &15 &17 &22 &18 &. &. &. \\ . &. &. &. &. &. &. &. \\ \end{matrix} $$ This is a refinement of the approach shown by @Mike Earnest, and it yields similar certificates for the other $9$ cases.

RobPratt
  • 45,619