On this page
Put a small block between a wall and a much heavier block, push the heavy one towards the wall, and count every collision. With equal masses you count 3. With the heavy block 100 times heavier you count 31. At 10,000 times you count 314. At a million, 3141. The digits of π appear, one more for every factor of 100 in the mass ratio. This is a fair JEE-style question on elastic collisions, and the reason it works is a piece of geometry you can follow with Class 11 tools.
The result is from G. Galperin, "Playing pool with π (the number π from a billiard point of view)", Regular and Chaotic Dynamics 8(4), 375–394 (2003), doi:10.1070/RD2003v008n04ABEH000252. The title is confirmed on the journal's article page, and we read the full text.
What exactly is being counted?
The setup, as Galperin states it:
A wall, a small block of mass m, then a big block of mass M, all on one line. The floor is frictionless.
The small block starts at rest. The big block slides towards it.
Every collision is perfectly elastic. A wall hit simply reverses the small block's velocity.
Count block–block hits plus wall hits. Stop when no more collisions can happen: both blocks move away from the wall and the big block is at least as fast as the small one.
Each block–block hit uses the usual one-dimensional elastic formulas from OpenStax University Physics Volume 1, section 9.4. If you want a shortcut for those formulas, see why velocities simply reverse in the centre-of-mass frame.
Why is the kinetic energy a circle?
Let v₁ and v₂ be the velocities of the small and big blocks, positive away from the wall. Kinetic energy is ½mv₁² + ½Mv₂². Now rename the variables: x = √m v₁ and y = √M v₂. The energy becomes ½(x² + y²).
Energy never changes, so the point (x, y) always lies on one circle. Every state of the system, after every collision, is a point on that circle.
Why is each collision a reflection?
A wall hit turns v₁ into −v₁ and leaves v₂ alone. In the new variables, x → −x: a reflection in the y-axis.
A block–block hit keeps momentum mv₁ + Mv₂ = √m x + √M y fixed. So the point jumps along a straight line on which √m x + √M y is constant, and lands at the other place that line meets the circle. That is a reflection in the line through the centre along (√m, √M).
The two "mirror lines" meet at the angle θ where tan θ = √m/√M, so θ = tan⁻¹√(m/M). For equal masses θ = 45°. For M = 100m, θ = tan⁻¹(0.1) = 5.71°.
How does counting reflections give π?
Consecutive chords of the zig-zag meet at angle θ, so by the inscribed angle theorem each hit moves the point a further 2θ round the circle. The point cannot go round more than once before the end condition is reached, so the number of hits is about 2π/2θ = π/θ.
Galperin makes this exact by "unfolding" the zig-zag into a straight line through copies of the angle θ. With the small block starting at rest, the count is the largest whole number strictly below π/θ.
Equal masses: π/θ = 180°/45° = 4 exactly, so the count is 3.
M = 100m: π/θ = 180°/5.711° = 31.52, so the count is 31.
For small angles tan⁻¹x ≈ x, so with M/m = 100ᴺ, θ ≈ 10⁻ᴺ and π/θ ≈ π × 10ᴺ. Its whole-number part is the first N + 1 digits of π: 3, 31, 314, 3141, 31415.
One honest caveat. Because tan⁻¹ is not exactly linear, the count could in principle come out one too high if π happened to contain a long run of nines in just the wrong place. Galperin shows this does not happen for N up to 10⁸ and conjectures that it never does.
Worked example: M = 100m arriving at 1 m/s
Take m = 1 kg, M = 100 kg, small block at rest, big block moving towards the wall at 1 m/s (v₂ = −1 m/s).
Hit 1, block–block. v₁ = 2M v₂/(m + M) = 2 × 100 × (−1)/101 = −1.980 m/s. v₂ = (M − m)v₂/(m + M) = −99/101 = −0.980 m/s.
Hit 2, wall. v₁ becomes +1.980 m/s.
Hit 3, block–block. The small block now meets the big one head-on. Using the general formulas, v₁ = −3.882 m/s and v₂ = −0.922 m/s.
Keep going. Each pair of hits slows the big block a little and speeds up the small one, until the big block turns round.
Peak speed. Energy is 50 J throughout, so the small block can never exceed √(2 × 50/1) = 10 m/s, which is √(M/m) × 1 m/s. In our step-by-step simulation it peaks at 9.997 m/s.
The end. After hit 31 (a block–block hit) the small block moves away at 0.478 m/s and the big block at 0.999 m/s. The big block is faster, so they never meet again. Check energy: ½(1)(0.478)² + ½(100)(0.9989)² ≈ 50.0 J.
Tally. 16 block–block hits and 15 wall hits make 31, matching the count below π/θ = 31.52.
We ran the same simulation with exact fractions for M/m = 1, 100 and 10⁴ and with ordinary floating point for 10⁶ and 10⁸, getting 3, 31, 314, 3141 and 31415.
How is this different from a ball between a wall and a bat?
In why a ping-pong ball bounces faster as a bat closes in, the bat is driven at a steady slow speed, so energy is fed in and the bounces go on until the gap closes. Here nothing is driven. Both blocks are free, energy is fixed, and the count is finite. A single bounce off a moving surface is in the speed of a ball after hitting a moving wall.
Can you really compute π this way?
No. Real blocks lose a little energy at every hit and feel some friction. At M/m = 10⁸ the small block would need to make over 31,000 perfectly elastic hits, so that case is a thought experiment. Galperin himself writes that the method "most likely, will never be used as a practical way" of finding π. Its value is the idea: a mechanics problem turns into geometry on a circle.
To see the collisions play out, try the Simulation Lab. If you are working on elastic collisions for JEE, Fermi Test Prep offers personalised preparation for JEE Main & Advanced with an AI tutor, live classes, adaptive mocks, mentorship and a study plan that updates based on mastery.
Quick checklist
Scale velocities: x = √m v₁, y = √M v₂. Energy is a circle.
Wall hit: reflection in the y-axis. Block hit: reflection in the line along (√m, √M).
Angle between the mirrors: θ = tan⁻¹√(m/M).
Number of hits: the largest whole number below π/θ (3 for equal masses).
M/m = 100ᴺ gives the first N + 1 digits of π.
It is an idealisation, not a practical way to compute π.



