No video

Batcher's Odd-Even Mergesort

  Рет қаралды 119,515

Timo Bingmann

Timo Bingmann

Күн бұрын

Visualization and "audibilization" of "Batcher's Odd-Even Mergesort Network" algorithm.
Sorts a random shuffle of the integers [1,128] and [1,1260] using the mergesort network, which is an parallel sorting network, where each left-right sweep could be done fully in parallel - en.wikipedia.or...
More information on the "Sound of Sorting" at panthema.net/20...

Пікірлер: 84
@daniellelarrabee285
@daniellelarrabee285 7 жыл бұрын
I have discovered the sort fandom
@honchokomodo
@honchokomodo 7 жыл бұрын
+Danielle larrabee hey it's better than the furry fandom or the undertale fandom
@daniellelarrabee285
@daniellelarrabee285 7 жыл бұрын
Honcho Komodo true
@rikuurufu5534
@rikuurufu5534 6 жыл бұрын
This is my Sortsona LOL
@dolphine373
@dolphine373 6 жыл бұрын
Honcho Komodo hey! I like undertale!
@ENCHANTMEN_
@ENCHANTMEN_ 6 жыл бұрын
things are heating up in the sorting algorithms fandom
@anabanana3458
@anabanana3458 Жыл бұрын
I like how up until 1:09 you hear something similar to music, then 2 seconds of silence, then the horrid screams of tortured souls
@normalkettle
@normalkettle 6 жыл бұрын
WHOP WHOP WHOP WHOP WHOP WHOP WHOP
@DaVince21
@DaVince21 5 жыл бұрын
Man, I'd love for someone to try to create a MusicSort that will prioritize the sorting process to sound musical. Perhaps by sorting values according to a pentatonic scale or something.
@AnnoyedArt1256
@AnnoyedArt1256 3 жыл бұрын
slow sort is kinda that
@hymnodyhands
@hymnodyhands Жыл бұрын
I thought of the pentatonic scale too ... the problem is the limited number of notes available to the human ear in that scale ... even with multiple instruments, that would pose a problem in big sorts...
@MishaG4mer
@MishaG4mer 4 жыл бұрын
0:19 It sounds like bogo sort
@totallynotlilly
@totallynotlilly 4 жыл бұрын
i have no clue what's happening but i love it
@54e
@54e 9 ай бұрын
The first sorting handles 128 elements that correspond to the width. There are log128=7 stages and 28 passes in total (which means the red lines transition from left to right 28 times). 0:00~ stage 1 (log2 = 1 pass) 0:03~ stage 2 (log4 = 2 passes) 0:07~ stage 3 (log8 = 3 passes) 0:14~ stage 4 (log16 = 4 passes) 0:23~ stage 5 (log32 = 5 passes) 0:35~ stage 6 (log64 = 6 passes) 0:50~ stage 7 (log128 = 7 passes)
@raffimolero64
@raffimolero64 6 жыл бұрын
i think it merges blocks, and then merges smaller blocks, and goes until it's 100% merged, then merges again
@aycc-nbh7289
@aycc-nbh7289 4 жыл бұрын
Redstoneboi I think that’s wikisort.
@smaybius
@smaybius 2 жыл бұрын
It's a sorting network, meaning it follows the same sequence of comparisons per input length
@PRINTORO
@PRINTORO 3 жыл бұрын
Kids in kindergarten after one of the students do something bad 2:52
@johngeverett
@johngeverett 2 жыл бұрын
That's gotta be the WONKIEST sort algorithm ever!
@maxonmendel5757
@maxonmendel5757 5 жыл бұрын
This sort seems rather... thorough
@thesammo4499
@thesammo4499 6 жыл бұрын
WOWEE!! It's like a less efficient merge sort!
@andrewliu2539
@andrewliu2539 6 жыл бұрын
Sammy Vermillion Actually, every red bar is a thread, so if we were to run this sort on a GPU for instance, we could have a full "page" of red bars moving across the screen and sorting.
@jonnynik7626
@jonnynik7626 7 жыл бұрын
how would this be superior to the classical merge sort??
@debtmaster
@debtmaster 7 жыл бұрын
It is very simply implemented in hardware (as much as anything can be), and can be multithreaded. It's convenient for computers.
@RipleySawzen
@RipleySawzen 5 жыл бұрын
@@debtmaster I wish they'd do a multi-thread sorting video
@jacobschmidt
@jacobschmidt 4 жыл бұрын
@@debtmaster is time complexity still nlogn?
@aycc-nbh7289
@aycc-nbh7289 4 жыл бұрын
Jacob Schmidt It is (n log n)^2, although it is apparently faster than conventional MergeSort unless n is larger than the memory capacities of all computers in the universe... in 1998, i.e. it’s only a matter of time until it obsolesces.
@myrjavi
@myrjavi 2 жыл бұрын
@@aycc-nbh7289 n (log n)^2, (n log n)^2 would be n^2 does it really matter if the comment is 2 years old ._.
@akimbo75ty65
@akimbo75ty65 3 жыл бұрын
my mum processing that online games cant be paused
@Howtard
@Howtard 5 жыл бұрын
Neat, I only worked out that the number of peaks halves each time it "merges" a set near the end
@s.sinster
@s.sinster 3 жыл бұрын
1:12 *dad is in the store getting and it storms*
@joblessalex
@joblessalex 7 жыл бұрын
Instead of comparing, why don't they just assign each one a number and order the numbers?
@joblessalex
@joblessalex 7 жыл бұрын
***** So find x, move x to pos 1 x++
@MolotowCocktail24
@MolotowCocktail24 7 жыл бұрын
joblessalex you need to sort the numbers after all.
@TheJamesM
@TheJamesM 7 жыл бұрын
+joblessalex This kind of solution only really works in the trivial case of sorting a continuous list of positive integers. Also, it's not very space efficient - you need a separate array for the sorted output, otherwise you will overwrite unsorted data every time you move something forward. You might want to look into radix sort, however. It's not quite as simple as your proposal, but it is still fairly intuitively straightforward, and it also requires zero comparison. It basically treats the values as text strings and sorts it alphabetically (there are two variants - one that starts with the most significant digit, and one that starts with the least). These require that the data keys be some sort of positional notation. I particularly like the animations for the least significant digit version.
@WilliametcCook
@WilliametcCook 7 жыл бұрын
Look at Cycle Sort and the Radix sorts.
@stevend285
@stevend285 6 жыл бұрын
Look up "counting sort"
@nicholasdurant2851
@nicholasdurant2851 9 жыл бұрын
no gud work hardr
@anders8206
@anders8206 3 жыл бұрын
"He's the next the Mozarten, just saying... " Wolfgang Amadeus "I like cabbages" Mozart ps this is a reaaaal good quote, je?
@PoltergeistHC4L
@PoltergeistHC4L Жыл бұрын
Amayzing, it takes somthing it has passed and moves it infront.
@teeth.2162
@teeth.2162 3 жыл бұрын
It’s like a merge sort but with 8 more steps.
@EriqireM
@EriqireM 8 жыл бұрын
this is what, xln(x)^2 computations with 0 additional data usage, neens neat.
@SlashCrash_Studios
@SlashCrash_Studios 5 жыл бұрын
Shell-merge sort
@daniyarkussainov9341
@daniyarkussainov9341 9 жыл бұрын
very nice results
@optivion
@optivion 7 жыл бұрын
Just in time for Halloween!!!
@PaneledPear
@PaneledPear 5 жыл бұрын
Just in time for Halloween!!!
@mr_mjrmgames3176
@mr_mjrmgames3176 3 жыл бұрын
I code in java, could you tell me how to do like this? Thank you
@daniellewilson8527
@daniellewilson8527 4 жыл бұрын
What program do you use to make these?
@AwangardaGames
@AwangardaGames 2 жыл бұрын
Sound Of Sorting
@Lykrast
@Lykrast 6 жыл бұрын
Looks like I can't find this one in Sound of Sorting 0.6.5, that's weird.
@groszak1
@groszak1 5 жыл бұрын
it was made after Sound Of Sorting 0.6.5 was released
@inwencja2009
@inwencja2009 6 жыл бұрын
Random computation time? Disappointing.
@raffimolero64
@raffimolero64 5 жыл бұрын
no, it's a parallel sorting algorithm. it could be implemented with comparators in O(log_2(n)) time when paralleized.
@vrintex
@vrintex 7 жыл бұрын
Interesting, but not quicksort
@SpamDestroyer
@SpamDestroyer 5 жыл бұрын
Yeah but it supports gpu multithreading.
@myrjavi
@myrjavi 5 жыл бұрын
Merge/Shell sort
@FishKungfu
@FishKungfu 10 жыл бұрын
Cool!
@dannygaming9643
@dannygaming9643 2 жыл бұрын
PACMAN feeling 😅
@LVETOT
@LVETOT 3 жыл бұрын
Wiki sort?
@thanhparamotor
@thanhparamotor 6 жыл бұрын
help! i can't install this program in ubuntu, i use chmod +x ... and i run it with ./
@manuperez9409
@manuperez9409 2 жыл бұрын
1:49 🥶
@raffimolero64
@raffimolero64 5 жыл бұрын
found my favorite sort
@minecraftermad
@minecraftermad 8 жыл бұрын
terve?
@jurekszczurek2896
@jurekszczurek2896 8 жыл бұрын
tuloa
@minecraftermad
@minecraftermad 7 жыл бұрын
:D
@user-js3il6xf9b
@user-js3il6xf9b 4 жыл бұрын
I was the 420th like
@balls413
@balls413 4 ай бұрын
Can't wait for part 30
@EriqireM
@EriqireM 8 жыл бұрын
this is what, xln(x)^2 computations with 0 additional data usage, neens neat.
@petter9078
@petter9078 7 жыл бұрын
Isnt that pretty slow?
@dorukayhanwastaken
@dorukayhanwastaken 7 жыл бұрын
SPACE it's actually between insertion sort and quicksort in terms of speed
15 Sorting Algorithms in 6 Minutes
5:50
Timo Bingmann
Рет қаралды 24 МЛН
Tim Sort
2:08
Timo Bingmann
Рет қаралды 220 М.
UNO!
00:18
БРУНО
Рет қаралды 4,8 МЛН
Box jumping challenge, who stepped on the trap? #FunnyFamily #PartyGames
00:31
Family Games Media
Рет қаралды 32 МЛН
طردت النملة من المنزل😡 ماذا فعل؟🥲
00:25
Cool Tool SHORTS Arabic
Рет қаралды 9 МЛН
Odd-Even Sort
8:26
Musicombo
Рет қаралды 15 М.
8 Sorting Algorithms in Minecraft
3:38
Cymaera
Рет қаралды 948 М.
10 FORBIDDEN Sorting Algorithms
9:41
Ardens
Рет қаралды 841 М.
Odd-Even Transposition Sort
9:34
0612 TV w/ NERDfirst
Рет қаралды 22 М.
*SEIZURE WARNING* 50+ Sorts, Visualized - Bar Graph
31:06
Musicombo
Рет қаралды 1 МЛН
I Made Sorting Algorithms Race Each Other
8:24
Green Code
Рет қаралды 105 М.
Obscure Sorting Algorithms
4:06
Sorting Stuff
Рет қаралды 694 М.
50+ Sorts, Visualized - Color Circle
30:31
Musicombo
Рет қаралды 1,1 МЛН
Slow Sort
3:05
Timo Bingmann
Рет қаралды 317 М.
UNO!
00:18
БРУНО
Рет қаралды 4,8 МЛН