You are given an n×n square matrix to be filled with numerals

You are given an n×n square matrix to be filled with numerals so that no two adjacent cells have the same numeral. Two cells are called adjacent if they touch each other horizontally, vertically or diagonally. So a cell in one of the four corners has three cells adjacent to it, and a cell in the first or last row or column which is not in the corner has five cells adjacent to it. Any other cell has eight cells adjacent to it.

Q.1: What is the minimum number of different numerals needed to fill a 3×3 square matrix?

Q.2: What is the minimum number of different numerals needed to fill a 5×5 square matrix?

Q.3: Suppose you are allowed to make one mistake, that is, one pair of adjacent cells can have the same numeral. What is the minimum number of different numerals required to fill a 5×5 matrix?

  1. 16
  2. 4
  3. 25
  4. 9

Q.4: Suppose that all the cells adjacent to any particular cell must have different numerals. What is the minimum number of different numerals needed to fill a 5×5 square matrix?

  1. 9
  2. 16
  3. 4
  4. 25

Answers

  1. 4
  2. 4
  3. B
  4. A