Question

Consider 4×44 \times 4 matrices with their elements from {0,1}\{0, 1\}. The number of such matrices with even number of 11s in every row and every column is

Choose one option
Official answer and solution
Official answer
A
From
Official GATE 2026 answer key

Solution

Choose the entries of the top-left 3×33 \times 3 submatrix freely and observe that the last row and last column are uniquely determined by parity.

For any n×nn \times n matrix over {0,1}\{0, 1\} with even row sums and even column sums, we can choose all (n−1)2(n-1)^2 entries in the top-left (n−1)×(n−1)(n-1) \times (n-1) submatrix arbitrarily in 2(n−1)22^{(n-1)^2} ways:

  • For each row i∈{1,…,n−1}i \in \{1, \dots, n-1\}, the entry ai,na_{i,n} is uniquely determined so that row ii has an even number of 11s.
  • For each column j∈{1,…,n−1}j \in \{1, \dots, n-1\}, the entry an,ja_{n,j} is uniquely determined so that column jj has an even number of 11s.
  • Finally, an,n≡∑i=1n−1ai,n≡∑i=1n−1∑j=1n−1ai,j≡∑j=1n−1an,j(mod2)a_{n,n} \equiv \sum_{i=1}^{n-1} a_{i,n} \equiv \sum_{i=1}^{n-1} \sum_{j=1}^{n-1} a_{i,j} \equiv \sum_{j=1}^{n-1} a_{n,j} \pmod 2 is uniquely and consistently determined.

For n=4n = 4, the number of such matrices is 2(4−1)2=29=5122^{(4-1)^2} = 2^9 = 512.

Final answer

Option (A)

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2026 Computer Science and Information Technology - Session 1 (CS1)
Question
12 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.