<p>See the answers of <a href="https://mathoverflow.net/questions/20423/how-to-compute-the-rook-polynomial-of-a-ferrers-board">this question</a>.</p>

<p>Your case is a lot easier, just choose $k$ of the $m$ columns and then you have
$n (n-1)\ldots (n-k+1)$ ways to put the $k$ rooks. So the coefficient of $x^k$ is</p>

<p>$\displaystyle r_k = \binom{m}{k} n (n-1)\ldots (n-k+1) = \binom{m}{k}\binom{n}{k}k!$.</p>

<p>The provided link also gives a dynamic programming approach to compute $r_k$.</p>

CC BY-SA 2.5
2010-11-03T00:38:56.200Z
2010-11-03T01:30:31.643Z
2017-04-13T12:57:54.777Z
didest
<p>How to compute ROOK Polynomials for NxM Matrices for k objects ?</p>

CC BY-SA 2.5
2010-11-03T01:44:56.303Z
Tuhin, the purpose of this site is not for asisting in homework. I'd say you may look at stackoverflow.com, but you already asked there (http://stackoverflow.com/questions/4071804/matrix-problem-in-c)
didest
CC BY-SA 2.5
2010-11-03T16:01:44.310Z
Also, "rook" shouldn't be capitalized.  It's a chess piece, not an abbreviation.
Jeffε
<co.combinatorics><polynomials><permutations>
How to compute ROOK Polynomials for NxM Matrices
Tony
# How to compute ROOK Polynomials for NxM Matrices

(Asked by: username_0 on 2010-11-03)

How to compute ROOK Polynomials for NxM Matrices for k objects ?

**Tags:** co.combinatorics, polynomials, permutations

> **Comments:**
> **username_1**: Tuhin, the purpose of this site is not for asisting in homework. I'd say you may look at stackoverflow.com, but you already asked there (http://stackoverflow.com/questions/4071804/matrix-problem-in-c)  
> **username_2**: Also, "rook" shouldn't be capitalized.  It's a chess piece, not an abbreviation.  

---

## 1 answers

### Answer by username_1 on 2010-11-03. Score: 2 | Accepted answer

See the answers of [this question](https://mathoverflow.net/questions/20423/how-to-compute-the-rook-polynomial-of-a-ferrers-board).

Your case is a lot easier, just choose $k$ of the $m$ columns and then you have
$n (n-1)\ldots (n-k+1)$ ways to put the $k$ rooks. So the coefficient of $x^k$ is

$\displaystyle r\_k = \binom{m}{k} n (n-1)\ldots (n-k+1) = \binom{m}{k}\binom{n}{k}k!$.

The provided link also gives a dynamic programming approach to compute $r\_k$.


---

