# Getting the first digits of Pi by counting collisions

### Grégoire Nicollier

University of Applied Sciences of Western Switzerland

Route du Rawyl 47, CH--1950 Sion, Switzerland

February 21, 2015.

This is a much simpler exposition of a 2003 article by G. Galperin. Place on the horizontal $a$-axis a wall at $a=0$, a point mass of mass $1$ at $a=x_0>0$, and a point mass of mass $m>0$ at $a=y_0>x_0$. Hit mass $m$ from the right at time $t=0$ and count the number of elastic collisions mass-mass or mass-wall in absence of friction. There are for example three collisions for $m=1$ (verify this by yourself and notice that $3$ is the first digit of $\pi$).

Let $x(t)$ and $y(t)$ be the positions of mass $1$ and mass $m$ at time $t\ge0$. We set $Y(t)=\sqrt m y(t)$ and observe the point $P(t)=(x(t),Y(t))$ in the $(x,Y)$-plane. As $0\le x(t)\le y(t)$ for all $t\ge0$, $P(t)$ moves in the sector delimited by the positive $Y$-axis and the half-line $\ell$ of equation $Y=\sqrt m x$, $x\ge0$. The trajectory of $P(t)$ is linear between any two collisions, that is, between any two rebounds on the sector boundary. $P(t)$ starts at $(x_0,\sqrt m y_0)$ and moves first vertically to $\ell$, where the first mass-mass collision takes place.

The total kinetic energy

$\frac12x'^{\,2}(t)+\frac12 my'^{\,2}(t)=\frac12\left\Vert\overrightarrow{P'(t)}\right\Vert^2$

and the momentum

$1x'(t)+ my'(t)= (1,\sqrt m\,)\cdot \overrightarrow{P'(t)}$

do not change during a mass-mass collision. As the constant momentum is the dot product of the fixed vector $\overrightarrow\ell= (1,\sqrt m\,)$ parallel to $\ell$ and the vector $\overrightarrow{P'(t)}$ of constant length, the angle between these vectors is the same before and after the mass-mass collision: the trajectory of $P(t)$ obeys thus the reflection law when it hits the half-line $\ell$.

The second collision occurs between mass $1$ and the wall. As $x'(t)$ changes at that moment to $-x'(t)$, $\overrightarrow{P'(t)}$ changes from $(x'(t),Y'(t))$ to $(-x'(t),Y'(t))$: the trajectory of $P(t)$ also obeys the reflection law when it hits the $Y$-axis.

Turn the ray $\ell$ clockwise by

$\alpha=\angle(Y\text{-axis},\,\ell)=\arctan\left(1/\sqrt m\,\right)$

over and over again until the ray leaves the half-plane $x>0$: including $\ell$, there are

(1)

$\displaystyle\left\lceil \frac\pi\alpha\right\rceil-1$

such rays. Since every collision obeys the reflection law, (1) is the *finite* total number of collisions: it is indeed the number of times the vertical line $x=x_0$ cuts one of these rays.

Chose now $m=\cot^2(10^{-n})$, which is approximatively $10^{2n}$, for some natural number $n$: by (1), the number of collisions is

$\left\lceil10^n\pi\right\rceil-1=\left\lfloor10^n\pi\right\rfloor,$

the number formed by the first $n+1$ digits of $\pi$.

### References

- G. Galperin, Playing pool with $\pi$,
*Regular & Chaotic Dynamics*, 8 (2003)

|Contact| |Front page| |Contents| |Geometry|

Copyright © 1996-2018 Alexander Bogomolny

71052357