I stumbled across the following formula when working on a research problem in theoretical computer science. I checked its correctness up to $N=5$ with a computer. I am looking for a simple proof of it.
This question has been transfered to MathOverflow.
Basic version
Let $\mathcal M_N$ be the set of all invertible 0-1 square matrices of size $N$. More formally, one could write $\mathcal M_N = \{0,1\}^{N\times N} \cap GL_N(\mathbb R)$. $$ \sum_{M \in \mathcal M_N} \frac{\det(M)^2 \cdot (-1)^{\|M\|_0 - N}} {\prod_{i=1}^N\Big(\sum_{j=1}^N M_{i,j}\Big)\prod_{j=1}^N\Big(\sum_{i=1}^N M_{i,j}\Big)} = 1 $$ where $\|M\|_0 = \sum_{i,j} M_{i,j}$ is the number of non-zero entry of $M$.
Weighted gerenalization
Note that the formula is also true when a "positive weight" is associated to every coefficient. Let $P$ be any matrix with positive coefficients. Let $P \circ M$ be the elementwise product of $P$ and $M$.
Redefine $\mathcal M_N$ to be the set of all 0-1 square matrices without any row/column of zeros (one can also define $\mathcal M_N$ to be A227414)
$$ \sum_{M \in \mathcal M_N} \frac{\det(P \circ M)^2 \cdot (-1)^{\|M\|_0 - N}} {\prod_{i=1}^N\Big(\sum_{j=1}^N [P \circ M]_{i,j}\Big)\prod_{j=1}^N\Big(\sum_{i=1}^N [P \circ M]_{i,j}\Big)} = 1 $$
Here is some python code to check (empirically) my claim (slow when $N > 4$).
from sympy import Matrix
from itertools import product
N = 2
result = 0
P = Matrix([[4,2],[13,37]])
for p in product([0,1], repeat=N**2):
M = Matrix(p).reshape(N, N).multiply_elementwise(P)
val = (-1) ** (sum(p)-N) * M.det() ** 2
if val != 0:
for i in range(N):
val /= sum(M[:,i])
val /= sum(M[i,:])
print(M, val)
result += val
print(result)
And for those of you who don't want to run this program, here is the output.
Matrix([[0, 2], [13, 0]]) 1
Matrix([[0, 2], [13, 37]]) -1/75
Matrix([[4, 0], [0, 37]]) 1
Matrix([[4, 0], [13, 37]]) -74/425
Matrix([[4, 2], [0, 37]]) -74/117
Matrix([[4, 2], [13, 0]]) -13/51
Matrix([[4, 2], [13, 37]]) 3721/49725
1