GATE CS 2024 Set 2 | Question 10

MCQ · 2 marks · −0.66

In the \(4 \times 4\) array shown below, each cell of the first three rows has either a cross (X) or a number.

1X43
X554
3X6X

The number in a cell represents the count of the immediate neighboring cells (left, right, top, bottom, diagonals) NOT having a cross (X). Given that the last row has no crosses (X), the sum of the four numbers to be filled in the last row is

  1. Option A: 11 (correct)
  2. Option B: 10
  3. Option C: 12
  4. Option D: 9

Answer

(A)

Explanation

The last row has no crosses, so each of its cells counts the cells beside it in row 4 plus the non-cross cells above it in row 3, which reads 3, X, 6, X.

  • Cell 1: 3 and X above, one cell beside, so 2.
  • Cell 2: 3, X and 6 above, two cells beside, so 4.
  • Cell 3: X, 6 and X above, two cells beside, so 3.
  • Cell 4: 6 and X above, one cell beside, so 2.

Sum \(= 2 + 4 + 3 + 2 = 11\). The printed numbers follow the same rule; for example, the 3 in row 3 counts the 5 diagonally above it and the two cells below it.

Answer: A