TITLE: Number of $n^2\times n^2$ permutation matrices with a 1 in each $n\times n$ subgrid
QUESTION [9 upvotes]: I found the following question in a paper I was trying to solve:
The following figure shows a $3^2 \times 3^2$ grid divided into $3^2$ subgrids of size $3 \times 3$. This grid has $81$ cells, $9$ in each subgrid.

Now consider an $n^2 \times n^2$ grid divided into $n^2$ subgrids of size $n \times n$. Find the number of ways in which you can select $n^2$ cells from this grid such that there is exactly one cell coming from each subgrid, one from each row and one from each column.
My try:
Since we have $n^2$ rows, $n^2$ columns and $n^2$ subgrids in total, we have to choose one and only one cell from each of them. Let's choose them one at a time. We can choose the first cell in $n^4$ many ways. Then, we'll have to avoid that subgrid, that column and that row that we've chosen the first one from when choosing the second cell. So, we have $n^4-n^2-2n(n-1)$ choices. We can continue this to get the total number of possible ways. But, I think there's a hole. Say, we've chosen the first cell from the subgrid of the up-left corner and the second from the subgrid just right to it so that it doesn't violate any rules. Then, when finding the number of ways we can choose the third cell, we would have substracted some of the cells twice. I think you get it. Please, if anyone can help me solving this problem, it'd be greatly appreciated.

REPLY [3 votes]: Using the counting system outlined in the comments, we can associate to each subgrid a positive integer: the number of choices in that subgrid. It's fairly clear that the number is invariant of the exact method of getting to that subgrid: however you do it, subgrid $(i,j)$ (in the usual matrix suffix notation) has associated with it $(n+1-i)(n+1-j)$ choices. Now the matrices go as follows:
\begin{eqnarray*}
n=1 &\mapsto& \begin{pmatrix}1\end{pmatrix}\\
n=2 &\mapsto& \begin{pmatrix}4&2\\2&1\end{pmatrix}\\
n=3 &\mapsto& \begin{pmatrix}9&6&3\\6&4&2\\3&2&1\end{pmatrix}\\
&\vdots&\\
n=k&\mapsto&
\begin{pmatrix}
k^{2} & k(k-1) & k(k-2) & \ldots & 2k & k\\
k(k-1) & (k-1)^{2} & (k-1)(k-2) & \ldots & 2(k-1) & k-1\\
k(k-2) & (k-1)(k-2) & (k-2)^{2} & \ldots & 2(k-2) & k-2\\
\vdots & \vdots & \vdots & \ddots & \vdots & \vdots \\
2k & 2(k-1) & 2(k-2) & \ldots & 4 & 2\\
k & k-1 & k-2 & \ldots & 2 & 1
\end{pmatrix}\\
&\vdots&
\end{eqnarray*}
For each $n$, the answer to the problem is the product of all the entries in the corresponding matrix; denote each of these numbers by $P_{n}$. Now since each matrix contains the preceding matrix as a "submatrix", it is clear that we can find a recursive formula: in particular, some thought gives
\begin{eqnarray*}
P_{n} & = & P_{n-1}n^{2}\prod_{i=1}^{n-1}(in)^{2}\\
& = & P_{n-1}n^{2n}[(n-1)!]^{2},
\end{eqnarray*}
with the initial condition $P_{1}=1$.
Now for each $n\in\mathbb{N}$ let $f(n) = (n!)^{2n}$. Clearly $P_{1}=f(1)$. Further, suppose that, for some $n\in\mathbb{N}$, we know that $P_{n-1} = f(n-1)$; then we have
\begin{eqnarray*}
P_{n} & = & P_{n-1}n^{2n}[(n-1)!]^{2}\\
& = & [(n-1)!]^{2(n-1)}n^{2n}[(n-1)!]^{2}\\
& = & (n!)^{2n}\\
& = & f(n).
\end{eqnarray*}
By induction, $P_{n} = (n!)^{2n}$ for all $n\in\mathbb{N}$.