Subfield: Combinatorics


Question: Let $m$ be a positive integer and consider a checkerboard consisting of $m$ by $m$ unit squares. At the midpoints of some of these unit squares there is an ant. At time 0, each ant starts moving with speed 1 parallel to some edge of the checkerboard. When two ants moving in opposite directions meet, they both turn $90^{\circ}$ clockwise and continue moving with speed 1 . When more than two ants meet, or when two ants moving in perpendicular directions meet, the ants continue moving in the same direction as before they met. When an ant reaches one of the edges of the checkerboard, it falls off and will not re-appear.

Considering all possible starting positions, determine the latest possible moment at which the last ant falls off the checkerboard or prove that such a moment does not necessarily exist.

Solution:
For $m=1$ the answer is clearly correct, so assume $m>1$. In the sequel, the word collision will be used to denote meeting of exactly two ants, moving in opposite directions.

If at the beginning we place an ant on the southwest corner square facing east and an ant on the southeast corner square facing west, then they will meet in the middle of the bottom row at time $\frac{m-1}{2}$. After the collision, the ant that moves to the north will stay on the board for another $m-\frac{1}{2}$ time units and thus we have established an example in which the last ant falls off at time $\frac{m-1}{2}+m-\frac{1}{2}=\frac{3 m}{2}-1$. So, we are left to prove that this is the latest possible moment.

Consider any collision of two ants $a$ and $a^{\prime}$. Let us change the rule for this collision, and enforce these two ants to turn anticlockwise. Then the succeeding behavior of all the ants does not change; the only difference is that $a$ and $a^{\prime}$ swap their positions. These arguments may be applied to any collision separately, so we may assume that at any collision, either both ants rotate clockwise or both of them rotate anticlockwise by our own choice.

For instance, we may assume that there are only two types of ants, depending on their initial direction: NE-ants, which move only north or east, and $S W$-ants, moving only south and west. Then we immediately obtain that all ants will have fallen off the board after $2 m-1$ time units. However, we can get a better bound by considering the last moment at which a given ant collides with another ant.

Choose a coordinate system such that the corners of the checkerboard are $(0,0),(m, 0),(m, m)$ and $(0, m)$. At time $t$, there will be no NE-ants in the region $\{(x, y): x+y<t+1\}$ and no SW-ants in the region $\{(x, y): x+y>2 m-t-1\}$. So if two ants collide at $(x, y)$ at time $t$, we have

$$
t+1 \leq x+y \leq 2 m-t-1
\tag{1}
$$



Analogously, we may change the rules so that each ant would move either alternatingly north and west, or alternatingly south and east. By doing so, we find that apart from (11) we also have $|x-y| \leq m-t-1$ for each collision at point $(x, y)$ and time $t$.

To visualize this, put

$$
B(t)=\left\{(x, y) \in[0, m]^{2}: t+1 \leq x+y \leq 2 m-t-1 \text { and }|x-y| \leq m-t-1\right\}
$$

An ant can thus only collide with another ant at time $t$ if it happens to be in the region $B(t)$. The following figure displays $B(t)$ for $t=\frac{1}{2}$ and $t=\frac{7}{2}$ in the case $m=6$ :

<img_3463>

Now suppose that an NE-ant has its last collision at time $t$ and that it does so at the point $(x, y)$ (if the ant does not collide at all, it will fall off the board within $m-\frac{1}{2}<\frac{3 m}{2}-1$ time units, so this case can be ignored). Then we have $(x, y) \in B(t)$ and thus $x+y \geq t+1$ and $x-y \geq-(m-t-1)$. So we get

$$
x \geq \frac{(t+1)-(m-t-1)}{2}=t+1-\frac{m}{2}
$$

By symmetry we also have $y \geq t+1-\frac{m}{2}$, and hence $\min \{x, y\} \geq t+1-\frac{m}{2}$. After this collision, the ant will move directly to an edge, which will take at $\operatorname{most} m-\min \{x, y\}$ units of time. In sum, the total amount of time the ant stays on the board is at most

$$
t+(m-\min \{x, y\}) \leq t+m-\left(t+1-\frac{m}{2}\right)=\frac{3 m}{2}-1
$$

By symmetry, the same bound holds for SW-ants as well.

Final answer: $\frac{3 m}{2}-1$