Open in TheBrain

The most unexpected answer to a counting puzzle

<div id="top-row" class="style-scope ytd-video-secondary-info-renderer">

<div id="upload-info" class="style-scope ytd-video-owner-renderer">

<div id="container" class="style-scope ytd-channel-name">

<div id="text-container" class="style-scope ytd-channel-name"><a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw">3Blue1Brown</a></div>

</div>

<div class="badge badge-style-type-verified style-scope ytd-badge-supported-renderer">&nbsp;</div>

2.15M subscribers</div>

<div id="sponsor-button" class="style-scope ytd-video-owner-renderer">&nbsp;</div>

<div id="analytics-button" class="style-scope ytd-video-owner-renderer">&nbsp;</div>

<div id="subscribe-button" class="style-scope ytd-video-secondary-info-renderer">SUBSCRIBED

<div id="notification-preference-toggle-button" class="style-scope ytd-subscribe-button-renderer">&nbsp;</div>

<div id="notification-preference-button" class="style-scope ytd-subscribe-button-renderer">&nbsp;</div>

</div>

</div>

<div id="content" class="style-scope ytd-expander">

<div id="description" class="style-scope ytd-video-secondary-info-renderer">If this doesn't blow your mind, I don't know what will. Part 2: <a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/watch?v=jsYwFizhncE">https://youtu.be/jsYwFizhncE</a> Part 3: <a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/watch?v=brU5yLm9DZM">https://youtu.be/brU5yLm9DZM</a> Brought to you by you: <a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/redirect?q=http%3A%2F%2F3b1b.co%2Fclacks-thanks&amp;event=video_description&amp;v=HEfHFsfGXjs&amp;redir_token=rXoF6CSTxRAITPnSKmpPWQnksxl8MTU3MDkyMzg5MUAxNTcwODM3NDkx" target="blank" rel="nofollow">http://3b1b.co/clacks-thanks</a> New to this channel? It's all about teaching math visually. Take a look and see if there's anything you'd like to learn. NY Times blog post about this problem: <a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/redirect?q=https%3A%2F%2Fwordplay.blogs.nytimes.com%2F2014%2F03%2F10%2Fpi%2F&amp;event=video_description&amp;v=HEfHFsfGXjs&amp;redir_token=rXoF6CSTxRAITPnSKmpPWQnksxl8MTU3MDkyMzg5MUAxNTcwODM3NDkx" target="blank" rel="nofollow">https://wordplay.blogs.nytimes.com/20...</a> The original paper by Gregory Galperin: <a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/redirect?q=https%3A%2F%2Fwww.maths.tcd.ie%2F%7Elebed%2FGalperin.%2520Playing%2520pool%2520with%2520pi.pdf&amp;event=video_description&amp;v=HEfHFsfGXjs&amp;redir_token=rXoF6CSTxRAITPnSKmpPWQnksxl8MTU3MDkyMzg5MUAxNTcwODM3NDkx" target="blank" rel="nofollow">https://www.maths.tcd.ie/lebed/Galpe...</a> Evidently, Numberphile also described this problem (I had not known): <a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/watch?v=abv4Fz7oNr0">https://youtu.be/abv4Fz7oNr0</a> You'll notice that video has an added factor of 16 throughout, which is not here. That's because they're only counting the collisions between blocks (well, balls in their case), and they're only counting to the point where the big block starts moving the other way. ------------------ These animations are largely made using manim, a scrappy open source python library: <a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/redirect?q=https%3A%2F%2Fgithub.com%2F3b1b%2Fmanim&amp;event=video_description&amp;v=HEfHFsfGXjs&amp;redir_token=rXoF6CSTxRAITPnSKmpPWQnksxl8MTU3MDkyMzg5MUAxNTcwODM3NDkx" target="blank" rel="nofollow">https://github.com/3b1b/manim</a> If you want to check it out, I feel compelled to warn you that it's not the most well-documented tool, and it has many other quirks you might expect in a library someone wrote with only their own use in mind. Music by Vincent Rubinetti. Download the music on Bandcamp: <a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/redirect?q=https%3A%2F%2Fvincerubinetti.bandcamp.com%2Falbum%2Fthe-music-of-3blue1brown&amp;event=video_description&amp;v=HEfHFsfGXjs&amp;redir_token=rXoF6CSTxRAITPnSKmpPWQnksxl8MTU3MDkyMzg5MUAxNTcwODM3NDkx" target="blank" rel="nofollow">https://vincerubinetti.bandcamp.com/a...</a> Stream the music on Spotify: <a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/redirect?q=https%3A%2F%2Fopen.spotify.com%2Falbum%2F1dVyjwS8FBqXhRunaG5W5u&amp;event=video_description&amp;v=HEfHFsfGXjs&amp;redir_token=rXoF6CSTxRAITPnSKmpPWQnksxl8MTU3MDkyMzg5MUAxNTcwODM3NDkx" target="blank" rel="nofollow">https://open.spotify.com/album/1dVyjw...</a> If you want to contribute translated subtitles or to help review those that have already been made by others and need approval, you can click the gear icon in the video and go to subtitles/cc, then "add subtitles/cc". I really appreciate those who do this, as it helps make the lessons accessible to more people. ------------------ 3blue1brown is a channel about animating math, in all senses of the word animate. And you know the drill with YouTube, if you want to stay posted on new videos, subscribe: <a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/redirect?q=http%3A%2F%2F3b1b.co%2Fsubscribe&amp;event=video_description&amp;v=HEfHFsfGXjs&amp;redir_token=rXoF6CSTxRAITPnSKmpPWQnksxl8MTU3MDkyMzg5MUAxNTcwODM3NDkx" target="blank" rel="nofollow">http://3b1b.co/subscribe</a> Various social media stuffs: Website: <a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/redirect?q=https%3A%2F%2Fwww.3blue1brown.com&amp;event=video_description&amp;v=HEfHFsfGXjs&amp;redir_token=rXoF6CSTxRAITPnSKmpPWQnksxl8MTU3MDkyMzg5MUAxNTcwODM3NDkx" target="blank" rel="nofollow">https://www.3blue1brown.com</a> Twitter: <a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/redirect?q=https%3A%2F%2Ftwitter.com%2F3blue1brown&amp;event=video_description&amp;v=HEfHFsfGXjs&amp;redir_token=rXoF6CSTxRAITPnSKmpPWQnksxl8MTU3MDkyMzg5MUAxNTcwODM3NDkx" target="blank" rel="nofollow">https://twitter.com/3blue1brown</a> Reddit: <a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/redirect?q=https%3A%2F%2Fwww.reddit.com%2Fr%2F3blue1brown&amp;event=video_description&amp;v=HEfHFsfGXjs&amp;redir_token=rXoF6CSTxRAITPnSKmpPWQnksxl8MTU3MDkyMzg5MUAxNTcwODM3NDkx" target="blank" rel="nofollow">https://www.reddit.com/r/3blue1brown</a> Instagram: <a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/redirect?q=https%3A%2F%2Fwww.instagram.com%2F3blue1brown_animations%2F&amp;event=video_description&amp;v=HEfHFsfGXjs&amp;redir_token=rXoF6CSTxRAITPnSKmpPWQnksxl8MTU3MDkyMzg5MUAxNTcwODM3NDkx" target="blank" rel="nofollow">https://www.instagram.com/3blue1brown...</a> Patreon: <a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/redirect?q=https%3A%2F%2Fpatreon.com%2F3blue1brown&amp;event=video_description&amp;v=HEfHFsfGXjs&amp;redir_token=rXoF6CSTxRAITPnSKmpPWQnksxl8MTU3MDkyMzg5MUAxNTcwODM3NDkx" target="blank" rel="nofollow">https://patreon.com/3blue1brown</a> Facebook: <a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/redirect?q=https%3A%2F%2Fwww.facebook.com%2F3blue1brown&amp;event=video_description&amp;v=HEfHFsfGXjs&amp;redir_token=rXoF6CSTxRAITPnSKmpPWQnksxl8MTU3MDkyMzg5MUAxNTcwODM3NDkx" target="_blank" rel="nofollow">https://www.facebook.com/3blue1brown</a></div>

</div>

<div id="always-shown" class="style-scope ytd-metadata-row-container-renderer">&nbsp;</div>

<div id="collapsible" class="style-scope ytd-metadata-row-container-renderer">

<h4 id="title" class="style-scope ytd-metadata-row-renderer">Caption author (Chinese)</h4>

<div id="content" class="style-scope ytd-metadata-row-renderer"><a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/channel/UC01FqSQpjUrw-C9xdjXE8Wg">Yifan Chen</a></div>

<h4 id="title" class="style-scope ytd-metadata-row-renderer">Caption author (Serbian)</h4>

<div id="content" class="style-scope ytd-metadata-row-renderer"><a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/channel/UC_x9qllghKtGD9V2aSMNTrQ">Aleksandar Milinković</a></div>

<h4 id="title" class="style-scope ytd-metadata-row-renderer">Caption author (Dutch)</h4>

<div id="content" class="style-scope ytd-metadata-row-renderer"><a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/channel/UCTRGLDqI9M0dSz9VFUlsUoA">GijsjeVids</a></div>

<h4 id="title" class="style-scope ytd-metadata-row-renderer">Caption author (Portuguese)</h4>

<div id="content" class="style-scope ytd-metadata-row-renderer"><a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/channel/UCXiO_RmCxpjLcsSnn4vDlRQ">Hontonika</a></div>

<h4 id="title" class="style-scope ytd-metadata-row-renderer">Caption authors (German)</h4>

<div id="content" class="style-scope ytd-metadata-row-renderer"><a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/channel/UCAy6GzSOOL9ec_oi7OjNhGw">okan yakin</a><a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/channel/UC3HQez4P0SI6u8iMny09M2Q">Benjamin Lieser</a></div>

<h4 id="title" class="style-scope ytd-metadata-row-renderer">Caption author (Turkish)</h4>

<div id="content" class="style-scope ytd-metadata-row-renderer"><a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/channel/UCZ-Ea_HMzNF6uNytSawitkw">mtnslgl</a></div>

<h4 id="title" class="style-scope ytd-metadata-row-renderer">Caption authors (Arabic)</h4>

<div id="content" class="style-scope ytd-metadata-row-renderer"><a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/channel/UC6H9wu7-a8q93tqGYaRxRJQ">Abdulmalek Walayeh</a><a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/channel/UCm8DxE5GzCurGL-lTaBK45g">Omar Kayali</a></div>

<h4 id="title" class="style-scope ytd-metadata-row-renderer">Caption author (Korean)</h4>

<div id="content" class="style-scope ytd-metadata-row-renderer"><a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/channel/UCyJlqu7-46KtzymkBzQPSrA">이상명</a></div>

<h4 id="title" class="style-scope ytd-metadata-row-renderer">Caption author (Chinese (Taiwan))</h4>

<div id="content" class="style-scope ytd-metadata-row-renderer"><a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/channel/UCfLlNZamn53Tcc1iPa-2vgw">SF Shih</a></div>

<h4 id="title" class="style-scope ytd-metadata-row-renderer">Caption author (Greek)</h4>

<div id="content" class="style-scope ytd-metadata-row-renderer"><a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/channel/UC0nvnxsK6_cBOFiM19tG0TA">&Pi;&alpha;&nu;&alpha;&gamma;&iota;ώ&tau;&eta;&sigmaf; &Pi;&epsilon;&tau;&rho;ί&delta;&eta;&sigmaf;</a></div>

<h4 id="title" class="style-scope ytd-metadata-row-renderer">Category</h4>

<div id="content" class="style-scope ytd-metadata-row-renderer"><a class="yt-simple-endpoint style-scope yt-formatted-string" spellcheck="false" href="https://www.youtube.com/channel/UCdxpofrI-dO6oYfsqHDHphw">Education</a></div>

<div class="style-scope ytd-metadata-row-renderer">&nbsp;</div>

<div class="style-scope ytd-metadata-row-renderer">00:04
Sometimes math and physics conspire in ways that feel too good to be true.
00:08
Let&rsquo;s play a strange sort of mathematical Croquet.
00:10
We&rsquo;ll have two sliding blocks and a wall.
00:14
The first block starts by coming in at some velocity from the right, while the second
00:18
starts out stationary.
00:20
Being overly-idealistic physicists, let&rsquo;s assume that there is no friction and that
00:23
all collisions are perfectly elastic, which means no energy is lost.
00:28
The astute among you might complain that such collisions would make now sound, but your
00:32
goal will be to count how many collisions take place, so in slight conflict to the assumptions,
00:38
I want to leave in a little clack sound to better draw your attention to that count.
00:41
The simplest case is when both blocks of the same mass.
00:45
The first block hits the second, transferring all of its momentum.
00:48
Then the second one bounces off the wall, then it transfers all of its momentum back
00:52
to the first, which then sails off towards infinity.
00:55
Three total clacks.
00:57
What about if that first block has 100 times the mass of the second one?
01:01
I promise I&rsquo;ll explain all the relevant physics in due course, it&rsquo;s not entirely
01:05
obvious how to predict the dynamics here, but in the spirit of getting to the punchline
01:09
let&rsquo;s just watch what happens.
01:11
That second one will keep bouncing back and forth between the wall and the first block
01:16
with 100 times its mass, like a satisfying game of breakout, slowly and discretely redirecting
01:20
the first blocks momentum to point in the opposite direction.
01:24
In total, there will be 31 collisions before each block is sliding off to infinity, never
01:29
to touch again.
01:31
What if the first block 10,000 times the mass of the second one?
01:35
In that case, there would be quite a few more clacks, all happening very rapidly at one
01:40
point, adding up in all to 313 collisions.
01:48
Hang on...wait for it...wait for it...okay 314 clacks.
01:59
If it was 1,000,000 times the mass of the second, then again, with all our idealistic
02:04
conditions, almost all clacks happen in one big burst, this time resulting in 3,141 total
02:10
collisions.
02:13
Perhaps you see the pattern here, though it&rsquo;s forgivable if you don&rsquo;t since it defies
02:17
all expectation.
02:18
When the mass of that first block is some power of 100 times the mass of the second,
02:23
the number of collisions will have the same digits as the beginning of pi.
02:28
This absolutely blew my mind when it was first shared with me.
02:31
Credit to the viewer Henry Kavle for introducing me to this fact, which was originally discovered
02:35
by the mathematician Gregory Galperin in 1995, and published in 2003.
02:41
Part of what I love about this is that if ever there Olympic games for algorithms computing
02:46
pi, this one would have to win medals both for being the most elegant, and for being
02:51
the most comically inefficient.
02:53
I mean, think about the algorithm:
02:56
Step 1: Implement a physics engine.
02:58
Step 2: Choose the number of digits, d, of pi that you&rsquo;d like to compute.
03:03
Step 3: Set the mass one block to be 100{d - 1}, and send it traveling on a frictionless
03:10
surface towards a block of mass 1.
03:13
Step 4: Count the number of collisions.
03:16
So for example, to calculate only 20 digits of pi, which fits so nicely on this screen,
03:22
one block would have to have 100 billion, billion, billion, billion times the mass of
03:26
the other, which if the small block was 1 kilogram means the big one has a mass 10 times
03:32
that of the supermassive black hole at the center of the milky way.
03:35
That means you&rsquo;d need to count about 31 billion, billion, clacks, and at one point
03:39
in the virtual process, the frequency of clacks would be around 100 billion, billion, billion,
03:44
billion clacks per second.
03:45
So let&rsquo;s just say that you&rsquo;d need very good numerical precision to get this working
03:49
accurately, and it would take a very long time to run!
03:53
I&rsquo;ll emphasize again that this process is way over-idealized, quickly departing from
03:58
anything that could possibly happen in real physics.
04:01
But of course, this is interesting not because of its potential as a pi-computing algorithm,
04:06
or as a pragmatic physics demonstration.
04:08
It&rsquo;s mind-boggling because why on earth do the digits of pi show up here!
04:15
And it&rsquo;s such a weird way for pi to show up, too: Its decimal digits are counting something,
04:19
whereas usually, its precise value describes something continuous.
04:24
I will show you why this is true.
04:26
Where there is pi, there is a hidden circle, and in this case, that hidden circle comes
04:30
from the conservation of energy.
04:31
In fact, you&rsquo;ll see two separate methods which are each as stunning as the surprising
04:36
fact itself.
04:38
Delaying gratification, though, I will make you wait until the next video to see what&rsquo;s
04:41
going on.
04:42
In the meantime, I highly encourage you to take a stab at it yourself.
04:46
And be social about it!
04:47
It&rsquo;s a hard puzzle, so it never hurts to recruit other smart minds to the task.</div>

</div>

Attachments