- 4
- 1 924 393
Lines That Connect
United States
Registrace 22. 08. 2021
The Bubble Sort Curve
A derivation of the curve that is approximated by a common visualization of the bubble sort diagram.
Read the full proof on my site: linesthatconnect.github.io/blog/a-rigorous-derivation-of-the-bubble-sort-curve/
The viral sorting algorithm video which first sparked my interest: czcams.com/video/kPRA0W1kECg/video.html
The animations in this video were created using Manim: www.manim.community/
Music credits:
Fluidscape by Kevin MacLeod is licensed under a Creative Commons Attribution 4.0 license. creativecommons.org/licenses/by/4.0/
Night Music by Kevin Macleod
river - Calm and Relaxing Piano Music by HarumachiMusic
... And a couple of my own songs:
The Fog: soundcloud.com/lines-that-connect/the-fog
Heavy Head, Light Rain: soundcloud.com/lines-that-connect/heavy-head-light-rain
Thanks For Watching: soundcloud.com/lines-that-connect/thanks-for-watching
Chapters:
00:00 Intro:
0:37 Laying the Background
3:20 How Bubble Sort Works
6:59 Mathematically Describing Diagrams
9:13 Stretching the Diagrams
11:52 Visual Derivation
14:38 Symbolic Derivation
16:48 Nice!
17:07 A Rigorous Solution
Read the full proof on my site: linesthatconnect.github.io/blog/a-rigorous-derivation-of-the-bubble-sort-curve/
The viral sorting algorithm video which first sparked my interest: czcams.com/video/kPRA0W1kECg/video.html
The animations in this video were created using Manim: www.manim.community/
Music credits:
Fluidscape by Kevin MacLeod is licensed under a Creative Commons Attribution 4.0 license. creativecommons.org/licenses/by/4.0/
Night Music by Kevin Macleod
river - Calm and Relaxing Piano Music by HarumachiMusic
... And a couple of my own songs:
The Fog: soundcloud.com/lines-that-connect/the-fog
Heavy Head, Light Rain: soundcloud.com/lines-that-connect/heavy-head-light-rain
Thanks For Watching: soundcloud.com/lines-that-connect/thanks-for-watching
Chapters:
00:00 Intro:
0:37 Laying the Background
3:20 How Bubble Sort Works
6:59 Mathematically Describing Diagrams
9:13 Stretching the Diagrams
11:52 Visual Derivation
14:38 Symbolic Derivation
16:48 Nice!
17:07 A Rigorous Solution
zhlédnutí: 357 317
Video
The Trig Hiding Inside the Factorials (And the Harmonic Numbers)
zhlédnutí 139KPřed rokem
In this video, we build on my last two videos by exploring connections between the gamma function (the extended factorials), the digamma function (the extended harmonic numbers), and trigonometry. We derive Euler's Sine Product Formula, which we then use to prove the gamma and digamma functions' reflection formulas. Finally, we derive a related formula for calculating cotangent. Watch my previo...
How to Take the Factorial of Any Number
zhlédnutí 1,1MPřed rokem
In this video, I walk through the derivation of an extension of the factorial function that works for any number: fractional, irrational, and even complex! This turns out to be a very important function, known as the gamma function, which has many surprising connections, one of which I explore in the last chapter of the video. The animations in this video were made with Manim, an open-source Py...
Extending the Harmonic Numbers to the Reals
zhlédnutí 302KPřed 2 lety
The harmonic numbers are the partial sums of the harmonic series - sums of whole number reciprocals. This video explores how we can extend their domain to the entire real line. The animations for this video were made with the community edition of Manim (www.manim.community). Huge thanks to everyone who worked on the library, as well as the members of the Discord server who answered my many ques...
@LinesThatConnect if you have come up with a derivation that actually contributes new knowledge, you should submit it to an academic journal rather then just post it in a blog.
That is the utterly naive version of the algorithm. I think you are missing the point of bubble sort. The idea is to drag the highest item to the end of the list. Once you finish a pass, the last item is the highest, so you can ignore it in the next pass. You ignore the last two the second pass, and the last three the third pass, and the last N the Nth pass. If you ever finish a pass without doing a swap, you are done right away. That is the only endearing property of bubble sort: it is the fastest when the list is already sorted, and is very fast if almost sorted. Okay it has two endearing properties: CPU caches love it.
Okay so, this is one of the best things I've seen conveying how to apply mathematics functions to whatever problem (still reads easier to me in C++ but whatever xD).
Nothing beats the Soviet sort
Fantastic video. You found the solution to a "problem" which is utterly useless and would seem to have no practical applications, purely for the joy of discovery and knowledge. And you explained it in a way that even non-mathematicians (i.e. me) can (mostly) understand. Well done, sir. I salute you 🙂
This reminds me a lot of 3blue1brown style. Nice
Bubble sort lore??????
wow! beautiful
You ever sometimes think that you're kind of smart, and then you come across videos like this and get depressed? Just me?
Good video.
I think it's pretty intuitively obvious that larger items out of place are going to be higher than the diagonal line, and since that algorithm is moving larger items to the right, it's going to form a curve.
I think 3 brown 1 blue might sue.
I'm happy that I ended up watching one of your other videos, and then subscribed. I had previously seen this video recommended to me over and over, but thought it was one of those viral sorting algorithm videos and didn't watch it. I'm happy that I was wrong, this video is very interesting and well done!
phenomenal!!
bogo sort
Nice video , I was hooked (I was right it was one of those a/(b+x) shenanigans)
nice...
So my question would be about the validity of the approximation: Given a big ebough N, H(N) ~ H(N+x) for all x>0 Which would imply that sum( 1/k ) (from 1 to n) is a Cauchy sequence in in R (which is a complete metric space). It would then imply that this sum converges. But it clearly diverges... so what am I missing?
This is something I wish I had presented a little differently. It's not that if you choose a large enough N, then the approximation holds for all x. Rather, given any x, you can find N large enough that it holds. Larger x will require larger N.
@@LinesThatConnect oh I get it :)
The Vsauce theme at 10:38 cracked me up so hard, I thought I was gonna die of laughter. Then the "or is it?" happened and I actually did.
ive been thinking of investigating this myself! im so happy to see this video
not bad, and always psyched to see an homage to grant and manim, but you could have found a slightly different font, manner of speaking, timing, and general format than litterally exactly the same as 3b1b. use the same brush as monet, but make new art with it. it's distractingly familiar, like the uncanny valley.
that would be the bubble, stupid
I've wondered about this for years, thank you!
Omg I remember trying to create sin(x) out of products of linear functions after learning about multiplicity in high school. I was too stupid to fix the scaling issue sadly 😂
When seeing a name like "Lines that connect" I was kinda hoping for some big conspiracy theory... but I just found good work, keep it up bro.
I want to do that not seriously though, just for fun
Now where is the best sorting algorithm based not on what sorts fastest, but what makes the funniest noise?
Radix Sort (LSD)
Hey check this out🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚓🚑🚓🚒🚑🚒🚕🚑🚒🚓🏎️🚑🚒🚓🏎️🏎️🏎️🚑🏎️🚑🏎️🚓🏎️🏎️🏎️🚓🚓🚒🚓🚒🚑🏎️🚑🏎️🏎️🏎️🏎️🏎️🏎️🏎️🏎️🏎️🏎️🏎️🏎️🏎️🏎️🏎️🏎️🏎️🏎️🏎️🏎️🏎️🏎️
sigma
16:00 WHAT THE HELL?!?!? He just got to the formula, just like that?! With a few assumptions and a few rearrangements?! That's CRAZY!
Let’s create the longest reply chain ever
I replied so the length of the Chain is At least one
No
I'm confused, in the transition from 18:02 to 18:03, why does the sigma get replaved by an 'n'? I get that since the function being summed no longer has a 'k' in it, the sum notation can be dropped, but why is the "No longer being summed" L(N) then multiplied by n? Where does that come from?
The sum adds ln(N) once for each k value: k=1, k=2, k=3, ... up to k=n. So in total we're adding it n times, giving us n×ln(N).
@@LinesThatConnect Thanks for the reply, that explains it perfectly!
Best things in math: 1-“Let’s put a box around it” 2- cleaning up and simplifying a mess
We sorting now, baby! LET'S GO! ELT'S GO! EGT'S LO! EGL'S TO! EGLS TO!' EGLO ST!' EGLOST!'
I always do a bogosort first... you know.. you might get lucky one day.
Bogoat sort
is the euler-mascheroni constant related to a fractional or divisible multiple of e or pi or phi or even a trigonometric value like sin, cos, tan or sinh, cosh, tanh value? it looks too familiar, and it makes you constantly think.
I may not have understood much but it's all fascinating
Technically each iteration is faster then the previous. Technically if the if statement is true, then that iteration will take more time if more true outcomes. The reason bubble sort is inefficient is because of how CPU's process if statements. Basically, both true and false outcomes are extrapolated. Both outcomes exist. Over time perhaps the CPU will decide that false occurs more then true. So it will lean into false and backtrack whenever it's true. It's convoluted, but this is why bubble sort is inefficient.
Ik this cuz I accidentally click ! On Samsung calculator and I try it with 10! And the number is 1million+ and I try to figure out what is this thing
A method via recursive equality… I think I’ve seen it somewhere !
Well, well, well, if it isn't Hyperbola
Blud did not skip a single math class Nice vid
Holy cow he is good at transitions
I love getting detailed answers to strange and obscure questions that I never though to ask. Fascinating.
that is the point of yt imo
That curve is obviously the bubble. Duh.
mmmmmmmmmm, Neopolitan sorting algorithms
that was...... genius.... holllyyyyyyyyyyy
Or is it..... LMAOOOO
When I watch the bubble sort "bubble," my brain intuitively understands what's happening and why, but I can't for the life of me follow any of the math behind it. Why is my brain capable of understanding something intuitively that it can't understand mathematically?
you dont have to believe me, but the signals in your brain are LITERALLY bypassing the logic sectors
What if you extend to complex numbers
There is an elegant technique for differentiating under the integral sign that allows u to transform the sum into an integral--which makes it easier to compute complex inputs.
Equal time per iteration assumption is bogus. No one would code it that way. Obvious comment but I'm not going to sort the 4-digit sock puppet comments. Sufficient to note that the first one is such.