7

How many ways can you put: a) two bishops b) two knights c) two queens on a chessboard in such a way that one piece does not attack the other?

bof
  • 78,265

2 Answers2

10

Let $R$ ($H,\ B,\ Q$) be the number of ways you can put two rooks (knights, bishops, queens) on the $8\times8$ chessboard so that they do attack each other.

$R=\frac{64\cdot14}2=448.$

$H=2\cdot2\cdot7\cdot6=168,$ since a pair of mutually attacking knights determines a $2\times3$ or $3\times2$ rectangle, there are $7\cdot6+6\cdot7=2\cdot7\cdot6$ such rectangles on the board, and there are two ways to place the knights in each rectangle.

$B=2\left(\binom22+\binom32+\binom42+\binom52+\binom62+\binom72+\binom82+\binom72+\binom62+\binom52+\binom42+\binom32+\binom22\right)$
$=4\left(\binom22+\binom32+\binom42+\binom52+\binom62+\binom72\right)+2\binom82=4\binom83+2\binom82=280.$

$Q=R+B=448+280=728$

So the answers are:

a) Nonattacking bishops: $\binom{64}2-B=2016-280=\boxed{1736}$

b) Nonattacking knights: $\binom{64}2-H=2016-168=\boxed{1848}$

c) Nonattacking queens: $\binom{64}2-Q=2016-728=\boxed{1288}$


Generalizing to the $n\times n$ chessboard, I get:

$R_n=2n\binom n2=n^2(n-1)$

$H_n=4(n-1)(n-2)$

$B_n=4\binom n3+2\binom n2=\frac{n(n-1)(2n-1)}3$

$Q_n=R_n+B_n=4\binom n3+(2n+2)\binom n2=\frac{n(n-1)(5n-1)}3$


More generally, for the $m\times n$ chessboard:

$R_{m,n}=m\binom n2+n\binom m2$

$H_{m,n}=2(m-1)(n-2)+2(n-1)(m-2)$

$B_{m,n}=4\binom{\min(m,n)}3+2(|m-n|+1)\binom{\min(m,n)}2$

$Q_{m,n}=R_{m,n}+B_{m,n}$


P.S. In a comment Djura Marinkov pointed out the alternative expression $$B_n=2\sum_{k=1}^{n-1}k^2$$ which comes from considering that, just as each pair of mutually attacking knights lie at opposite corners of a $2\times3$ or $3\times2$ rectangle, each pair of mutually attacking bishops lie at opposite corners of an $h\times h$ square, $2\le h\le n.$ Equating the two expressions for $B_n,$ we get yet another combinatorial proof of the familiar identity $$\sum_{k=1}^nk^2=2\binom{n+1}3+\binom{n+1}2=\binom{n+1}3+\binom{n+2}3=\frac{n(n+1)(2n+1)}6.$$

bof
  • 78,265
  • 1
    A tip for bishops, same as you put knights into corners of rectangles 2X3 you can put bishops into corners of squares 2x2, 3x3,..., 8x8. Total of $2(7^2+6^2+...+1^2)$ – Djura Marinkov Nov 29 '17 at 23:02
  • @DjuraMarinkov Nice. I didn't think of that. – bof Nov 29 '17 at 23:07
  • @DjuraMarinkov Yet another combinatorial derivation of the identity $$\sum_{k=1}^nk^2=2\binom{n+1}3+\binom{n+1}2=\frac{n(n+1)(2n+1)}6.$$ – bof Nov 30 '17 at 02:45
  • 1
    The question didn't ask about kings, but I'll add it for completeness. On an n-by-n board there are $(n-1)n$ ways to pick two adjacent squares in a rank, and the same number in a file. For kings attacking diagonally we can use the same trick we used for bishops to get $2(n-1)^2$. Total is $(n-1)(2n+2(n-1)) = 2(2n-1)(n-1)$, or $2 \times 15 \times 7 = 210$ on a 8-by-8 board. Alternately, a king in a corner can attack 3 squares, an edge 5, elsewhere 8, giving $3 \times 4 + 5 \times (4n-8) + 8(n-2)^2 = 4 (2n-1)(n-1)$, but this double-counts, giving the same answer. – Michael Lugo Nov 21 '22 at 15:46
0

This is a question for "Problem of the Week 16" in my school. Specifically, it asked, "How many ways are there for two bishops to never be able to attack each other on a chessboard?". I solved it yesterday with my friend and published it. Our answer to this is as follows:

Since a bishop can only move diagonally, We calculated all of the different combinations for one row on the chessboard. After that, we multiplied the answer by 8 (number of rows). We then multiplied that by 2 for the columns.

We did not find the combinations manually. We used the formula for combinations.

https://i.stack.imgur.com/5zIwE.jpg

Please open this link for the solution. I was not able to properly write it, so this is a screenshot of it properly written in Google Docs.

Leo Pi
  • 1
  • 1