The problem is as following.
Assume $m,n$ are two coprime odd numbers, consider the interval $[0,mn]$. We cut the interval by $m,2m,\ldots,(n-1)m$ and $n, 2n,\ldots, (m-1)n$ into $m+n-1$ pieces of small intervals. And we color them from left to right by black-and-white periodically and black first. The question is to show $$(\textrm{the length of black})-(\textrm{the length of white})=1$$ For example, if $m=3,n=5$, $$\begin{array}{c*{31}}0 &&&&&& 3 &&&&&& 6 &&&&&& 9 &&&&&& 12 &&&&&& 15 \\ \mid & \blacksquare && \blacksquare &&\blacksquare &\mid & \square && \square & \mid & \blacksquare & \mid & \square&& \square&& \square &\mid & \blacksquare &\mid & \square&& \square&\mid & \blacksquare&& \blacksquare&& \blacksquare & \mid \\ 0 &&&&&&&&&& 5 &&&&&&&&&& 10 &&&&&&&&&& 15\end{array} $$The length of black is $8$ and the length of white is $7$.
In my blog, I presented two "analytic" solutions, which are both due to Liu Ben, using the trick of exponential sums. They are so nice in the sense of "analytic" approach.
At the end of the post, I came up a "elementary" solution I want to explain more precisely here.
Consider a billiards table of size $m\times n$, and struck the billiard from one of corners on $45^{\circ}$. Every time the ball knockes the boundary, it changes its color. Then $$(\textrm{the length of black interval})=\sqrt{2}\times (\textrm{the length of orbit of black ball})\qquad {(*)}$$ and $$(\textrm{the length of white interval})=\sqrt{2}\times (\textrm{the length of orbit of white ball})\qquad {(**)}$$ So it suffices to count the length of the grid at the direction of $\diagup$ and $\diagdown$, which is not difficult to compute.
But in this solution, it is not easy to explain why $(*)$ and $(**)$ holds, though we know it from "life experience". And I think there may be some more elementary method to solve this problem. So my questions are
- Is there any elementary solutions to this problem?
- Is there any "strict process" for the billiard problem ?
- Moreover, although I learnt it no more than 1 mouth ago, I think it is so genius that it must be classical and discovered by ancients. So are there any reference for this problem ?