0

I am interested in calculating the number of binary matrices of dimension $n$ by $k$ where each row has at least one non-zero element and each column has at least one non-zero element. I got the following equation: $M(n, k) = 2^{n \times k} - \sum_{i=1}^{n} (-1)^i \binom{n}{i} 2^{k \times (n - i)} - \sum_{i=1}^{k} (-1)^i \binom{k}{i} 2^{n \times (k - i)} + \sum_{i=1}^{n} \sum_{j=1}^{k} (-1)^{i+j} \binom{n}{i} \binom{k}{j} 2^{(n - i) \times (k - j)} $ is it correct?

K.D.
  • 111
  • 4

0 Answers0