Why Pi

The most unexpected answer to a counting puzzle

A puzzle involving colliding blocks where the number pi, vey unexpectedly, shows up.

Jan 13, 2019
Lesson by Grant Sanderson
Text adaptation by Josh Pullen

Let's play a strange sort of mathematical croquet. We'll have two sliding blocks and a wall. The first block starts by coming in at some velocity from the right, while the second starts out stationary. Being overly-idealistic physicists, let's assume that there's no friction and that all collisions are perfectly elastic, meaning no energy is lost.

The simplest case is when both blocks have the same mass.

The first block hits the second, transferring all of its momentum. Then the second one bounces off the wall, then it transfers all of its momentum back to the first, which then sails off towards infinity. Three total clacks.

What about if that first block has 100 times the mass of the second one? It's not entirely obvious how to predict the dynamics here; I promise I'll explain all the relevant physics in due course. But in the spirit of getting to the punchline, let's just watch what happens.

That second one will keep bouncing back and forth between the wall and the first block with 100 times its mass, like a satisfying game of breakout, slowly and discretely redirecting the first block's momentum to point in the opposite direction. In total, there will be 31 collisions before both blocks are sliding off to infinity, never to touch again.

What if the first block has 10,000 times the mass of the second one?

In that case, there would be quite a few more clacks, all happening very rapidly at one point, adding up to 314 collisions in all.

If the first block was 1,000,000 times the mass of the second, then again, with all our idealistic conditions, almost all clacks happen in one big burst, this time resulting in 3,141 total collisions.

Perhaps you see the pattern here, though it's forgivable if you don't, since it defies all expectations. When the mass of that first block is some power of 100 times the mass of the second, the number of collisions will have the same digits as the beginning of \pi \approx 3.14159.

This absolutely blew my mind when it was first shared with me. Credit to the viewer Henry Kavle for introducing me to this fact, which was originally discovered by the mathematician Gregory Galperin in 1995, and published in 2003.

Part of what I love about this is that if ever there were olympic games for algorithms computing \pi, this one would have to win medals both for being the most elegant, and for being the most comically inefficient. I mean, think about the algorithm:

So for example, to calculate only 20 digits of \pi, one block would have to be 100 billion billion billion billion times the mass of the other. If the small block was 1 kilogram, that means the big one would have a mass 10 times that of the supermassive black hole at the center of the milky way.

Image

That means you'd need to count about 31 billion billion clacks, and at one point in the virtual process, the frequency of clacks would be around 100 billion billion billion billion clacks per second. So let's just say that you'd need very good numerical precision to get this working accurately, and it would take a very long time to run!

I'll emphasize again that this process is way over-idealized, quickly departing from anything that could possibly happen in real physics. But of course, you and I both know that this is not interesting because of its potential as a \pi-computing algorithm, or as a pragmatic physics demonstration.

It's mind-boggling because why on earth do the digits of \pi show up here? And it's such a weird way for \pi to show up, too: Its decimal digits are counting something, whereas usually its precise value describes something continuous.

I will show you why this is true. Where there is \pi, there is a hidden circle. And in this case, that hidden circle comes from the conservation of energy. In fact, in the two lessons you'll see two separate methods for understanding this hidden \pi, each as stunning as the surprising fact itself.

Next Lesson
Why colliding blocks compute pi


Thanks

Special thanks to those below for supporting this lesson.

1stViewMaths
Adam Kozak
Adam Miels
Adrian Robinson
Alan Stein
Alex Dodge
Alex Frieder
Alexis Olson
Ali Yahya
Alvaro Carbonero
Alvin Khaled
Analysis Hero
Andreas Benjamin Brössel
Andreas Nautsch
Andrew Busey
Andrew Foster
Andy Petsch
Ankalagon
Anthony Vdovitchenko
Antonio Juarez
Arjun Chakroborty
Art Ianuzzi
Arthur Zey
Awoo
Ben Granger
Bernd Sing
Bob Sanderson
Boris Veselinovich
Brad Weiers
Brian Sletten
Brian Staroselsky
Brice Gardner
Brice Gower
Britt Selvitelle
Britton Finley
Brooks Ryba
Burt Humburg
Chandra Sripada
Charles Glover
Charles Southerland
Chris
Chris Connett
Christian Cooper
Christian Kaiser
Christian Mercat
Christopher Lorton
Clark Gaebel
ConvenienceShout
Cooper Jones
D. Sivakumar
Dan Davison
Danger Dai
Dave B
Dave Kester
dave nicponski
David Camp
David Clark
David Gow
David House
David J Wu
Delton Ding
Derek G Miller
Devarsh Desai
Dheeraj Narasimha
Dhilung Kirat
eaglle
Elliot Winkler
Eric Koslow
Eric Younge
Eryq Ouithaqueue
EurghSireAwe
Evan Miyazono
Evan Phillips
Federico Lebron
Florian Chudigiewitsch
Florian Ragwitz
Giovanni Filippi
Gokcen Eraslan
Gordon Gould
Graham
Gregory Hopper
Günther Köckerandl
Hal Hildebrand
Hamid Reza Zaheri
Henry Reich
Iaroslav Tymchenko
Isaac Shamie
J
Jacob Magnuson
Jacob Wallingford
Jaewon Jung
Jake Vartuli - Schonberg
Jameel Syed
James Golab
James Hughes
Jan Pijpers
Jason Hise
Jay Ebhomenye
Jayne Gabriele
Jeff Linse
Jeff Straathof
John C. Vesey
John Griffith
John Haley
John Shaughnessy
John V Wertheim
Jonathan Eppele
Jonathan Wilson
Jono Forbes
Jordan Scales
Joseph John Cox
Joseph Kelly
Joshua Tobkin
Juan Benet
Kai-Siang Ang
Kanan Gill
Kaustuv DeBiswas
Keith Smith
Kenneth Larsen
Kevin Norris
Kevin Orr
Krishanu Sankar
Kyle Begovich
Kyle Hooks
L0j1k
Lee Burnette
Lee Redden
levav ferber tas
Linh Tran
Lock
Luc Ritchie
Ludwig Schubert
Lukas -krtek.net- Novy
Lukas Biewald
Magister Mugit
Magnus Dahlström
Magnus Lysfjord
makkostya
Manne Moquist
Manuel Garcia
Marcus Köhler
Mark B Bahu
Mark Heising
Martin Sergio H. Faester
Mathew Bramson
Mathias Jansson
Matt Langford
Matt Parlmer
Matt Roveto
Matt Russell
Matthew Cocke
Mauricio Collares
Mayank M. Mehrotra
Mert Öz
Michael Faust
Michael Hardel
Michael Kohler
Mikael Nordvall
Mike Dour
Mike Dussault
Mikko
Mustafa Mahdi
Márton Vaitkus
Nathan Jessurun
Nenad Vitorovic
Nero Li
Nican
Niklas Buschmann
Octavian Voicu
Oliver Steele
Omar Zrien
otavio good
Patch Kessler
Peter Ehrnstrom
Peter Mcinerney
PeterCxy
Psylence
Qinghong Shi
Quantopian
RabidCamel
Randy C. Will
Randy True
Richard Barthel
Richard Burgmann
Richard Comish
Ripta Pasay
Rish Kundalia
Robert Davis
Robert Teed
Robert van der Tuuk
Roobie
Roy Larson
Ryan Atallah
Ryan Williams
Samuel D. Judge
Sandy Wilbourn
Scott Gray
Scott Walter, Ph.D.
Sean Barrett
Sean Gallagher
Sebastian Braunert
Shahbaz Shaikh
sidwill
Sindre Reino Trosterud
soekul
Solara570
Song Gao
Sophie Karlin
Steve Cohen
Stevie Metke
Sundar Subbarayan
Ted Suzman
Thomas Peter Berntsen
Tihan Seale
Tim Robinson
Tina Le
Tino Adams
Tobias Christiansen
Tyler Herrmann
Unemployed C Clamp Inspection Officer
V
Valentin Mayer-Eichberger
Valeriy Skobelev
Vassili Philippov
Victor Castillo
Victor Kostyuk
Victor Lee
Vladyslav Kurmaz
Xavier Bernard
Yana Chernobilsky
Yaw Etse
YinYangBalance.Asia
Yixiu Zhao
Yu Jun
Zach Cardwell
Zachary Elliott
噗噗兔