The most unexpected answer to a counting puzzle

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 π3.14159\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:

  • Step 1: Implement a physics engine.
  • Step 2: Choose the number of digits, dd, of π\pi that you’d like to compute.
  • Step 3: Set the mass of one block to be 100d1100^{d - 1}, and send it traveling on a frictionless surface towards a block of mass 11.
  • Step 4: Count the number of collisions.

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.

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 next two lessons you’ll see two separate methods for understanding this hidden π\pi, each as stunning as the surprising fact itself.

Notice a mistake? Submit a correction on Github


Special thanks to those below for supporting the original video behind this post, and to current patrons for funding ongoing projects. If you find these lessons valuable, consider joining.

1stViewMathsAdam KozakAdam MielsAdrian RobinsonAlan SteinAlex DodgeAlex FriederAlexis OlsonAli YahyaAlvaro CarboneroAlvin KhaledAnalysis HeroAndreas Benjamin BrösselAndreas NautschAndrew BuseyAndrew FosterAndy PetschAnkalagonAnthony VdovitchenkoAntonio JuarezArjun ChakrobortyArt IanuzziArthur ZeyAwooBen GrangerBernd SingBob SandersonBoris VeselinovichBrad WeiersBrian SlettenBrian StaroselskyBrice GardnerBrice GowerBritt SelvitelleBritton FinleyBrooks RybaBurt HumburgChandra SripadaCharles GloverCharles SoutherlandChrisChris ConnettChristian CooperChristian KaiserChristian MercatChristopher LortonClark GaebelConvenienceShoutCooper JonesD. SivakumarDan DavisonDanger DaiDave BDave Kesterdave nicponskiDavid CampDavid ClarkDavid GowDavid HouseDavid J WuDelton DingDerek G MillerDevarsh DesaiDheeraj NarasimhaDhilung KirateaglleElliot WinklerEric KoslowEric YoungeEryq OuithaqueueEurghSireAweEvan MiyazonoEvan PhillipsFederico LebronFlorian ChudigiewitschFlorian RagwitzGiovanni FilippiGokcen EraslanGordon GouldGrahamGregory HopperGünther KöckerandlHal HildebrandHamid Reza ZaheriHenry ReichIaroslav TymchenkoIsaac ShamieJJacob MagnusonJacob WallingfordJaewon JungJake Vartuli - SchonbergJameel SyedJames GolabJames HughesJan PijpersJason HiseJay EbhomenyeJayne GabrieleJeff LinseJeff StraathofJohn C. VeseyJohn GriffithJohn HaleyJohn ShaughnessyJohn V WertheimJonathan EppeleJonathan WilsonJono ForbesJordan ScalesJoseph John CoxJoseph KellyJoshua TobkinJuan BenetKai-Siang AngKanan GillKaustuv DeBiswasKeith SmithKenneth LarsenKevin NorrisKevin OrrKrishanu SankarKyle BegovichKyle HooksL0j1kLee BurnetteLee Reddenlevav ferber tasLinh TranLockLuc RitchieLudwig SchubertLukas -krtek.net- NovyLukas BiewaldMagister MugitMagnus DahlströmMagnus LysfjordmakkostyaManne MoquistManuel GarciaMarcus KöhlerMark B BahuMark HeisingMartin Sergio H. FaesterMathew BramsonMathias JanssonMatt LangfordMatt ParlmerMatt RovetoMatt RussellMatthew CockeMauricio CollaresMayank M. MehrotraMert ÖzMichael FaustMichael HardelMichael KohlerMikael NordvallMike DourMike DussaultMikkoMustafa MahdiMárton VaitkusNathan JessurunNenad VitorovicNero LiNicanNiklas BuschmannOctavian VoicuOliver SteeleOmar Zrienotavio goodPatch KesslerPeter EhrnstromPeter McinerneyPeterCxyPsylenceQinghong ShiQuantopianRabidCamelRandy C. WillRandy TrueRichard BarthelRichard BurgmannRichard ComishRipta PasayRish KundaliaRobert DavisRobert TeedRobert van der TuukRoobieRoy LarsonRyan AtallahRyan WilliamsSamuel D. JudgeSandy WilbournScott GrayScott Walter, Ph.D.Sean BarrettSean GallagherSebastian BraunertShahbaz ShaikhsidwillSindre Reino TrosterudsoekulSolara570Song GaoSophie KarlinSteve CohenStevie MetkeSundar SubbarayanTed SuzmanThomas Peter BerntsenTihan SealeTim RobinsonTina LeTino AdamsTobias ChristiansenTyler HerrmannUnemployed C Clamp Inspection OfficerVValentin Mayer-EichbergerValeriy SkobelevVassili PhilippovVictor CastilloVictor KostyukVictor LeeVladyslav KurmazXavier BernardYana ChernobilskyYaw EtseYinYangBalance.AsiaYixiu ZhaoYu JunZach CardwellZachary Elliott噗噗兔


Table of Contents