In recreational mathematics, arithmetic billiards provide a geometrical method to determine the least common multiple and the greatest common divisor of two natural numbers by making use of reflections inside a rectangle whose sides are the two given numbers. This is an easy example of trajectory analysis of dynamical billiards. Arithmetic billiards have been discussed as mathematical puzzles by Hugo Steinhaus[1] and Martin Gardner,[2] and are known to mathematics teachers under the name 'Paper Pool'.[3] They have been used as a source of questions in mathematical circles.[4]
Consider a rectangle with integer sides, and construct a path inside this rectangle as follows:
If one side length divides the other, the path is a zigzag consisting of one or more segments.Else, the path has self-intersections and consists of segments of various lengths in two orthogonal directions.In general, the path is the intersection of the rectangle with a grid of squares (oriented at 45° w.r.t. the rectangle sides).
Call
a
b
a ⋅ b
\operatorname{lcm}(a,b)
\sqrt{2}
a
b
Suppose that none of the two side lengths divides the other. Then the first segment of the arithmetic billiard path contains the point of self-intersection which is closest to the starting point. The greatest common divisor
\gcd(a,b)
The number of bouncing points for the arithmetic billiard path on the two sides of length
a
(a/\operatorname{gcd}(a,b))-1
(b/\operatorname{gcd}(a,b))-1
b
a
b
a+b
The ending corner of the path is opposite to the starting corner if and only if
a
b
a
b
2
The path is symmetric: if the starting and the ending corner are opposite, then the path is pointsymmetric w.r.t. the center of the rectangle, else it is symmetric with respect to the bisector of the side connecting the starting and the ending corner.
The contact points between the arithmetic billiard path and the rectangle perimeter are evenly distributed: the distance along the perimeter (i.e. possibly going around the corner) between two such neighbouring points equals
2\gcd(a,b)
Set coordinates in the rectangle such that the starting point is
(0,0)
(a,b)
\gcd(a,b)
\gcd(a,b)
Reflecting the billiard: Consider a square with side
\operatorname{lcm}(a,b)
Reducing to the coprime case: It is convenient to rescale the rectangle dividing
a
b
Reversing the time: The motion of the path is “time reversible”, meaning that if the path is currently traversing one particular unit square(in a particular direction), then there is absolutely no doubt from which unit square and from which direction it just came.
The proof can be found in a popularization article.[5]
If we allow the starting point of the path to be any point in the rectangle with integer coordinates, then there are also periodic paths unless the rectangle sides are coprime. The length of any periodic path equals
2\operatorname{lcm}(a,b) ⋅ \sqrt{2}