Let $S\_n$ be the set of all the $n\times n\ (0,1)$-matrices and divide $S\_n$ into two sets as follows:
$A\_n=\{M\in S\_n:$ there exist a row and a column of $M$ such that the sum of the row is equal to the sum of the column$\}$ and $B\_n=S\_n\setminus A\_n.$


I have two questions:


$(1)$Is there any estimation for $\dfrac{|A\_n|}{|S\_n|}$ or $\dfrac{|B\_n|}{|S\_n|}?$


$(2)$I conjecture that $\lim\_{n\rightarrow \infty}\dfrac{|A\_n|}{|S\_n|}=1,$ is that right?



A partition of the set of all $n\times n\ (0,1)$-matrices
For (2), consider a random matrix (each entry independently 0 or 1 with probability 1/2). See [this paper](http://arxiv.org/abs/1302.2446) (published in Journal of Combinatorics). By virtue of Corollary 2 it suffices to show that if $S\_1,\ldots,S\_n,T\_1,\ldots,T\_n$ are binomial random variables Bin$(n,1/2)$, independent except for $\sum\_j S\_j = \sum\_k T\_k$ then there are almost surely some $j,k$ with $S\_j=T\_k$. This is true because any value close to $n/2$ occurs with high probability in both $S\_1,\ldots,S\_n$ and $T\_1,\ldots,T\_n$. So the answer to (2) is "yes".


$|B\_n|/|S\_n|$ must be exponentially small. I don't see a simple way to estimate it.


Here is a lower bound on $|B\_n|/|S\_n|$ for even $n$: the probability that all the row sums are even and all the column sums are odd, or vice-versa, is exactly $2^{-2n+2}$. I have a cute generation function proof that I'll add if anyone asks, but probably it is a just linear algebra.


ADDED: Since user173856 asked, I'll give the "cute generating function proof". However, I'll first note that if no further generality is needed the simple proof that Kevin gave in the notes is clearly better. The principle is if you have a polynomial $f(x\_1,\ldots,x\_n,y\_1,\ldots,y\_n)$ then the sum of $f$ over $\lbrace -1,+1\rbrace^{2n}$ is $2^{2n}$ times the sum of the coefficients of the terms in which the variables all occur to an even power. The others all cancel out. Now $$f(x\_1,\ldots,x\_n,y\_1,\ldots,y\_n)=x\_1\cdots x\_n\prod\_{1\le j,k\le n} (1+x\_jy\_k)$$ counts $n\times n$ 0-1 matrices such that the coefficient of $x\_1^{r\_1+1}\cdots x\_n^{r\_n+1}y\_1^{c\_1}\cdots y\_n^{c\_n}$ is the number of matrices with row sums $r\_1,\ldots,r\_n$ and column sums $c\_1,\ldots,c\_n$. When we sum $f$ over $\lbrace -1,+1\rbrace^{2n}$, the only non-zero terms are when all the variables are $+1$ or all the variables are $-1$. This gives that the number of matrices with odd row sums and even column sums is $$2^{-2n}(2^{n^2}+(-1)^n 2^{n^2}).$$ Divide by the total $2^{n^2}$ to express it as a probability.


