Problem: Divide the plane into an infinite square grid by drawing
all the lines $x=m$ and $y=n$ for $m,n \in \ZZ$.
Next, if a square's upper-right corner has both coordinates even, color it black;
otherwise, color it white (in this way, exactly $1/4$ of the squares are black
and no two black squares are adjacent).
Let $r$ and $s$ be odd integers,
and let $(x,y)$ be a point in the interior of any white square such that $rx-sy$ is irrational.
Shoot a laser out of this point with slope $r/s$;
lasers pass through white squares and reflect off black squares.
Prove that the path of this laser will from a closed loop.

Solution: Here is Sammy Luo's solution.
Fix the speed of light at $\sqrt{r^2+s^2}$ units per second.
We prove periodicity every six seconds.

We re-color the white squares as red, blue, or green
according as to whether they have a black square directly
to the left/right, above/below, or neither, as shown below.
Finally, we fix time zero to be a moment just before the laser passes
a horizontal (WLOG) lattice line (not necessarily a wall).
Shown below is an example for $(r,s) = (3,5)$.

\begin{center}
\begin{asy}
size(11cm);
int Mx = 3;
int My = 6;
for (int i=0; i<=Mx; ++i) {
for (int j=0; j<=My; ++j) {
fill(shift(2*i, 2*j) * unitsquare, opacity(0.1)+lightgreen);
if (i != Mx) { fill(shift(2*i+1, 2*j) * unitsquare, opacity(0.1)+lightred); }
if (j != My) { fill(shift(2*i, 2*j+1) * unitsquare, opacity(0.1)+lightblue); }
if ((i != Mx) && (j != My)) { fill(shift(2*i+1, 2*j+1) * unitsquare, black); }
}
}


pair ne_until_y(pair O, real y) {
  return extension(O, O+(3,5), (0,y), (1,y) );
}
pair ne_until_x(pair O, real x) {
  return extension(O, O+(3,5), (x,0), (x,1) );
}
pair se_until_y(pair O, real y) {
  return extension(O, O+(-3,5), (0,y), (1,y) );
}
pair se_until_x(pair O, real x) {
  return extension(O, O+(-3,5), (x,0), (x,1) );
}


pair[] P = new pair[10];
P[0] = (2.0, 0.84);
P[1] = ne_until_y(P[0], 3);
P[2] = se_until_y(P[1], 2);
P[3] = ne_until_x(P[2], 5);
P[4] = se_until_x(P[3], 4);
P[5] = ne_until_x(P[4], 5);
P[6] = se_until_y(P[5], 9);
P[7] = ne_until_y(P[6], 8);
P[8] = se_until_y(P[7], 11);
P[9] = ne_until_x(P[8], 1);

for (int i=0; i<=8; ++i) { draw(P[i]--P[i+1], orange); }

transform t = yscale(-1)*rotate(-90);
pair[] Q = new pair[8];
Q[0] = t*P[0];
Q[1] = t*ne_until_y(P[0], 1);
Q[2] = t*ne_until_y(P[0], 2);
Q[3] = t*ne_until_x(P[0], 3);
Q[4] = t*ne_until_y(P[0], 3); // = P[1]
Q[5] = t*se_until_y(P[1], 2);
Q[6] = t*ne_until_x(P[2], 4);
Q[7] = t*ne_until_y(P[2], 3);

// for (int i=0; i<=7; ++i) { dot(Q[i], lightblue); }

picture rotated = t*currentpicture;
currentpicture.erase();
add(rotated);

dotfactor *= 0.5;
defaultpen(fontsize(6pt));
dot("$h$", Q[0], dir(-90), red);
dot("$v$", Q[1], dir(90), orange);
dot("$v$", Q[2], dir(-45), orange);
dot("$h$", Q[3], dir(-45), orange);
dot("$v$", Q[4], dir(180)*2, orange);
dot("$v$", Q[5], dir(105)*2, orange);
dot("$h$", Q[6], dir(90), orange);
dot("$v$", Q[7], dir(90), orange);

dot(t*P[3], red);
dot(t*se_until_x(P[5], 4), red);
dot(t*P[9], red);
\end{asy}
\end{center}

The main idea is to keep track of every time the laser passes
a lattice line (again, not necessarily a wall).
There are four possible types of events:
\begin{itemize}
  \ii A horizontal $h$ event where the laser switches from red to green (or vice-versa);
  \ii A horizontal $h$ event where the laser rebounds off a wall,
  remaining in a blue square, but flips the $x$-component of its velocity;
  \ii A vertical $v$ event where the laser switches from blue to green (or vice-versa)
  \ii A vertical $v$ event where the laser rebounds off a wall,
  remaining in a red square, but flips the $y$-component of its velocity.
\end{itemize}

The first key observation is that:
\begin{claim*}
  In the first second, the laser will encounter exactly
  $r$ horizontal events and $s$ vertical events.
  In every second after that, the same sequence of $r+s$ events occurs.
\end{claim*}
\begin{proof}
  Bouncing off a wall doesn't change this
  as opposed to if the laser had passed through the wall.
\end{proof}
We let the \emph{key-word} be the sequence $w$ of $r+s$ letters corresponding to the sequence.
For example, the picture above denotes an example with keyword $w = hvvhvvhv$;
so no matter what, every second, the laser will encounter eight lattice lines,
which are horizontal and vertical in that order.

\begin{claim*}
  Color is periodic every $3$ seconds.
\end{claim*}
\begin{proof}
  The free group generated by $h$ and $v$
  acts on the set $\{R,G,B\}$ of colors in an obvious way; consider this right action.
  First we consider the color of the square after each second.
  Note that with respect to color, each letter is an involution;
  so as far as color changes are concerned,
  it's enough to work with the reduced word $w'$ obtained by modding out by $h^2 = 1$ and $v^2 = 1$.
  (For example, $w' = hv$ in our example.)
  In general, $w' = (hv)^k$ or $w' = (vh)^k$,
  for some odd integer $k$ (since $k \equiv r \equiv s \equiv 1 \pmod 2$).
  Now we see that the action of $hv$
  on the set of colors is
  $\text{red} \mapsto \text{blue} \mapsto \text{green} \mapsto \text{red}$,
  and similarly for $vh$ (being the inverse).
  This implies that the color is periodic every three seconds.
\end{proof}

Now in a 3-second period,
consider the $3r$ horizontal events and $3s$ vertical events (both are odd).
In order for the color to remain the same
(as the only color changes are $R \leftrightarrow G$ for $h$ and $B \leftrightarrow G$ for $v$)
there must have been an even number of color swaps for each orientation.
Therefore there was an odd number of wall collisions of each orientation.
So, the laser is pointing in the opposite direction at the end of 3 seconds.

Finally, let $x_t$ be the fractional part of the $x$
coordinate after $t$ seconds
(the $y$-coordinate is always zero by our setup at these moments).
Note that
\[ x_{t+1} =
  \begin{cases}
    x_t & \text{even number of vertical wall collisions} \\
    1 - x_t & \text{odd numbers of vertical wall collisions}
  \end{cases}
\]
Since over the three seconds there were an odd number of vertical collisions;
it follows $x_3 = 1 - x_0$.
Thus at the end of three seconds, the laser is in a symmetric position from the start;
and in $6$ seconds it will form a closed loop.