GATE 2023 CE (CE2) – Question 3
In how many ways can cells in a $3\times3$ grid be shaded, such that each row and each column have exactly one shaded cell? An example of one valid shading is shown.

Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (D) 6
Explanation
Choose one shaded cell in every row and every column, which is the same as placing one non-attacking rook in each row of a $3\times3$ board.
- **Row 1:** any of the 3 columns.
- **Row 2:** any column except the one used in row 1, so 2 choices.
- **Row 3:** the one column left, so 1 choice.
Number of ways $=3\times2\times1=3!=\mathbf{6}$.