bugs hate other bug on their square
Source: STEMS 2021 CS Cat A Q6
January 23, 2021
combinatorics
Problem Statement
Some bugs are sitting on squares of board. Each bug has a direction associated with it (up, down, left, right). After 1 second, the bugs jump one square in their associated direction. When the bug reaches the edge of the board, the associated direction reverses (up becomes down, left becomes right, down becomes up, and right becomes left) and the bug moves in that direction. It is observed that it is never the case that two bugs are on same square. What is the maximum number of bugs possible on the board?