Number of ways to arrange $k$ non-attacking rooks on an $m\times n$ chessboard

207 Views Asked by At

I need to calculate the number of ways to place k non-attacking rooks on an $m \times n$ chessboard where $n\neq m$. I know how to calculate the number of arrangements when the problem is to calculate the number of arrangements of an $n\times n$ chessboard, so $m=n$. Unfortunately I can't seem to find a solution when $m\neq n$.

So my two questions are

  1. In how many ways can I place $k$ non-attacking rooks on an $m\times n$ ($m\neq n$) chessboard when there are no forbidden positions.
  2. In how many ways can I place $k$ non-attacking rooks on an $m\times n$ ($m\neq n$) chessboard when there are forbidden positions and we have already calculated the rook polynomial. For example let's say we have a $3\times 4$ chessboard, with rook polynomial $1+4x+5x^2+2x^3$.
2

There are 2 best solutions below

0
On

The rooks must be on different rows and different columns. We can pick m over k rows, n over k columns, and then have k! choices to combine rows and columns.

3
On

We define the rook polynomial as the generating function of the rook numbers. If we let a board $B$ be $m \times n$, then the rook polynomial $R_B(x) = \sum\limits_{k\geq 0}r_k(B)x^k$ is the generating function for the rook numbers.

The rook numbers $r_k(B)$ are the number of ways to place $k$ nonattacking rooks on the board B. Notice since $B$ is a finite board, we can only place a finite number of rooks on it, so these polynomials have finite degree. The degree is $\min(m, n)$ (you can prove this by the pigeonhole principle or using the formula user gnasher729 gave).

Knowing the rook polynomial is the generating function, do you see how you would retrieve the rook numbers from it now?