0
$\begingroup$

I want to find the number of ways in which two queens can be placed on a chessboard so that they can attack each other. two queens can attack each other on a row, a column or on same diagonal just likes the moves of a queen.

$\endgroup$

1 Answer 1

2
$\begingroup$

I assume the queens are indistinguishable (say, both white). Wlog. $n\le m$. Then there are $n\cdot{m\choose 2}$ ways with horizontal attacks; $m\cdot {n\choose 2}$ ways with vertical attack; $(m-n)\cdot {n\choose 2}+2\sum_{k=2}^{n-1}{k\choose 2}$ ways with "falling" diagonal attack and the same number with "rising" diagonal. Use the well-known formulas for sums of quadratic sequences to get an explcit expression for $\sum_{k=2}^{n-1}{k\choose 2}$ and add all up.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .