When a 0-1-matrix with exactly two 1’s on each column and on each row is non-degenerated? [1]

Let $A$ be an $n\times n$ matrix with entries in the set $\{0,1\}$ which has exactly two ones in each column and two ones in each row. Give necessary and sufficient conditions for the rank of $A$ to be $n$.


Let $G$ be an undirected bipartite graph with $2n$ nodes $p_1,\ldots,p_n,q_1,\ldots,q_n$, where $p_i$ is connected to $q_j$ if and only if $a_{ij}=1$. Since $A$ has exactly two $1$s on each column and each row, each node $p_i$ is connected to exactly two $q_j$s and vice versa. Therefore $A$ is a bipartite graph and it can be decomposed into disjoint union of cycles of the form $$ p_{i_1}\to q_{j_1}\to p_{i_2}\to q_{j_2}\to \ldots p_{i_k}\to q_{j_k}\to p_{i_1}, $$ where $i_1,\ldots,i_k$ are distinct and $j_1,\ldots,j_k$ are distinct. In other words, by relabeling the rows and columns, $A$ is permutationally equivalent to a block-diagonal matrix whose diagonal blocks are of the form $$ B_k = \pmatrix{1&&&1\\ 1&\ddots\\ &\ddots&\ddots\\ &&1&1}\tag{1} $$ where $B_k$ is $k\times k$ with $k>1$. It is easy to see that $$ \det(B_k)=\begin{cases} 0 &\text{ when } k \text{ is even},\\ 2 &\text{ when } k\neq1 \text{ is odd } \end{cases}. $$ Therefore $A$ has full rank if and only if $A=P(B_{k_1}\oplus\ldots\oplus B_{k_m})Q$, where each block $B_{k_r}$ is of the form $(1)$ with an odd $k_r$ and $P,Q$ are some permutation matrices. Put it another way, $A$ has full rank iff its corresponding graph $G$ can be decomposed into a disjoint union of cycles of length $2$ modulo $4$.


First prove that by a sequence of permutations of rows and columns, you can make sure that all the diagonal entries of the matrix are $1$.

Thus $A=P_1 (I+P_2)P_3$ where $P_1,P_2,P_3$ are permutation matrices and and $P_2$ is a permutation matrix which corresponds to a permutation which fixes no element. $A$ has rank $n \Leftrightarrow I+P_2$ has rank $n$.

I don't think this completely answers the question. But trying to find permutation matrices which do not have $-1$ as an eigenvalue and do not fix any coordinate may be an interesting exercise.