In how many ways can cells in a 3 x 3 grid be shaded, such that each row and each column have exactly one shaded cell? An example of one valid shading is shown.
A. 2
B. 9
C. 3
D. 6
GATE 2023 · General Aptitude · Counting Figure · medium
Answer: There are 6 ways to shade the 3 x 3 grid satisfying the constraint. Answer: D.
Reformulate as a permutation problem: Row 1 can place its shaded cell in any of 3 columns. Row 2 must use one of the remaining 2 columns. Row 3 must use the last remaining column. Choices: 3 x 2 x 1 = 6.