Bogo Sort
ฝัง
- เผยแพร่เมื่อ 18 พ.ค. 2013
- Visualization and "audibilization" of Bogo Sort algorithm.
Attempts to sorts a random shuffle of the integers [1,100] using bogo sort: the short sounds are unsuccessful tests whether the array is sorted, after which the whole array is permuted in-place and tested again.
More information on the "Sound of Sorting" at panthema.net/2013/sound-of-sor... - วิทยาศาสตร์และเทคโนโลยี
Windows trying to search for a file
while currentFile != targetFile
currentFile = randomFile
Hey, that would actually work! Eventually.
XD
XP?
you killled mexD
Bogo sort is the fastest sort if you're very lucky
Joee Green
How much luck can someone have ?
I had Bozo sort once instantly solve the max size map within a few seconds and was floored
@@omegahaxors3306 The fact that you can't even spell Bogo correctly makes me question you
@@Tiogar60 Bozo sort is a modified version of Bogo sort that runs off the same principle: shuffle the list at pure random until it happens to land where you want it
@@Tiogar60 lmao destroyed
There's a universe where bogosort is right every single time and we dont know why.
And another one where it’s always right for everyone using it except one person.
@@balancemaster55 and theres one where instead of bogo sort there is a bear warlord trying to kill us all.
Because the green bar is the way things should be.....like your dreams
*quantum bogosort flashbacks*
That could be ours, what if a fundamental law of physics such as gravitation is just as random as bogosort but through unfathomable luck it acts deterministically. Then imagine one day it just stops.
Bogo Sort: "I have no idea what i am doing"
PicochillaTH 300th like.
I have no idea how to breathe.
lets just move everything everywhere until this is ok
400th like
PicochillaTH made me laugh
but somehow finds a way to solve it
I like your pfp I’ve seen it before
There is something adorable and depressing about this, it keeps working away bleeping and blooping but never gets any closer to success. :( poor Bogo Sort.
+ShamelessHorse Whether or not it is getting closer to success is debatable. It is probabilistically certain that it will eventually sort the data given enough time. Therefore, as long as it is running, the time until it succeeds is decreasing, i.e. it is getting closer to success.
+Tracy Coxon Well it's surely closer to the point of time where it will succeed but it hasn't really made any progress. So i guess both are kinda right
+Tracy Coxon nope, that's a random-gamer paradox - if something is supposed to happen after X time, having information that it didn't happen at Y time doesn't change anything; probability is still the same
it's like tossing a coin after X heads/tails in a row - next toss is still 50%/50%
Xeverous
Except we are talking about countably infinite attempts over a countably infinite amount of time, in which case it is guaranteed that there is some future point at which the list is sorted. It is true that we don't know how much time is left until that point, but we do know that the time is always decreasing. Notice that even though the time until guaranteed success is decreasing, it still remains infinite. (infinity - 1 = infinity) Therefore, the time until guaranteed success is always greater than the expected time, and so can not ever change the probability of success. Nevertheless, the time is still decreasing.
I personally relate to this algorithm, how it works so hard but takes so long to succeed.
Friend: What's it doing?
Me: Its best.
Lmaooooo
oof
Isn't Bogo sort the algorithm that just takes the integers and randomizes them until it gets it right?
Yes. That's exactly what bogo sort is doing
*Mc mental music starts*
The only reason to EVER use a bogo sort
Is if you want to make an 8bit or 16bit videogame but can't think of any music for it.
Still better than CRAZYBUS, at any rate.
Undetale
@@hiimemily Wow I have seen your comments a lot recently
@Hand Grabbing Fruits it’s a bot
@Hand Grabbing Fruits he said that exact same thing on 5 other comments
You could have just made the last frame perfectly sorted and we would have believed you.
It would have been so much more satisfying than this video is!
Everyone watching will devolve into a monkey out of sheer excitement from seeing Bogo Sort finally pull it off.
I was thinking it was storing values and sorting them in ram then it would just instantly be in order but no
That would have been a dream come true
There would just be no way to tell the opposite if the delay lines up
Just set delay to 0 ms and it will finish instantly
or you know, use quantum bogus sort
+Дмитрий Старцев
No, it just keeps running forever. Bogo sort is the worst!
+Braden Best it is not reasonable to say that bogo sort will never finish
Cole Nelson
I didn't say it will never finish. I said it will run forever.
set font size to zero to infinitely compress data
This should be a livestream that starts with only 2 units then adds another unit every time the previous amount is completed
i would watch until the guy's pc crashed
no i wouldnt i have crap to do
that's bogobogosort
Can you make one?
@@Y0y0Jester Are you talking to me?
(if so, the answer is no, at least, not anytime soon)
(sorry)
@@Y0y0Jester As if it's that easy, unless you have all the power and money needed to run your computer 24/7 while paying for the electric bill and the cooling, or enough to get a VPS at $5/month at Linode or something.
First random 8 bit music generator.
I'm still sending requests for it to play the tetris theme.
Someone make a sorting algorithm that plays the tetris theme
crazy bus...
oh sorry it was 16bit
1:22 Dr. Mario theme
Its actually good
* Bogosort starts to actually sort *
"What is it doing?"
"Its beginning to believe."
That’s the funny thing, it never _starts_ to actually sort. It just keeps throwing shit at the wall until it accidentally sorts it.
it's bogonning to bogove
Knowing Bogo Sort might one day Sort this list... It fills you with determination.
#undertaleFTW
Noi it actually won't, the run time for this will be 100! which 9.8x 10 ^157 sorts.Even if this PC was a magic PC that could do 1 permutation per plank second it would take still take several trillion times the lifespan of the universe to sort this to sort this
Of course that's good point of view, but we should remember that 100! is only number of possible outcomes in every step of algorithm not number of steps it needs to do to sort that list. Theoretically it might never sort list with only 3 elements and at the same time it might sort 1000 elements in first try.
It is highly dubious, but still I believe in Bogo Sort-san. He can sort anything if your heart is pure enough.
Assuming it can do one shuffle each Planck Time it would take approximately 1.2 * 10^97 life times of the universe or 1.595 * 10^107 years. See: www.wolframalpha.com/input/?i=t_P*100%21
I'm stealing that line and claiming it as my own.
Bogo sort: Um... I-I don't know what I'm doing. I'm just gonna make some music, okay?
Ok
he really doesnt know what hes doing
hes just scrambling and checking over and over again until he gets a correct thingy
Ok.
"Sorting" algorithm.
one day..... one day bogo will get the array sorted first try
someone you don't know We just need to luck manipulate the universe, right?
More like Shuffling algorithm.
"sorting" "algorithm"
Gryffindor!
Never give up Bogo sort. I believe in you!
cruel
For a brief moment at 1:00 the smallest value is in the correct location and that is good enough.
I also noticed that
Maybe ist because i was half expecting it to solve it
It sounds like the lavander town theme song from pokémon
YOOOOOO thats mindblowing
it happened a few times i noticed
It's like rolling a dice with 10^158 sides.
Davy Ker lol. Great comparision
more like a dice with 10^9223372036854775807 sides
(the number is the 64 bit integer limit)
More like rolling that same die and waiting for the die to roll each mumber in sequence and restarting when it got it wrong.
That would be intresting
@@memestreammedia6764 perfect comparison when we're looking at what bogo sort is comparing lol
I like how every instance I've seen of Bogo sort ends with it not doing it's job
udiprod made a video where it actually does!
@@LieseFury after almost 40 minutes
@@zacharymogel9500you really replied a 11 months old reply on a 3 years old comment
@@Kyznikov says the guy replying 10 days after a reply to an 11 month old reply to a 3 year old comment. TH-cam comments just come and go, dude, I’ve seen people reply to decade old comments as if nothing happened
@@harrya9458 fr
when you're daydreaming in class and the teacher asks you a question
Or when your told to do anything
sorting braincells randomly...
This is the most horrifying Space Invaders theme I've ever heard.
This is the best Close Encounters Of The Third Kind theme I've ever heard
bogo sort best sort
Actually quantum bogosort and intelligent design sort are better :)
If you sort 10 numbers with bogo sort there is a 1 in 3,628,800 chance that it will be instantly solved. I like those odds.
R a d i x S o r t
bloop bloop
I implemented.this for our data sets. A day later i got fired :/
they will never understand the greatness of bogo
ur really brave, I admire u
That was just some bad luck.
@@peterpanther8627 A Tom Scott viewer by any chance?
@@wulfherecyning1282 yee
Teacher: Everyone! Stand in a line starting from the smallest person, ending on the tallest!
The class:
No replies? Guess I'm first..
💀
true
@@RodolfoYT2024 that's uh, usually how that works.
@@dnaroseandthewolveszammn a furry 😔
when the teacher says “line up single file by height”
Bogo sort is equivalent to a weapon with 99999 damage, but 0,0001% chance of hitting the enemy. If you are insanely lucky, the weapon will hit the enemy and kill it instantly. The same is with this sorting algorithm. If it gets the right combination from the 1st try, it beats all the sorting algorithms and gets the world record. But it is almost impossible due to the ridiculously low chance of it happening. Nothing but a Shrodinger's algorithm. It's the fastest, but at the same time it's the slowest.
you just described a sniper rifle with my aiming skills on it
Oohhh technically it would be a one percent since you put a comma instead of a period. Hahah
@@TheSizzleDash Europeans use the comma for the decimal point
@@zarawasique1229next you're going to tell me they use the metric system
Wait how much health does Fire Giant have?
My life described with a sorting algorithm
Same. Getting our shit together kinda involves just throwing things around randomly, and praying that it falls into place.
HA HA DO FUCKING FUNNY, but seriously this is becoming clique and unfunny
Still, I enjoyed the music for this fantastic 3 minutes...
*Me too*
Wait it’s 3 minutes.?? It doesn’t feel like it at all
Isn't this the sorting algorithm the universe used in the beginning ?
Amadeus Van Kerckhoven Clever XD
It's still going, we exist in the music of bogo sort, and when the sorting has finished, our world will end, and the universe will begin again.
Horatio Nelson Did you read that in a book somewhere?
JD Christein Nah, though I've read things in similar style, I'm just ripping it off.
Nailed it! ;)
I am not even kidding, I ones tried bogo sort for 13 integers and it sorted it instantly. That might be the most lucky I’ll ever be in my life.
I believe you, but I also worry for you, I think you used up all your luck.
I do not believe you.
@@askinredroads5132 no good life since then
@@acupofkoffi well, it is a 1 in 13! or approximately 1,6*10^(-8)% chance of happening, so... not that small right?
a
[3e43 heat deaths of the universe later]
"Patrick I don't think this is working, let's try something else."
"ONE MORE TIME! ITS GONNA WORK!"
This is my favorite sorting algorithm, it may be taught as a cautionary tale, but I say it's under-appreciated.
im presenting this as a joke to my project next month :D
@@AredioVani did it go well?
@@Linx_s it went well, i planned it as the first part of my project, the professor was so confused by this solution and he just asked " when is this useful". I answered with " Only in a universe where life expectancy is infinite"
@@AredioVani did you get an ok grade? (If you do get grades)
@@AriTheMothQueen Yeah i think i got an A on that course.
me: sort this
bogo: have some music for a few years!
This is the sound of computing sadness.
😥😥
It’s like trying to solve a Rubik’s cube if you don’t know the algorithms
Lol, "sort".
Jivan Scarano *they are trying their best you know*
Vaigod777 *Did you read the reply above he’s trying his best*
@Vaigod777 xD
At least it is able to check if the array is sorted. This algo is designed to have infinity runtime.
it's trying ok
To those who don't know, Bogo sort is the sort where the blocks are just randomised. After they're randomised you check if their sorted. Not sorted? Randomise and check again.
This seems like the worst possible way to sort an integer set
bogo sort is better cuz there is a chance that it will get it first try
Haley Fucking Halcyon - Gaming Channel yeah
nah it's just luck based
*best
@Haley Halcyon - Gaming Channel the worst possible wouldn't do anything with a time complexity of O(∞)
some say its still sorting untis this day...
yeah that's about 5.88 * 10^2872 operations in the worst case
+Derek (Derino) There is no worst case...
@generic goose how long would it take to sort 5 elements?
Bogo is both the fastest and slowest sort, having a preposterously low chance (depending on the amount of data) of sorting all data in a single milisecond or lasting until the heat death of the universe (where the computer is destroyed and the agorithm ultimately halts functionality). Even then it would probably still not be sorted.
This is actually a good shuffle algorithm
when you gonna drop your next song it's been over 200 years
You have efficient sorts like Quicksort. You have gorgeous sorts like Radix LSD sorts. Then you have this beauty
Crush: hi
My brain:
Best comment i've seen!
Me: I'll hit the bull's eye this time!
Also me: throws dart backwards
The sad thing is, during shuffling, it's possible that Bogo sort actually comes across the sorted array, but it doesn't bother to check. And so it continues. And continues. And continues.
1:50
my new ringtone
"Sure, I can play the piano."
Bogo is the truest definition of "he's intelligent, he just doesn't try".
But we love our very special boi ❤
Still faster than bubble sort!
Not really!
Yeah it's not fair to even put bubble sort in the same league as this. It's just too damn fast!
why u hate at bubble sort?
someone you don't know I don't I just respect the brilliant speed of Bogo sort.
This sorting method is sonic faste
10 hours version please. I would settle for a shorter version that actually successfully sorts.
This video is already 9 years old and legend said that the computer is still running to sort this array.
Potentially the most efficient sorting algorithm... potentially :D
Plottwist: It never sorted.
+NoggaXII
"Plottwist"
Shhhhhh. Don't stop believing.
*gasps*
Plottwisttwist: It sorted
Don't bully him
so.. did it sort it eventually?
***** I know. The question wasn't serious though, it was a joke
i ran a bogosort on my mac, any sample size larger than 13 would take longer than 20 minutes to sort. A sample size this big would probably take decades or maybe even centuries to compute.
You might be the one in every N! and be lucky in the first try!
haha, if i was that lucky i would buy a lotto ticket :) macbook air, half decent processor speed but still a decent representation. Although i wrote the code myself so i may have written it badly who knows...
***** actually 20 minutes for 13 elements seems pretty lucky
This is like the computer equivalent of severe OCD.
wtf, it's random, how is that even remotely close to OCD.
***** Why, do you have OCD? I have CDO. It's like OCD, but all the letters are in the fucking right order.
DeeWeext I'm OCD about the Order of the letters in OCD the letter are in the order of what the ****** acronym means
Adam Kearley No this is a computer with ADHD.
+Sam Stromswold No, it's ABCD. Ordered alphabet
Maybe someday with advanced quantum computer Bogo sort will be more usefull?
João Victor Daijó that is an interesting point.
But then again every other sorting algorithm would become even better too
actually not, the other sorting algorithms don't benefit from being run on a quantum computer.
quantum is probability, digital is logic.
current useful sorting algorithms use logic, bogo sort uses probability.
it might be possible to devise a sorting algorithm that's better than bogo sort but still runs on probability,
if there already is, tell me.
@@musik350 bead sort isn't comparison based
This wouldn't actually be half bad imo if the algorithm didn't start from scratch every time
I know this is a two year old comment, but, whatever.
The entire point of the algorithm is that it randomly jumbles everything, and if it happens to be in order, then great, but if not, it keeps randomly sorting until it happens to be in order. If it didn't "start from scratch" (I'm guessing you mean the constant random sorting) then it would be more than "half bad", because there's literally nothing else to it
Me: This looks cool for a computer to sort!
*ONE ETERNITY LATER*
Me (As a skeleton): Wow this is great!
*Jaw falls off*
Me: "When will you have the answer?"
Bogo Sort: "When Jesus comes back online!"
Bogosort is me thinking I could fix flowers by jamming them back in the ground
I don't get it. Why would you want to destroy your hardware so badly?
Distelzombie Centzon Totochtin Obviously to sort some numbers because youre too stupid to do it yourself
I’ll show you hardware.
I asked Siri what a hundred factorial was and she said it was a 158 digit number. Basically bogo is never getting that list sorted.
As someone who calls themselves 'OnlyFails', bogo sort is my spirit animal.
When I want to crash my PC.
???
it won't.
It sounds like it's becoming increasingly panicked as time goes on
To explain Bogo Sort simply....it shuffles the deck, then checks if it's in order. If it's not...it shuffles it again. It's basically "Shuffle 52 Cards and then check if they're in order from the start. If they're not in order, shuffle them check again. Rinse repeat until they're randomly just in order."
Does it do it one at a time or does it shuffle it all at once whenever a mistake is made? Like does it pick a random column and put it in a random spot? Or does it just go all at once.
Legend has it that bogo is still sorting this set to this very day.
Bogo sort essentially keeps demanding a new array until you randomly give it an already-sorted array.
When do we get part 2?!
Communicating in morse code!
Every once in a while I come back to watch this little algorithm try its best. It may not be very.... smart.... but I still appreciate it
The awesomest thing I've seen ever.
The new youtube algorithm looks great
Legends say it is still trying to find the sort to this day.
You *almost* did it, never give up Bogo Sort
Suddenly I want my own temporary secretary.
Those beeps make me uncomfortable af..
I know you like it ;)
“bogo” *don’t think it don’t say it don’t think it don’t say it don’t think it don’t say it don’t think it don’t say it don’t think it don’t say it don’t think it don’t say it don’t think it don’t*
i like how bogosort is just him doing "bip bip bop bop" til they get it right and stop, completely still like it's proud of the work done
this is the biggest bogo sort I can find on youtube so far
I did something like this in simple code in Python
(I'm kind of a new guy to programming, so forgive me if I did any mistakes)
import random
s = list(range(8))
class Bogosort:
def Bgsort():
random.shuffle(s)
print(s)
a = Bogosort
i = 0
while i == 0:
a.Bgsort()
if s == [1, 2, 3, 4, 5, 6, 7, 8]:
break
#BogoSortBestSort
"hey you get those photos sorted?"
"bogos borted?"
"wha-"
my brain during an exam trying to find the correct answer
bogos sorted? 👽
Bogos Borted 👽
This has to be the most pathetic way of sorting.
And I've watched all of the videos up to this point, wathing and learning the method by watching, but...
srs, what is this trying to accomplish?
Hey, calm down man. It's orders of magnitude faster than bogobogosort ;)
***** That was my point :P
Also, I don't think bogosort takes near the age of the universe, unless you have a ridiculously long list. Bogobogosort become impractical at about 7 items (like, it'll take somewhere in the range of a month).
Bogo is actually a sorting algorithm based on random values.
When it hits all of them right on, it's done.
NthPortal which is infinitely faster than worstsort
it's best
It's okay bogo sort. You're trying your best and that's all that matters. I love you
TH-cam video recommendation algorithm
Me when Jordan Peterson tells me to sort myself out.
Judging by how the Universe started, in a way we are all bogo sort.
What started out as hot gas, simple hydrogen and helium balls of light is now us, carbon-based life forms. But we're probably more the random arrays than the sorted one.
Gravity, chemistry and evolution sorted us.
Its like one of those old timey dance songs that starts really slow but once it picks up everyone starts dancing around
This is like the computer equivalent of monkeys typing Shakespeare.
one must imagine sisyphus using Bogo Sorting Algorithm
and this is still faster than Evilsort
1:11
Bogo sort: struggling*
me: HMMM THIS IS GOOD MUSIC
if you are watching this on a current firefox release, look at the sound icon on the right of the video's tab :D
it bleeps along xD
bogos binted?
imagine sorting all of your computer files with bogo sort.
nobody will find my porn collection if i dont even know where to find it
I swear that this audio reminds me of one of those old TV game shows I used to watch as a kid.
I think it was called "Press Your Luck".
Legend has it, it is still sorting to this day.