Skip to main content
2 of 3
added 87 characters in body
jigsawmnc
  • 141
  • 1
  • 5

How many matrices are possible for the given arrangement?

Given m & n, we have to find out the number of possible matrices of order m*n with the property that A(i,j) can be either 0 or 1 and that no sub-matrix of both length > 1 & breadth > 1 should have same entries i.e. all of its cells shouldn't be 0 or 1. For example if m = 2 & n = 2, the answer is 14: Total possibilities : 2 ^ (2 * 2); Invalid cases: when all 4 cells are 0 or 1. Therefore answer is 2 ^ (2 * 2) - 2 = 14. A sub-matrix of length > 1 & breadth = 1, also breadth > 1 & length = 1 is valid.

jigsawmnc
  • 141
  • 1
  • 5