The Bubble Sort Curve

  Рет қаралды 297,102

Lines That Connect

Lines That Connect

Күн бұрын

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/bl...
The viral sorting algorithm video which first sparked my interest: • 15 Sorting Algorithms ...
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/...
Night Music by Kevin Macleod
river - Calm and Relaxing Piano Music by HarumachiMusic
... And a couple of my own songs:
The Fog: / the-fog
Heavy Head, Light Rain: / heavy-head-light-rain
Thanks For Watching: / 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

Пікірлер: 593
@LinesThatConnect
@LinesThatConnect 11 күн бұрын
A few notes which might be of interest, but which didn't fit in the video: - <a href="#" class="seekto" data-time="207">3:27</a> - I'm using a loose pseudocode to represent the algorithm as compactly as possible. The for loops go to N - 2, inclusive. For some reason, that felt more natural to me. - Most of the list sorting animations use a more optimized version of the algorithm than what I step through. Since the largest n items are sorted after n iterations, we can stop the scan early, so each iteration is quicker than the last one. I used the slower version for the math because it is simpler to pretend that every iteration takes an equal amount of time. To transform the result into the more optimized version, just replace t with 1 - √(1 - t). - I "cheated" a bit for some of the animations by using specifically designed shuffles to make the curve really clear (<a href="#" class="seekto" data-time="2">0:02</a>, <a href="#" class="seekto" data-time="23">0:23</a>, <a href="#" class="seekto" data-time="1014">16:54</a>). The curve starts becoming really clear with random shuffles when the size of the list gets into the thousands (like at <a href="#" class="seekto" data-time="150">2:30</a>). But when the list length is in the low hundreds, it's usually pretty lopsided (like at <a href="#" class="seekto" data-time="78">1:18</a>). I think the low hundreds size is the most visually pleasing, so I figured that a slightly fudged shuffle was worth the extra visual clarity.
@javabeanz8549
@javabeanz8549 10 күн бұрын
This is of course a special case. A lot like a giant single deck of cards, each one is unique. Real data or random data rarely comes close to this pattern. But as you stated, a larger data set will produce better curves. It does make for some rather cool visuals.
@dada236
@dada236 10 күн бұрын
Another way of deriving the function would be to use probabilities, measuring the probability P[N=n] where n is the number of numbers to the left of an arbitrary position being lower than the number at that position. You could use n as a parameter to find f(n,t)
@neyzzury
@neyzzury 6 күн бұрын
Bro you gotta make more Videos I enjoy them so much, you have an uncommon Talent in explaining (an manim, i dont get the library -_-)
@bonbondojoe1522
@bonbondojoe1522 15 күн бұрын
Babe not now, factorial guy just dropped
@Sir_Isaac_Newton_
@Sir_Isaac_Newton_ 14 күн бұрын
I, Newton, have also come to witness this event.
@rewixx69420
@rewixx69420 14 күн бұрын
yes yes yes
@no_mnom
@no_mnom 14 күн бұрын
😂
@HopefullyJustMe
@HopefullyJustMe 14 күн бұрын
@@Sir_Isaac_Newton_SIR ISSAC NEWTON 🗣️🗣️🗣️
@creativename.
@creativename. 14 күн бұрын
Lmaoooo
@srikar4220
@srikar4220 14 күн бұрын
The most impressive part of it is that you did not skip the rigor, you wrote up a 26 page paper exploring the details. Really cool video.
@LightslicerGP
@LightslicerGP 12 күн бұрын
HE WROTE A PAPER ALONGSIDE THIS VIDEO? Holy sh- Edit: just finished the video and oh my God the madman actually did
@Prograde
@Prograde 14 сағат бұрын
average lsgp strat
@frama589
@frama589 15 күн бұрын
the curve matching is a lot more satisfying than any sorting video i have seen
@patch858
@patch858 14 күн бұрын
The entire derivation build up made it so satisfying to see it smoothly lock into place after all his work
@haipingcao2212
@haipingcao2212 7 күн бұрын
k u v I n a
@EyalBrown
@EyalBrown 15 күн бұрын
You realize you probably have one of the best average video quality on KZbin, right? 4 videos, all killer, no filler.
@unneccry2222
@unneccry2222 14 күн бұрын
he is the next 3b1b i think
@procactus9109
@procactus9109 14 күн бұрын
Lol @ best average video quality
@stevelin3659
@stevelin3659 14 күн бұрын
I know quite a few channels with very few very high-quality videos, such as Nemean and CodeAesthetic, and they happen to both be programming-related.
@grayolson9529
@grayolson9529 14 күн бұрын
Joshs Channel also up there
@henrycgs
@henrycgs 14 күн бұрын
a channel with a single, great, video is better :)
@darkshoxx
@darkshoxx 15 күн бұрын
<a href="#" class="seekto" data-time="1070">17:50</a> "Which this epilogue is too small to contain", i.e. it will be proven in 350 years with methods not yet available to us. Here's to hoping 🤞. Great video btw!
@Rudxain
@Rudxain 15 күн бұрын
Fermat moment
@hgmercury7279
@hgmercury7279 14 күн бұрын
i thought of this exact same thing xD
@Celestia1323
@Celestia1323 14 күн бұрын
Lets wait for 2374 :D
@whophd
@whophd 13 күн бұрын
@@Rudxain FERMAT C: … uh oh I erased the data
@TheBooker66
@TheBooker66 12 күн бұрын
lmao yep
@garthgoldwater5256
@garthgoldwater5256 15 күн бұрын
the way you gray out the inequality and move it to the side, and the way you color and increase or decrease the size of relevant parts of the graphs and equations is SO HELPFUL and i imagine tricky to get exactly right. i really appreciate it
@givrally7634
@givrally7634 12 күн бұрын
It's actually not that hard to do using manim, it's a single line for each one. What I find impressive is that he even had the idea to do this, in this form, with these positions and timings, and in the end it's really the combination of all these design choices that make this video so beautiful to watch.
@garthgoldwater5256
@garthgoldwater5256 12 күн бұрын
@@givrally7634 oh i meant “tricky to get exactly right” as in there’s a ton of feeling out being done for timings and sizes, and the feedback loop is indirect
@tingwu_
@tingwu_ 14 күн бұрын
This problem has been stuck in my head for a long time. You don't know how surprised and excited I was when I saw this video explaining the exact problem appears in the recommendation! Thank you so much for making this video.
@jamesking2439
@jamesking2439 14 күн бұрын
Same.
@alexanderlake2691
@alexanderlake2691 14 күн бұрын
Same
@Redditard
@Redditard 14 күн бұрын
Sam
@JavedAlam-ce4mu
@JavedAlam-ce4mu 12 күн бұрын
Why??? Why would you want to know a formula for the shape of the bubble sort curve?
@anderaginaga2
@anderaginaga2 12 күн бұрын
​@@JavedAlam-ce4muIt isn't that strange to see someone have curiosity for a random topic.
@Grayson_Wu
@Grayson_Wu 14 күн бұрын
<a href="#" class="seekto" data-time="982">16:22</a> I can't even imagine the work you put in that ≥ to ≤ transition in manim. Great video as always.
@LinesThatConnect
@LinesThatConnect 14 күн бұрын
I'm so glad this didn't go unnoticed! It's the kind of thing where you'd never think it takes so much work unless you've tried it yourself.
@londonl.5892
@londonl.5892 12 күн бұрын
@@LinesThatConnect I haven't tried it and I was still in awe. I saw the equations dissolve and I was like "Wow, that was impressive."
@ndiamantopoulos
@ndiamantopoulos 15 күн бұрын
Bro just comes in every year or so and just drops a banger on us
@haodzz
@haodzz 14 күн бұрын
I just checked: It has been 08/2021, 08/2022, 04/2023, and this month 04/2024. See you in 2025.
@davidcotham1939
@davidcotham1939 13 күн бұрын
Bro took quality over quantity to heart
@play005517
@play005517 13 күн бұрын
The assumption part should also address why you are ignoring the dips and only fitting a tarp-like shape. Because the shape is only apparent to a human eye constantly searching for a pattern if you are using bars. If you use a scatter plot to represent the same process, the "shape" a human eye are seeing will actually become a string instrument, an American football-shaped part before x, and a straight line pass x.
@xxgn
@xxgn 11 күн бұрын
He does explain/define shapes a bit more rigorously in his blog post. His proof, linked in the blog post, formalizes a definition of shapes at the top of page 9 (definition 8).
@colindefant4911
@colindefant4911 14 күн бұрын
This is extremely cool! You’re essentially something called a “permuton”. These have become a hot topic over the last several years, but I haven’t seen anyone look at the “bubble sort permuton”.
@LinesThatConnect
@LinesThatConnect 14 күн бұрын
Thank you!!! I've been working on this for so long without having any idea what the proper words are, so I've been stumbling through the dark. This gives me a direction to explore in!
@Elesario
@Elesario 14 күн бұрын
I think the intuitive element of why this shape forms will come from the fact in bubble sort all the larger values will tend to drift to the right more rapidly than the smaller values move left. As you say smaller values will only ever move left once per iteration, but any larger values prior to the largest unsorted value will make multiple moves until the next largest value is found. From this, because the shape we are perceiving comes from the larger values in any local area, then you'll always get a shape that rapidly climbs to start, and increases more gradually towards it's end.
@Spiderfffun
@Spiderfffun 12 күн бұрын
You went this far.. for a sorting algorithim? Absolutely insane. It was satisfying as hell watching the curve plotted against sorting.
@BaldurNorddahl
@BaldurNorddahl 8 күн бұрын
he went this far for a sorting algorithm that nobody uses... but that fits exactly what I imagine mathematicians doing with their day.
@ethelegend
@ethelegend 14 күн бұрын
<a href="#" class="seekto" data-time="1008">16:48</a> for anyone wanting to graph this in desmos, to turn it into a recreation of the optimised bubble sort: - add the equations "y = {0
@londonl.5892
@londonl.5892 12 күн бұрын
If you have a link to a public Demos graph of this that would be great!
@haipingcao2212
@haipingcao2212 8 күн бұрын
t_{n}
@DeJay7
@DeJay7 7 күн бұрын
First line: y=\left\{0\le x\le1-t:\frac{x}{x+t} ight\} Second line: y=\left\{1-t
@FutureAIDev2015
@FutureAIDev2015 15 күн бұрын
That final animation of the curve that you found matching the data so smoothly was...jaw-dropping. 😲
@TearonQ
@TearonQ 15 күн бұрын
YOOO lines that connect is back !!
@AEastrolabe
@AEastrolabe 15 күн бұрын
I have been asking myself this very question every now and then for years, but never took the time to look at it closely. I am so glad you made this video and that I found it. Loved it
@Gordy-io8sb
@Gordy-io8sb 15 күн бұрын
The "curve" is just an artifact of how sorting algorithms work. There's nothing special about it.
@isavenewspapers8890
@isavenewspapers8890 15 күн бұрын
⁠​⁠@@Gordy-io8sb"The 'curve' is just an artifact of how sorting algorithms work." Evidently. Well, for this particular sorting algorithm, at least. Otherwise we wouldn't be talking about it. "There's nothing special about it." That's your opinion.
@pyrobola8715
@pyrobola8715 15 күн бұрын
​@@Gordy-io8sbEuler's constant is just an artifact of how exponential growth works. There's nothing special about it.
@thesecondderivative8967
@thesecondderivative8967 14 күн бұрын
​@@Gordy-io8sb I don't understand people who watch maths videos when they want to claim that everything they find is meaningless. It's interesting. That's enough of a reason.
@Gordy-io8sb
@Gordy-io8sb 14 күн бұрын
@@thesecondderivative8967 Are you implying I'm one of those people? Let me tell you, those people are pseudo-intellectuals. I am above them.
@StellarFireflyGaming-rm2xu
@StellarFireflyGaming-rm2xu 14 күн бұрын
I absolutely love mathematics that are complex enough to be interesting yet simple enough to not require a degree to understand if explained in an engaging and informative way. And your excellent use of graphics and animation to demonstrate concepts that would otherwise be difficult to express verbally, that is just /chefskiss.
@pietersfilms5171
@pietersfilms5171 14 күн бұрын
I love the math videos where its not for academic purposes and is just someone talking about and researching something they love. Just started the video but I know im gonna love it, good job
@DavidSartor0
@DavidSartor0 9 күн бұрын
I saw your presentation about this at a conference, maybe a month ago. I think maybe you said I was the first person you'd met that had seen your videos. This explanation is much clearer. Thank you.
@LinesThatConnect
@LinesThatConnect 6 күн бұрын
Hey David, it was nice to meet you at the conference! I'm glad this approach worked for you
@BadlyOrganisedGenius
@BadlyOrganisedGenius 15 күн бұрын
Gorgeous. I always wondered what that curve was approximating, but imagined a proper derivation would be far more complicated than this. You're a smart guy, LTC. Keep it up
@TheRecklessGamer3169
@TheRecklessGamer3169 15 күн бұрын
You should do a whole video on the Euler-Mascheroni constant, would be really interesting in your style
@chaotickreg7024
@chaotickreg7024 15 күн бұрын
Who would eat oiler maccaroni?
@PluetoeInc.
@PluetoeInc. 9 күн бұрын
@@chaotickreg7024 oiled up mammamia
@quintinclaassen8861
@quintinclaassen8861 4 күн бұрын
My favourite part about this video is not the bubble sort curve solution, but how harmoniously it illustrates that the *real* intellectual leap is figuring out how to formulate a problem into something one can hold on to and tackle in bits.
@NobleBrains
@NobleBrains 14 күн бұрын
Your videos are some of few where you can watch them an unlimited amount of time and still learn something new every time. Keep up the great work.
@sotocsick3195
@sotocsick3195 15 күн бұрын
Thank's man. You really made my night. I commit, I couldn't follow everything you said, but seeing the function draw it's graph was absolutely worth my time. Happy that you're back.
@mitchellclark4377
@mitchellclark4377 12 күн бұрын
All these years I've noticed that curve and wondered if there was a way of fitting it, but I lacked the mathematical fluency to step through the process you did. Nice.
@gONSOTE
@gONSOTE 14 күн бұрын
this is just absolutely crazy. Every time you upload a video you keep surprising me with your everlasting increase in quality. The animations were incredibly smooth, at every single frame i had all the information i needed, no more, no less, and distributed THE best way possible. An incredible aesthetic, beautiful colors and design supporting an explanation that was precise and great. Please keep uploading videos of such quality, you are one the best math youtubers that have ever existed, no doubts at all.
@SaidVSMath
@SaidVSMath 15 күн бұрын
Just amazing. Love the “nice” moment. Please keep posting!!! Love your stuff!!!
@coouragee
@coouragee 15 күн бұрын
great video, and really smooth graphics! always interesting to see maths applied to subjects where it isn't necessary
@youtubeviewerxx
@youtubeviewerxx 14 күн бұрын
THANK YOU! I have been thinking about this since one of the first times I watched a sorting algorithms video and, as you said, there isn't much information on the internet about this specific problem. This was so cool to watch, you're also a great storyteller.
@ahumanperson3649
@ahumanperson3649 15 күн бұрын
Been a while! Glad to see you’re back.
@maxwellgrossman
@maxwellgrossman 15 күн бұрын
I love your videos, so glad to see you're back!
@Myriadys
@Myriadys 15 күн бұрын
Return of the King
@lyrimetacurl0
@lyrimetacurl0 6 күн бұрын
Trotk
@pedroth3
@pedroth3 15 күн бұрын
Amazing! Always like to find the limits of discrete processes. Thank you
@mathITA
@mathITA 12 күн бұрын
This was gorgeous! Initially, I didn't know how you would have tackled the problem. As soon you brought out the similarity condition I had an enlightenment. Beautiful problem, beautiful solution, splendid explanation!
@Alex-jk2qy
@Alex-jk2qy 14 күн бұрын
Finally, I thought for a second that no more videos would accur and yet, boom, here you are! Great to see you back!
@masterleon40
@masterleon40 15 күн бұрын
I missed your videos, glad to see you again my guy
@cheshire1
@cheshire1 12 күн бұрын
I took the challenge to find the curve myself, and my central idea was this: For the bar height Y to end up at position X after T iterations, there need to have been exactly T bars before position X that were higher than Y. For ease of notation, let's instead talk about the normalized values x = X/N, y = Y/N and t = T/N, where N is the size of the array. The factors N would cancel out in the end anyway. The likelihood of there being exactly k bars higher than y before position x is given by a binomial distribution: P(k) = (1-y)^k * y^(x-k) * (x choose k). For larger N, this distribution contracts around its expected value until in the limit N -> infinity, all the probability mass is _at_ the expected value and we are certain that the condition is fulfilled at step t = (1-y) * x. This doesn't quite define the right curve yet, because the original condition neglected that the bars are moved one spot to the left when an iteration passes them. After t iterations, values are shifted a distance t to the left. We represent this by replacing x with (x+t) in the formula: t = (1-y) * (x+t) t = x + t - y * (x+t) y * (x+t) = x y = x / (x+t) There we go. If we want to include the already sorted bit, we can write y = max( x / (x+t), x ).
@LinesThatConnect
@LinesThatConnect 12 күн бұрын
Bravo, I'm jealous of how quickly you came up with that! That's the gist of my rigorous approach, but it took me a crazy long time to think of it.
@NikUnknownGames
@NikUnknownGames 14 күн бұрын
I just wanted to say that this is amazing. You provided not only an excellent video for KZbin, but an entire paper with a mathematical proof for anyone interested in the topic. This is what educational KZbin videos should be. Great work and please keep going, this is how popularizing math and computer science should look like! Also, the whole premise of this topic is so simple, yet so non-trivial to think about. I'm almost angry that I didn't think about this problem myself :)
@bscutajar
@bscutajar 8 күн бұрын
this is such an interesting application of functional equations, I love how we start with the conditions the functions must satisfy and somehow narrowing it down to one possible solution
@davidstigant457
@davidstigant457 14 күн бұрын
I’ve been wondering about this exact question for years. Thank you so much!
@Deckilll
@Deckilll 14 күн бұрын
This is so amazing question, approach, and answer. Thank you so much
@Oscar-vs5yw
@Oscar-vs5yw 15 күн бұрын
This was genuinely beautiful
@oriyadid
@oriyadid 15 күн бұрын
Never thought about this before, but the moment I saw the thumbnail I was intrigued!
@vladyslavverteletskyi2677
@vladyslavverteletskyi2677 14 күн бұрын
Incredible video! I first imagined that some stochastic techniques would be needed, but your parametric approach was simple, comprehensive, and beautiful at once. To generalize the result to non-uniform elements in the array, you can just say that you work with their quantiles.
@Normal_user61
@Normal_user61 9 күн бұрын
One little addition to the graph: you picked the scale 1x1 so everything outside 0
@joltedjon
@joltedjon 14 күн бұрын
After all the work to see the curve fit so well... perfection
@adsoyad2607
@adsoyad2607 15 күн бұрын
Really interesting concept to explore, the a-ha moment at <a href="#" class="seekto" data-time="863">14:23</a> really did it for me. Awesome stuff!
@MelodiCat753
@MelodiCat753 8 күн бұрын
Subscribed. When the music kicks in at <a href="#" class="seekto" data-time="1014">16:54</a>, I got emotional. You do a good job of hinting that this function is recursively defined in nature, which leads to an explicit formula, similar to how some sequences can be solved.
@ktursts4088
@ktursts4088 14 күн бұрын
this s the most satisfying thing i watched in recent days..... we need more videos from you.... amazing stuff.... i have become big fan of your work....
@Dojan5
@Dojan5 8 күн бұрын
Whoa. I’m not a maths person but what little I got was beautiful. I feel like I understand why people enjoy maths a bit better.
@boonyakornthanpanit7656
@boonyakornthanpanit7656 13 күн бұрын
This is absolutely beautiful. For many math videos out there, I could guess where it’s heading just from the thumbnail/title. This one stunned me. I guessed that this might need some differential equations or some sort of series and end up with something like natural log. Turns out just a few weeks of Calculus 1 would do. Gorgeous! Edit: I usually don’t give a like to videos, but you deserved it.
@pattoner8398
@pattoner8398 4 күн бұрын
Wonderful! Informative! Well presented, written, and recorded! Please continue doing this, keep up the excellent work
@archerelms
@archerelms 9 күн бұрын
This is the kind of content I love most, even if I don't end up watching them most. Excellent job!
@BikeArea
@BikeArea 14 күн бұрын
To say this content is as wonderfully illustrated and animated as the content of this one blue, three brown guy (or whatever his nickname is) wouldn't be an exaggeration. The presentation is nothing short of excellently executed and gives a masterclass in teaching. What a joy to join in and getting educated! Thanks a lot for all the enormous effort and time you put into this marvellous piece of edutainment! 😊
@DavidLindes
@DavidLindes 8 күн бұрын
Very nice exploration and explanation! Will now immediately check out your prior vids, and, very likely, subscribe. Good stuff!
@KarenKubliski
@KarenKubliski 15 күн бұрын
This video is beautiful. Thank you.
@ausaramun
@ausaramun 15 күн бұрын
Man I have been eagerly waiting on you. Glad to see you back :D
@ruferd
@ruferd 13 күн бұрын
I used to suggest 3b1b for math videos to all my math students, but now I suggest LTC, it's just pure magic to be honest.
@AlphaFX-kv4ud
@AlphaFX-kv4ud Күн бұрын
Why not both?
@DynestiGTI
@DynestiGTI 14 күн бұрын
One of the most beautiful videos I’ve watched in a while, this is why I love maths.
@XxLeonardoPiresxX
@XxLeonardoPiresxX 12 күн бұрын
One of the best videos about math an programing i have ever seem!
@avunz125
@avunz125 12 күн бұрын
Amazing display of creativity. Congrats and thank you!
@DrTorkal
@DrTorkal 15 күн бұрын
What a great question to ask! I could've watched a dozen more examples of the curve perfectly matching a real sorting like <a href="#" class="seekto" data-time="1014">16:54</a>
@Waffle_6
@Waffle_6 14 күн бұрын
what an amazing derivation, so simple yet so satisfying
@mafuchin
@mafuchin 9 күн бұрын
Nice video. The derivation of the closed form was well established and you answered all key question I'd worry about.
@koktszfung
@koktszfung 12 күн бұрын
I thought you would need to use the fact that a bar stops at the left of the first encounter of a bar that is the taller than itself This is very elegant!
@monsterhunter8595
@monsterhunter8595 7 күн бұрын
You're one of the clearest math youtubers out here!
@Pterry23real
@Pterry23real 14 күн бұрын
Thank you! The first time I've watched some animated sorting algo comparision I asked myself the same question.
@owendeheer5893
@owendeheer5893 14 күн бұрын
This was so satisfying. Amazing!
@ntwede
@ntwede 9 күн бұрын
Have you ever seen those memes that say "pick two: Fast, Cheap, Good" Well, I feel like you identified the equivalent for math proofs. "Pick two: Correct, Intuitive, Rigorous" Well, the choice is really which one to exclude. Excluding 'Correct' is not acceptable in math, or really ever, but the video you have provided combined with the long paper proof you worked out have provided all three to those who want it. It is inspiring how well you have found a clever way to explain this without the headache, and how well you have documented it in its most rigorous form in your blog. Thank you. I hope I can one day do work as good as this.
@TonyboyDK
@TonyboyDK 12 күн бұрын
I literally just checked your channel last week for any new videos and thought "what a shame, looks like there's no more coming", and then you drop a new vid, let's go!
@peperomero4603
@peperomero4603 14 күн бұрын
absolutamente increíble!!! muchísima calidad, gracias!!
@cameodamaneo
@cameodamaneo 14 күн бұрын
Wow! This video is less than a day old and has less than 50k views? It seems like the kind of video I'd watch from some giant maths channel that came out several years ago and has amassed millions of views. This has instantly earned my sub
@pedrokrause7553
@pedrokrause7553 14 күн бұрын
This is absolutely beautiful
@stevenrn6640
@stevenrn6640 14 күн бұрын
Simply beautiful in presentation.
@samueldeandrade8535
@samueldeandrade8535 14 күн бұрын
Just absurdly amazing!!!
@flam1ngicecream
@flam1ngicecream 12 күн бұрын
Bro this is so cool. I am so proud of you
@richtigmann1
@richtigmann1 10 күн бұрын
This was honestly beautiful, an incredible example of the mathematical analysis that happens in computer science
@logflames
@logflames 15 күн бұрын
Beautiful! Very nice question, well explained throughout
@insouciantFox
@insouciantFox 15 күн бұрын
Beautiful. Just beautiful
@newton-342
@newton-342 10 күн бұрын
Such a beautiful result for such a messy problem!
@BoogsNStuff
@BoogsNStuff 14 күн бұрын
wonderful video, love how followable the assumptions and process were
@movax20h
@movax20h 15 күн бұрын
Nice. When I was watching these visualizations long time ago, I also noticed that it is creating some hyperbola or something, but never digged dipper. Interesting way of using scaling law to figure out the formula. It is still a bit mysterious why it actually works, but I guess, random something something makes it so. Will read your blog too, because it still bugs me up. Really good video.
@theblockybanana5537
@theblockybanana5537 14 күн бұрын
I've always noticed this, nice to see a video on it!
@ender_gaming5359
@ender_gaming5359 15 күн бұрын
One of the GOATS is back
@smithrockford-dv1nb
@smithrockford-dv1nb 14 күн бұрын
Wow, this videos has such high production quality!
@thegermanempire9015
@thegermanempire9015 15 күн бұрын
Awesome video man! You'll never let me down!
@TheHuesSciTech
@TheHuesSciTech 12 күн бұрын
I think it's super interesting that, if I understand correctly, you never encoded a directive into your proof that the curve should follow the *peaks*, or like, a convex hull or something, of the bubble sort. You were just like, "let there be a continuous curve that behaves nicely and connects up to the diagonal bit"... and the maths decided to give you back a curve that very specifically follows the peaks/convex hull of the bubble sort... am I missing something, or is that kinda weird?
@woomygfx
@woomygfx 2 күн бұрын
Beautiful derivation! Keep up the great work :)
@hellNo116
@hellNo116 15 күн бұрын
that was a perfect way to end the day on thank you.
@rivran
@rivran 10 күн бұрын
This style is fantastic. I’m a community college dropout and I understood this entire video while stoned out of my body. Absolutely impressive work!!
@thatguyoversea
@thatguyoversea 8 күн бұрын
Absolutely HEAVENLY. What an immaculate video.
@NekosForever
@NekosForever 15 күн бұрын
Holy hell you’re back!
@Scudmaster11
@Scudmaster11 14 күн бұрын
I would love to see an extention to this video... I absolutely loved bubble sort and wanted to know more about that curve (others did also).... this video of yours provides that information really well (and probably the 1st of any).. thank you
@asedtf
@asedtf 6 күн бұрын
The line fitting was essentially the climax of this video after all the edging, while the algebraic dance was the final most intense act
@mandizo_
@mandizo_ 13 күн бұрын
Exactly!! I've been wondering about this for the longest time as well. Count me impressed! :)
@subinaypanda9936
@subinaypanda9936 14 күн бұрын
Fantastic. I loved it so much.
@baptiste5216
@baptiste5216 15 күн бұрын
simply amazing
@ichigo_nyanko
@ichigo_nyanko 12 күн бұрын
I figured it out intuitively at about 7 minutes into the video; I realised by sorting from right to left, it is equivelant to simply removing the bars from tallest to shortest while also shifting the shorter ones leftward. That would make a triangle - HOWEVER because you put those tallest bars at the end and 'scrunch up' the gaps they leave, it sort of squishes the triangle leftwards, creating the curve. This is because the larger bars are pushed rightwards every iteration it skews the triangle into the curve.
How to Take the Factorial of Any Number
26:31
Lines That Connect
Рет қаралды 1,1 МЛН
What Gear Shape Meshes With a Square?
31:17
Morphocular
Рет қаралды 172 М.
Barriga de grávida aconchegante? 🤔💡
00:10
Polar em português
Рет қаралды 13 МЛН
КАК ГЛОТАЮТ ШПАГУ?😳
00:33
Masomka
Рет қаралды 2,2 МЛН
Explaining EVERY Sorting Algorithm (part 1)
35:35
Kuvina Saydaki
Рет қаралды 147 М.
Can a Bunch of Circles Play Für Elise?
10:27
Marc Evanstein / music․py
Рет қаралды 161 М.
Math Graphs but they get increasingly CRAZIER
3:19
Two Squared
Рет қаралды 12 М.
I Made a Graph of Wikipedia... This Is What I Found
19:44
adumb
Рет қаралды 2 МЛН
15 Sorting Algorithms in 6 Minutes
5:50
Timo Bingmann
Рет қаралды 24 МЛН
It Took 2137 Years to Solve This
47:06
Another Roof
Рет қаралды 109 М.
Better Mountain Generators That Aren't Perlin Noise or Erosion
18:09
Josh's Channel
Рет қаралды 226 М.
You can mix 10 marbles until they sort themselves. Why not 100?
28:15
The Minecraft boat-drop mystery
16:41
Stand-up Maths
Рет қаралды 815 М.