10
$\begingroup$

With the white queen on a light-coloured square of your choosing, can you place 7 rooks on the dark squares of the chessboard so that no piece attacks another?

example position with seven black rooks and one white queen

In the above Lichess illustration (with the lovely "horsey" piece set), the rooks are attacking each other, so that one isn't a valid solution.

  • If possible, a sample position will suffice.

  • If impossible, please include a proof in your answer.

$\endgroup$

3 Answers 3

10
$\begingroup$

Alternate answer:

This cannot be done.

If I divide up the unattacked dark squares like so:
enter image description here
The squares with black rooks fit into three columns, and the squares with white rooks fit into three rows, so only six rooks can be placed in total.
Every position of the white queen is reachable from this one by exchanging rows and columns; since neither of these operations change which rooks attack which others, every board admits at most six rooks by the same argument.

$\endgroup$
4
  • 3
    $\begingroup$ Need to argue that the same situation happens for every white square, but otherwise looks good. $\endgroup$
    – RobPratt
    Commented yesterday
  • $\begingroup$ This is exactly the answer I was looking for, illustrated even better than I thought possible! If you could add a word or two about how you can always find this colouring (regardless of the queen's position) by following the dark squares on the queen's rank and file, I have a shiny checkmark ready for you :-) $\endgroup$
    – Bass
    Commented 8 hours ago
  • 1
    $\begingroup$ Exchanging rows and columns to move the queen potentially puts the rooks on white squares (not really, but that's the gap in the proof, to my mind) $\endgroup$
    – kagami
    Commented 4 hours ago
  • $\begingroup$ @kagami You can move the square colors along with the rows, although I'll try to come up with a more direct explanation soon. $\endgroup$ Commented 4 hours ago
9
$\begingroup$

Answer:

This is impossible.

Explanation:

Since the rooks are on black squares, the diagonal constraints from the queen don’t matter. So it’s as if we have seven rooks on black squares and one rook on a white square. I’ll show below that this is impossible.

In the classic non-attacking rook problem, the positions of the rooks correspond to a permutation of 8 items. It is clear that any white (black) square corresponds to even (odd) value of r+c, where (r,c) is the position of that square. In any permutation σ of 8 items, the sum of r+σ(r) over all rows r is even, so there must be an even number of rows r for which r+σ(r) is odd. But the problem asks us to place seven (an odd number) of rooks on black squares. Therefore, this is impossible.

$\endgroup$
8
  • 2
    $\begingroup$ You could simplify your last paragraph a bit. For any black square, row+column is even, for any white square row+column is odd. If we place one piece in each row and column, the sum over all 8 pieces is 2*(1+2+..+8) so even. Therefore we can't use 7 black and 1 white square. $\endgroup$
    – quarague
    Commented 22 hours ago
  • 2
    $\begingroup$ Another words: we can diagonalize 8-rook solution using row (or column) permutation, but such transformation preservs parity on diagonal color set. $\endgroup$ Commented 16 hours ago
  • 1
    $\begingroup$ @Pranay I am the OP, and I'm trying to explain why I won't be marking this answer as correct: while everything stated is all true, and the result is even more general than the intended answer, the argument is very hard to follow (for non-mathematicians), and all in all this isn't really a puzzle-like solution. (All of which I would of course accept, if I had added the mathematics tag myself.) $\endgroup$
    – Bass
    Commented 7 hours ago
  • 1
    $\begingroup$ OP can also mean "Original Post", which I think was the intention here $\endgroup$ Commented 7 hours ago
  • 1
    $\begingroup$ @Bass So your Q is from the field of non-mathematical combinatorics? $\endgroup$ Commented 1 hour ago
2
$\begingroup$

As mentioned by @Pranay, the diagonals can be ignored. Without loss of generality (because rook attacks are preserved under row and column permutations), the white queen appears in the top left corner cell $(1,1)$. Now let binary decision variable $r_{ij}$ indicate whether a rook appears in cell $(i,j)$, where $i+j$ is odd. The problem is to maximize $\sum_{i,j} r_{ij}$ subject to linear constraints \begin{align} r_{2,3} + r_{2,5} + r_{2,7} &\le 1 \tag1\label1 \\ r_{3,2} + r_{3,4} + r_{3,6} + r_{3,8} &\le 1 \tag2\label2 \\ r_{4,3} + r_{4,5} + r_{4,7} &\le 1 \tag3\label3 \\ r_{5,2} + r_{5,4} + r_{5,6} + r_{5,8} &\le 1 \tag4\label4 \\ r_{6,3} + r_{6,5} + r_{6,7} &\le 1 \tag5\label5 \\ r_{7,2} + r_{7,4} + r_{7,6} + r_{7,8} &\le 1 \tag6\label6 \\ r_{8,3} + r_{8,5} + r_{8,7} &\le 1 \tag7\label7\\ r_{3,2} + r_{5,2} + r_{7,2} &\le 1 \tag8\label8 \\ r_{2,3} + r_{4,3} + r_{6,3} + r_{8,3} &\le 1 \tag9\label9 \\ r_{3,4} + r_{5,4} + r_{7,4} &\le 1 \tag{10}\label{10} \\ r_{2,5} + r_{4,5} + r_{6,5} + r_{8,5} &\le 1 \tag{11}\label{11} \\ r_{3,6} + r_{5,6} + r_{7,6} &\le 1 \tag{12}\label{12} \\ r_{2,7} + r_{4,7} + r_{6,7} + r_{8,7} &\le 1 \tag{13}\label{13} \\ r_{3,8} + r_{5,8} + r_{7,8} &\le 1 \tag{14}\label{14} \end{align} The maximum turns out to be

$6 < 7$,

and the optimal linear programming dual variables provide a short certificate of optimality. Explicitly, adding up constraints \eqref{2}, \eqref{4}, \eqref{6}, \eqref{9}, \eqref{11}, and \eqref{13} yields $\sum_{i,j} r_{ij} \le 6$.

This is a similar approach to the answer by @AxiomaticSystem, but the proof here is generated somewhat automatically as a by-product of the LP solve.

$\endgroup$
3
  • $\begingroup$ That’s nice! Here’s an arrangement that achieves this maximum: i.sstatic.net/7Ag6NXqe.png. Of course there are many more. $\endgroup$
    – Pranay
    Commented 23 hours ago
  • 1
    $\begingroup$ @Pranay if you actually try this puzzle out on a chess board, you'll quickly find out that every position with the queen and five rooks will allow for one more rook to be added. In other words, it's impossible to not reach the maximum by whichever piece placement you care to try. :-) $\endgroup$
    – Bass
    Commented 8 hours ago
  • $\begingroup$ @Bass. Ah yes you are right $\endgroup$
    – Pranay
    Commented 8 hours ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.