Qm
BrainteasersJane StreetCitadel

Infecting a chessboard

Some squares of an n by n board are infected. Every minute, any healthy square that has at least two infected neighbours (sharing an edge, not just a corner) becomes infected. Infected squares stay infected.

  1. Show that n squares, suitably placed, can eventually infect the entire board.
  2. Prove that fewer than n initially infected squares can never infect the whole board, however cleverly they are placed.
Show a hint

For part 2, think about the total length of the boundary between infected and healthy squares (plus the board's edge next to infected squares). What happens to it when a new square gets infected?

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

Commuters facing off on a narrow platformCan a knight return home in an odd number of moves?Straight trominoes and the one uncovered squareThe 100 lockers problemThe 24-stone game where taking the last stone loses
All questions →