Question

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

A 4 by 4 grid where Row 1 is [1, X, 4, 3], Row 2 is [X, 5, 5, 4], Row 3 is [3, X, 6, X], and Row 4 has four empty cells.

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

Choose one option
Official answer and solution
Official answer
A
From
Official GATE 2024 answer key

Solution

For each of the 4 cells in Row 4, count its adjacent cells in Row 3 and Row 4 that do not contain an 'X'.

Since Row 4 has no crosses (X), all 4 cells in Row 4 are non-X cells. In Row 3, the cells are [3, X, 6, X], so columns 1 and 3 contain numbers (3 and 6), while columns 2 and 4 contain X. Counting the non-X neighbors for each cell (4,c)(4, c) in Row 4:

  • Cell (4, 1): neighbors are (3, 1)=3, (3, 2)=X, and (4, 2). Non-X neighbors =2= 2.
  • Cell (4, 2): neighbors are (3, 1)=3, (3, 2)=X, (3, 3)=6, (4, 1), and (4, 3). Non-X neighbors =4= 4.
  • Cell (4, 3): neighbors are (3, 2)=X, (3, 3)=6, (3, 4)=X, (4, 2), and (4, 4). Non-X neighbors =3= 3.
  • Cell (4, 4): neighbors are (3, 3)=6, (3, 4)=X, and (4, 3). Non-X neighbors =2= 2.

Therefore, the four numbers in the last row are 2,4,3,22, 4, 3, 2, and their sum is 2+4+3+2=112 + 4 + 3 + 2 = 11.

Final answer

Option (A)

Common trap

Counting the neighbors that HAVE a cross (X) instead of the neighbors NOT having a cross.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2024 Computer Science and Information Technology - Set 2 (CS2)
Question
10 of 65
Section
General Aptitude

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.