2

How many ways we can place knights on a $m \times n$ chessboard in such a way that each piece does not attack the others $($modulo $10^9 + 9) \ ?\ (m \le 4, n \le 10^9)$

For example:

$m = 2, n = 2, ans = 16$

Edit:

I try to place $0,1,2,..,m \times n$ knights on chessboard then find the number of ways such that the knights do not attack each others and sum all it up.

Anwser $=$ number of ways to place knights on board $-$ number of ways to place knights on board such that the knights do attack each others.

This is my fomular: $2^{m \times n} - [(n - 1) \times (m - 2) + (n - 2) \times (m - 1)] \times 2 ^ {m \times n - 2}$ but it is wrong.

$2^{m \times n} $ denotes for sum of number of ways to place $0,1,..,m \times n$ knights on board:

$2^{m \times n} = \binom{m \times n}{0} + \binom{m \times n}{1} + ... + \binom{m \times n}{m \times n}$, the same for $2^{m \times n - 2}$

Since a pair of mutually attacking knights determines a $2 \times 3$ or $3 \times 2$ rectangle. There are $(n - 1) \times (m - 2) + (n - 2) \times (m - 1)$ such rectangles on the board. I got it from this.

If i have $k$ knights placing on the board, then $(n - 1) \times (m - 2) + (n - 2) \times (m - 1) \times \binom{m \times n - 2}{k - 2}$ is number of ways the knights do attack each others. But it is not true, so many cases it is duplicate. I stuck there.

I need sum all it up to number of ways to place knights on board such that the knights do attack each others, so I have:

$$\sum_{k=0}^{m \times n} [(n - 1) \times (m - 2) + (n - 2) \times (m - 1)] \times \binom{m \times n - 2}{k - 2}$$

is equal to:

$$[(n - 1) \times (m - 2) + (n - 2) \times (m - 1)] \times 2 ^ {m \times n - 2}$$

That is my step to find fomular. Sory for my bad English.

0 Answers0