Galperin's billiards is a billiards model of two point masses on a frictionless half-line bounded by a wall. The
mass
nearer the wall starts at rest, while the outer mass
moves toward it. All collisions are elastic, and the count
includes both collisions between the masses and collisions with the wall (Galperin
2003).
If
and
are the respective distances from the wall, then
. In the scaled coordinates
, the wall and mutual collisions correspond
to the two boundary rays of a wedge of angle
. Conservation of energy preserves
the speed in these coordinates, and at a mutual collision conservation of momentum
preserves the tangential component of velocity. At the wall, only the component normal
to the boundary changes sign. Thus each collision is a reflection
in a boundary ray.
Successive reflections of the wedge unfold the trajectory into a ray. The trajectory starts inside the first wedge
and moves in the direction opposite to the wall boundary ray,
so its angular coordinate measured from the wall boundary approaches . It crosses exactly the successive boundary rays
at angles
for positive integers
. The total collision count is therefore
where
is the ceiling function (Galperin 2003).
For
with
a positive integer, the count equals the decimal
truncation
or exceeds it by 1 (Galperin 2003, Aretxabaleta et al. 2020). Here
is the floor function,
and the truncations, starting with
, are 3, 31, 314, 3141, ...
(OEIS A011545). For example, the count is exactly
3141 when
. 3Blue1Brown (2025) illustrates the collision
geometry in velocity phase space.
Brown (2020) identifies the velocity reflections with the two steps of Grover's algorithm. In the
search model, both masses start with the same velocity toward the wall. For a search
with one marked item among possibilities, the mass ratio is
, and a wall collision followed by a mutual collision
corresponds to one iteration of the algorithm.