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

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.

• On a $n\times n$ chessboard, a black and a white mutually-attacking knights can only be in opposite corners in a $2\times 3$ or $3\times 2$ rectangle. There are $(n-2)(n-1)$ ways to select a $3\times 2$ rectangle, so $2(n-2)(n-1)$ ways to select a $2\times 3$ or $3\times 2$ rectangle. Once such selection is performed, we still have to decide if our knights occupy the NE-SW diagonal or the NW-SE diagonal, then if they occur in the BW or WB order. Thus a total of $8(n-2)(n-1)$ ways, which equals $336$ if $n=8$, I agree with you. Nov 12, 2019 at 20:56
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 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)$$.