Counting permutation matrices

222 Views Asked by At

$J \in \{0,1\}^{n \times n}$ is a matrix with all elements being $1$. $S := \{P_1, P_2, ..., P_n\}$ is a set with $n$ permutation matrices $P_i \in \{0,1\}^{n \times n}$ such that $\sum\limits_{i=1}^n P_i = J$. Please count the number of $S$ with respect to $n$ (denoted as $C(n)$).

$\textbf{Motivation & Background:} $

The motivation of this problem comes from a naive geometry problem. Given a $n \times n \times n$ Rubik's cube $M$ with $n^3$ cubes. How many ways are there to pick $n^2$ cubes $M^{'} \subset M$ such that $M^{'}$ have the same orthographic views (front view, end view, and vertical view) with $M$, i.e., all orthographic views of $M$ have to be $n \times n$ squares? I define $n$ layers from top to bottom, each layer of $M^{'}$ is a permutation matrix so that front/end views of $M^{'}$ are square. To make the vertical view a square, the sum of the permutation matrices has to be an all-one matrix ($J$).

$\textbf{Attempts:}$

  1. Consider special values. For $n=1,2,3,4$, the corresponding $C(n)$ are $1, 1, 2, 24$. But I do not know the exact numbers for $n>4$.
  2. Let the group $S_n$ act on the set of $S$, i.e., a set with such $S$ being its elements. But not successful yet.

Note: The geometry problem comes from a math contest (5th grade in the primary school) of my younger brother for a trivial case $n=4$ (correct answer: $576$). I find the closed-form of $C(n)$ might be non-trivial. It is even very hard to solve it with C++ as the complexity is exponential. I am working on an efficient algorithm (better parallel, multithreading) to compute $C(n)$. Answers are still welcome (100 bounties for highly insightful answers).