Number of ways to put two different knights on a chessboard so they attack each other

782 Views Asked by At

This question is in my textbook:

What is the number of ways to put two non-identical knights on a chessboard so they attack each other?

My solution:

If two knights attack each other, they can be fit inside a $2 *3$ rectangle. There are $84$ ways to pick a $2 *3$ rectangle from the chessboard(horizontal and vertical) and there's $4$ ways to put $2$ non-identical knights inside such a rectangle so the answer is $4*84=336$.

But my textbook says it's $672$. I checked out this question and it said the number of ways to put $2$ attacking identical knights in a $n*n$ board is $4(n-1)(n-2)$ and substituting $8$ yields $4*7*6 = 168$. Note that since the knights are non-identical, we need to multiply $168$ by $2$ which results in the same answer as mine. So I'm fairly certain my answer is right and the textbook's is wrong but I wanted to make $100\%$ sure.

Thank you in advance!

1

There are 1 best solutions below

0
On

Number of $ 2 * 3 $ rectangles is: $ (n - 2)(n - 1) + (n - 1)(n - 2) = 2(n - 1)(n - 2) $. In the $ 2 * 3 $ rectangle like this:

c1 c2 c3
c4 c5 c6

c1 horse atacks only c6, and c3 horse atacks only c4. But, since the horses are non-identical, we have $ 2 * 2 = 4 $ possible combinations.
Therefore, the answer is $ 8(n - 1)(n - 2) $.