GateAI
Discrete Mathematics

GATE CSE 2026 Set 1 · Q12

MCQ1 markMedium

Time

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

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) 512

Discrete Mathematics

Let the matrix AA be of size n×nn \times n with n=4n = 4 and entries in {0,1}\{0, 1\}.

The condition that each row and each column contains an even number of 11s is equivalent to saying that the sum of entries in each row and each column is 0(mod2)0 \pmod 2.

  1. For the upper-left (n−1)×(n−1)(n-1) \times (n-1) submatrix (i.e., size 3×33 \times 3), each entry can be chosen independently as either 00 or 11. There are (n−1)2=32=9(n-1)^2 = 3^2 = 9 entries, giving 29=5122^9 = 512 ways.

  2. Once the first n−1n-1 entries of the first n−1n-1 rows are chosen:

    • The last element of each of the first n−1n-1 rows (i.e., Ai,4A_{i, 4} for i=1,2,3i=1,2,3) is uniquely determined by the parity requirement of row ii.

    • The last element of each of the first n−1n-1 columns (i.e., A4,jA_{4, j} for j=1,2,3j=1,2,3) is uniquely determined by the parity requirement of column jj.

  3. The bottom-right entry A4,4A_{4,4} is then uniquely determined to satisfy the parity of the 4th row (which automatically satisfies the parity of the 4th column as well, since the sum of all elements modulo 2 must be consistent).

Therefore, the total number of valid matrices is:

2(4−1)×(4−1)=23×3=29=5122^{(4-1) \times (4-1)} = 2^{3 \times 3} = 2^9 = 512

Hence, the correct option is (A).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Discrete Mathematics previous year question is Q12 of the GATE CSE 2026 Set 1 paper. Find more GATE CSE PYQs on Discrete Mathematics in Engineering Mathematics, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Discrete Mathematics PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Discrete Mathematics in GATE CSE

Discrete Mathematics has 50 GATE CSE PYQs across 23 papers from 2011 to 2026. 18 of them are 1-mark MCQs like this one, and GATE CSE 2026 Set 1 has 3.

How GATE tests Discrete Mathematics

More from GATE CSE 2026 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2026 Set 1 · Q12 · MCQ

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

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.