Computer Sciences > GATE 2026 SET-1 > Combinatorics
Consider 4 × 4 matrices with their elements from {𝟎, 𝟏}. The number of such matrices with even number of 𝟏s in every row and every column is
A
1023
B
1025
C
512
D
255

Correct : c

The correct answer is Option C: 512.
The key idea is to figure out how many entries can be chosen freely, with the rest being determined by the parity constraints.
Consider filling the top-left 3×3 submatrix (the first 3 rows and first 3 columns) with any combination of 0s and 1s. There are 29 = 512 ways to do this.
Once these 9 entries are fixed:
• The 4th entry in each of the first 3 rows is forced - it must make the row sum even.
• The entire 4th row is forced - each entry must make its column sum even.
• The bottom-right entry (row 4, column 4) is automatically consistent with both the row and column parity constraints, because the total sum of the matrix (mod 2) must be 0, which follows from all row sums being even.
So every free choice of the 3×3 submatrix gives exactly one valid 4×4 matrix, and every valid matrix corresponds to exactly one such choice.
Total = 29 = 512.

Similar Questions

A pennant is a sequence of numbers, each number being 1 or 2. An n-pennant is a sequence of numbers with sum equal to n. For example, (1, 1, 2) is a 4-pennant....
#1220 NAT
Let S be the set of all ternary strings defined over the alphabet {a, b, c}. Consider all strings in S that contain at least one occurrence of two consecutive s...
#1373 NAT
A palindrome is a word that reads the same forwards and backwards. In a game of words, a player has the following two plates painted with letters. From...
#1 MCQ

Related Topics

GATE CS 2026 GATE CS 2026 Set-1 Q12 Binary Matrix Even Sum 4x4 Matrix Even 1s Even Row Column Sum Combinatorics GATE Parity Matrix Counting Binary Matrix GATE 2026 Discrete Mathematics GATE GATE CS 2026 Solved Even Parity Constraint Matrix Counting

Unique Visitor Count

Total Unique Visitors

Loading......