I saw this question by chance online: Suppose you have a $4\times 4$ array, you wish to place 8 stones on the array such that every row and column have exactly 2 stones. How many ways can you do this?
From numerical brute force, the solution appears to be 90.
Thinking about this problem, I've come to a couple ideas:
If a configuration is valid, it is still going to be valid after a row or column exchange or taking the transpose. I don't think there is any other obvious symmetry for me to reduce the search space. With this in mind, I can fix the first row to be whatever I want, and choose the remaining 3 rows as a function of my initial choice. I was hoping I could generate a reduction formula of some sort, but I was starting to get confused keeping track of all the cases.
Another idea I had was to think about a legal configuration in terms of changing 8 values of a zero matrix into 0.5 so that I have a doubly stochastic Markov chain and think about classifying the kinds of states different Markov chains would have. This led me to the idea that a valid configuration is either "disjoint", e.g.,
$A = \begin{bmatrix} 1 & 1 & 0 & 0\\ 1 & 1 & 0 & 0\\ 0 & 0 & 1 & 1\\ 0 & 0 & 1 & 1\end{bmatrix}$
or the adjacency graph is a cycle. This seems to handle most of the cases, however, I am not sure how to handle the case when there are 1's on the main diagonal, e.g., there are loops in the graph.
I think the above graph theoretic approach is the correct line of thinking to solve the problem, but I've never taken a graph theory course and I simply don't know what tools I need to push further.