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...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 1.2K

  • @KevinSiebert
    @KevinSiebert 8 ปีที่แล้ว +6333

    Windows trying to search for a file

    • @gorgolyt
      @gorgolyt 8 ปีที่แล้ว +474

      while currentFile != targetFile
      currentFile = randomFile

    • @kauhanen44
      @kauhanen44 7 ปีที่แล้ว +180

      Hey, that would actually work! Eventually.

    • @someoneyoudontknow106
      @someoneyoudontknow106 7 ปีที่แล้ว +5

      XD

    • @TonboIV
      @TonboIV 7 ปีที่แล้ว +9

      XP?

    • @MrMile40
      @MrMile40 7 ปีที่แล้ว +4

      you killled mexD

  • @juangreen8194
    @juangreen8194 6 ปีที่แล้ว +12805

    Bogo sort is the fastest sort if you're very lucky

    • @cezarcatalin1406
      @cezarcatalin1406 5 ปีที่แล้ว +334

      Joee Green
      How much luck can someone have ?

    • @omegahaxors3306
      @omegahaxors3306 5 ปีที่แล้ว +452

      I had Bozo sort once instantly solve the max size map within a few seconds and was floored

    • @Tiogar60
      @Tiogar60 5 ปีที่แล้ว +132

      @@omegahaxors3306 The fact that you can't even spell Bogo correctly makes me question you

    • @omegahaxors3306
      @omegahaxors3306 5 ปีที่แล้ว +596

      @@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

    • @Joseph-kp8iz
      @Joseph-kp8iz 5 ปีที่แล้ว +333

      @@Tiogar60 lmao destroyed

  • @NovaStorm93
    @NovaStorm93 ปีที่แล้ว +3357

    There's a universe where bogosort is right every single time and we dont know why.

    • @balancemaster55
      @balancemaster55 ปีที่แล้ว +429

      And another one where it’s always right for everyone using it except one person.

    • @cool_person_i_be
      @cool_person_i_be ปีที่แล้ว +159

      @@balancemaster55 and theres one where instead of bogo sort there is a bear warlord trying to kill us all.

    • @jonbrown7868
      @jonbrown7868 ปีที่แล้ว +14

      Because the green bar is the way things should be.....like your dreams

    • @josephdavison4189
      @josephdavison4189 ปีที่แล้ว +18

      *quantum bogosort flashbacks*

    • @schtink5534
      @schtink5534 ปีที่แล้ว +53

      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.

  • @PicochillaTH
    @PicochillaTH 8 ปีที่แล้ว +4688

    Bogo Sort: "I have no idea what i am doing"

    • @slowsloth3809
      @slowsloth3809 6 ปีที่แล้ว +51

      PicochillaTH 300th like.
      I have no idea how to breathe.

    • @txqea9817
      @txqea9817 6 ปีที่แล้ว +49

      lets just move everything everywhere until this is ok
      400th like

    • @ijusterik5384
      @ijusterik5384 5 ปีที่แล้ว +5

      PicochillaTH made me laugh

    • @chrissmith1152
      @chrissmith1152 4 ปีที่แล้ว +2

      but somehow finds a way to solve it

    • @kjl3080
      @kjl3080 4 ปีที่แล้ว +3

      I like your pfp I’ve seen it before

  • @ShamelessHorse
    @ShamelessHorse 10 ปีที่แล้ว +4333

    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.

    • @Tracy_AC
      @Tracy_AC 8 ปีที่แล้ว +249

      +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.

    • @webebeb
      @webebeb 8 ปีที่แล้ว +107

      +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

    • @Xeverous
      @Xeverous 7 ปีที่แล้ว +69

      +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%

    • @Tracy_AC
      @Tracy_AC 7 ปีที่แล้ว +46

      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.

    • @sixfr0nt
      @sixfr0nt 6 ปีที่แล้ว +46

      I personally relate to this algorithm, how it works so hard but takes so long to succeed.

  • @SomeGuy-hh7te
    @SomeGuy-hh7te 6 ปีที่แล้ว +5760

    Friend: What's it doing?
    Me: Its best.

    • @zackjandali
      @zackjandali 6 ปีที่แล้ว +25

      Lmaooooo

    • @Eido06_
      @Eido06_ 6 ปีที่แล้ว +14

      oof

    • @kitsuneluey7824
      @kitsuneluey7824 5 ปีที่แล้ว +138

      Isn't Bogo sort the algorithm that just takes the integers and randomizes them until it gets it right?

    • @keyekeye9335
      @keyekeye9335 5 ปีที่แล้ว +101

      Yes. That's exactly what bogo sort is doing

    • @Weldon1045
      @Weldon1045 5 ปีที่แล้ว +9

      *Mc mental music starts*

  • @viviadacoyote955
    @viviadacoyote955 6 ปีที่แล้ว +1922

    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.

    • @hiimemily
      @hiimemily 3 ปีที่แล้ว +62

      Still better than CRAZYBUS, at any rate.

    • @yagomizuma2275
      @yagomizuma2275 3 ปีที่แล้ว +9

      Undetale

    • @utryping
      @utryping 3 ปีที่แล้ว +2

      @@hiimemily Wow I have seen your comments a lot recently

    • @geuzio
      @geuzio 2 ปีที่แล้ว +2

      @Hand Grabbing Fruits it’s a bot

    • @geuzio
      @geuzio 2 ปีที่แล้ว +1

      @Hand Grabbing Fruits he said that exact same thing on 5 other comments

  • @gino14
    @gino14 5 ปีที่แล้ว +4451

    You could have just made the last frame perfectly sorted and we would have believed you.

    • @davidm.johnston8994
      @davidm.johnston8994 4 ปีที่แล้ว +151

      It would have been so much more satisfying than this video is!

    • @GabrielShitposting
      @GabrielShitposting 3 ปีที่แล้ว +182

      Everyone watching will devolve into a monkey out of sheer excitement from seeing Bogo Sort finally pull it off.

    • @mixup2216
      @mixup2216 3 ปีที่แล้ว +31

      I was thinking it was storing values and sorting them in ram then it would just instantly be in order but no

    • @RohitSingh-nm9wd
      @RohitSingh-nm9wd 2 ปีที่แล้ว +2

      That would have been a dream come true

    • @user-py7qh8bn8s
      @user-py7qh8bn8s 2 ปีที่แล้ว +1

      There would just be no way to tell the opposite if the delay lines up

  • @starcevda
    @starcevda 8 ปีที่แล้ว +3133

    Just set delay to 0 ms and it will finish instantly

    • @emilgardis
      @emilgardis 8 ปีที่แล้ว +590

      or you know, use quantum bogus sort

    • @BradenBest
      @BradenBest 8 ปีที่แล้ว +70

      +Дмитрий Старцев
      No, it just keeps running forever. Bogo sort is the worst!

    • @coolboysecret4809
      @coolboysecret4809 8 ปีที่แล้ว +269

      +Braden Best it is not reasonable to say that bogo sort will never finish

    • @BradenBest
      @BradenBest 8 ปีที่แล้ว +25

      Cole Nelson
      I didn't say it will never finish. I said it will run forever.

    • @pyrobola8715
      @pyrobola8715 6 ปีที่แล้ว +233

      set font size to zero to infinitely compress data

  • @The_mario_fan
    @The_mario_fan 7 ปีที่แล้ว +4489

    This should be a livestream that starts with only 2 units then adds another unit every time the previous amount is completed

    • @bugs.nobunny
      @bugs.nobunny 6 ปีที่แล้ว +372

      i would watch until the guy's pc crashed
      no i wouldnt i have crap to do

    • @happyfakeboulder644
      @happyfakeboulder644 5 ปีที่แล้ว +135

      that's bogobogosort

    • @Y0y0Jester
      @Y0y0Jester 5 ปีที่แล้ว +15

      Can you make one?

    • @happyfakeboulder644
      @happyfakeboulder644 5 ปีที่แล้ว +35

      @@Y0y0Jester Are you talking to me?
      (if so, the answer is no, at least, not anytime soon)
      (sorry)

    • @gooj6682
      @gooj6682 5 ปีที่แล้ว +28

      @@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.

  • @emanonmax
    @emanonmax 10 ปีที่แล้ว +1988

    First random 8 bit music generator.

    • @gayMath
      @gayMath 7 ปีที่แล้ว +59

      I'm still sending requests for it to play the tetris theme.

    • @hilgertbos742
      @hilgertbos742 6 ปีที่แล้ว +35

      Someone make a sorting algorithm that plays the tetris theme

    • @sonicfon
      @sonicfon 5 ปีที่แล้ว +4

      crazy bus...
      oh sorry it was 16bit

    • @jlewwis1995
      @jlewwis1995 4 ปีที่แล้ว +10

      1:22 Dr. Mario theme

    • @lorishofer2889
      @lorishofer2889 4 ปีที่แล้ว

      Its actually good

  • @someguyeban
    @someguyeban 3 ปีที่แล้ว +672

    * Bogosort starts to actually sort *
    "What is it doing?"
    "Its beginning to believe."

    • @DannyDog27
      @DannyDog27 2 ปีที่แล้ว +50

      That’s the funny thing, it never _starts_ to actually sort. It just keeps throwing shit at the wall until it accidentally sorts it.

    • @pleasestopsubscribingtomyc3360
      @pleasestopsubscribingtomyc3360 28 วันที่ผ่านมา +1

      it's bogonning to bogove

  • @MrUosiu
    @MrUosiu 8 ปีที่แล้ว +5091

    Knowing Bogo Sort might one day Sort this list... It fills you with determination.

    • @hecko-yes
      @hecko-yes 8 ปีที่แล้ว +67

      #undertaleFTW

    • @drunkslav7280
      @drunkslav7280 7 ปีที่แล้ว +178

      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

    • @MrUosiu
      @MrUosiu 7 ปีที่แล้ว +212

      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.

    • @TmOnlineMapper
      @TmOnlineMapper 7 ปีที่แล้ว +29

      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

    • @BenRK90
      @BenRK90 7 ปีที่แล้ว +9

      I'm stealing that line and claiming it as my own.

  • @RoboticFemboy
    @RoboticFemboy 6 ปีที่แล้ว +598

    Bogo sort: Um... I-I don't know what I'm doing. I'm just gonna make some music, okay?

    • @goodboi6329
      @goodboi6329 3 ปีที่แล้ว +1

      Ok

    • @f4road
      @f4road 3 ปีที่แล้ว +13

      he really doesnt know what hes doing
      hes just scrambling and checking over and over again until he gets a correct thingy

    • @roburrito.
      @roburrito. 3 ปีที่แล้ว

      Ok.

  • @lisamariefan
    @lisamariefan 8 ปีที่แล้ว +1088

    "Sorting" algorithm.

    • @someoneyoudontknow106
      @someoneyoudontknow106 7 ปีที่แล้ว +97

      one day..... one day bogo will get the array sorted first try

    • @lisamariefan
      @lisamariefan 7 ปีที่แล้ว +10

      someone you don't know We just need to luck manipulate the universe, right?

    • @The-pf4zy
      @The-pf4zy 6 ปีที่แล้ว +12

      More like Shuffling algorithm.

    • @CamaradaArdi
      @CamaradaArdi 5 ปีที่แล้ว +8

      "sorting" "algorithm"

    • @lampoilropebombs0640
      @lampoilropebombs0640 5 ปีที่แล้ว

      Gryffindor!

  • @Herv3
    @Herv3 8 ปีที่แล้ว +760

    Never give up Bogo sort. I believe in you!

  • @reflectedpower609
    @reflectedpower609 3 ปีที่แล้ว +931

    For a brief moment at 1:00 the smallest value is in the correct location and that is good enough.

    • @endriusza
      @endriusza ปีที่แล้ว +28

      I also noticed that
      Maybe ist because i was half expecting it to solve it

    • @johnfroes729
      @johnfroes729 ปีที่แล้ว +22

      It sounds like the lavander town theme song from pokémon

    • @oggy4019
      @oggy4019 ปีที่แล้ว

      YOOOOOO thats mindblowing

    • @eliiNya
      @eliiNya 4 หลายเดือนก่อน

      it happened a few times i noticed

  • @diabl2master
    @diabl2master 7 ปีที่แล้ว +879

    It's like rolling a dice with 10^158 sides.

    • @memestreammedia6764
      @memestreammedia6764 7 ปีที่แล้ว +11

      Davy Ker lol. Great comparision

    • @cope9489
      @cope9489 6 ปีที่แล้ว +39

      more like a dice with 10^9223372036854775807 sides
      (the number is the 64 bit integer limit)

    • @adrianremo1988
      @adrianremo1988 5 ปีที่แล้ว +17

      More like rolling that same die and waiting for the die to roll each mumber in sequence and restarting when it got it wrong.

    • @woooooooooooooooooooooooo
      @woooooooooooooooooooooooo 4 ปีที่แล้ว +3

      That would be intresting

    • @heiwa3713
      @heiwa3713 4 ปีที่แล้ว +3

      @@memestreammedia6764 perfect comparison when we're looking at what bogo sort is comparing lol

  • @gasolineandwine
    @gasolineandwine 4 ปีที่แล้ว +492

    I like how every instance I've seen of Bogo sort ends with it not doing it's job

    • @LieseFury
      @LieseFury 2 ปีที่แล้ว +18

      udiprod made a video where it actually does!

    • @zacharymogel9500
      @zacharymogel9500 ปีที่แล้ว +5

      @@LieseFury after almost 40 minutes

    • @Kyznikov
      @Kyznikov ปีที่แล้ว

      ​@@zacharymogel9500you really replied a 11 months old reply on a 3 years old comment

    • @harrya9458
      @harrya9458 ปีที่แล้ว +7

      @@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

    • @dnaroseandthewolves
      @dnaroseandthewolves ปีที่แล้ว

      ​@@harrya9458 fr

  • @GermaphobeMusic
    @GermaphobeMusic 5 ปีที่แล้ว +384

    when you're daydreaming in class and the teacher asks you a question

    • @goodboi6329
      @goodboi6329 3 ปีที่แล้ว +1

      Or when your told to do anything

    • @eikosimino5579
      @eikosimino5579 3 ปีที่แล้ว +7

      sorting braincells randomly...

  • @1Din18
    @1Din18 10 ปีที่แล้ว +455

    This is the most horrifying Space Invaders theme I've ever heard.

    • @masonsykes2240
      @masonsykes2240 4 ปีที่แล้ว +3

      This is the best Close Encounters Of The Third Kind theme I've ever heard

  • @samstromsw
    @samstromsw 9 ปีที่แล้ว +1417

    bogo sort best sort

    • @PieEatinSuicideGrunt
      @PieEatinSuicideGrunt 7 ปีที่แล้ว +23

      Actually quantum bogosort and intelligent design sort are better :)

    • @tommyharrington3094
      @tommyharrington3094 6 ปีที่แล้ว +65

      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.

    • @davqueue4599
      @davqueue4599 4 ปีที่แล้ว +4

      R a d i x S o r t

    • @Phobic_Nova
      @Phobic_Nova 4 ปีที่แล้ว +4

      bloop bloop

  • @DemonLilyYT
    @DemonLilyYT 6 ปีที่แล้ว +601

    I implemented.this for our data sets. A day later i got fired :/

    • @krzywy8873
      @krzywy8873 5 ปีที่แล้ว +145

      they will never understand the greatness of bogo

    • @aliasqaraghchelou3411
      @aliasqaraghchelou3411 4 ปีที่แล้ว +17

      ur really brave, I admire u

    • @peterpanther8627
      @peterpanther8627 4 ปีที่แล้ว +23

      That was just some bad luck.

    • @wulfherecyning1282
      @wulfherecyning1282 4 ปีที่แล้ว +10

      @@peterpanther8627 A Tom Scott viewer by any chance?

    • @peterpanther8627
      @peterpanther8627 4 ปีที่แล้ว +5

      @@wulfherecyning1282 yee

  • @KHALI_SEAWEED
    @KHALI_SEAWEED 4 ปีที่แล้ว +483

    Teacher: Everyone! Stand in a line starting from the smallest person, ending on the tallest!
    The class:

    • @RodolfoYT2024
      @RodolfoYT2024 ปีที่แล้ว +3

      No replies? Guess I'm first..

    • @dnaroseandthewolves
      @dnaroseandthewolves ปีที่แล้ว +1

      💀

    • @st1220
      @st1220 ปีที่แล้ว

      true

    • @rhain9388
      @rhain9388 ปีที่แล้ว +3

      @@RodolfoYT2024 that's uh, usually how that works.

    • @getcaughtin4klol752
      @getcaughtin4klol752 ปีที่แล้ว +1

      ​@@dnaroseandthewolveszammn a furry 😔

  • @jaymz
    @jaymz 5 ปีที่แล้ว +196

    when the teacher says “line up single file by height”

  • @pixeldemon6173
    @pixeldemon6173 5 ปีที่แล้ว +209

    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.

    • @UH-60_Blackhawk
      @UH-60_Blackhawk ปีที่แล้ว +16

      you just described a sniper rifle with my aiming skills on it

    • @TheSizzleDash
      @TheSizzleDash 11 หลายเดือนก่อน +2

      Oohhh technically it would be a one percent since you put a comma instead of a period. Hahah

    • @zarawasique1229
      @zarawasique1229 11 หลายเดือนก่อน +12

      @@TheSizzleDash Europeans use the comma for the decimal point

    • @canaconn2388
      @canaconn2388 9 หลายเดือนก่อน +3

      ​@@zarawasique1229next you're going to tell me they use the metric system

    • @BrickBuster2552
      @BrickBuster2552 6 หลายเดือนก่อน

      Wait how much health does Fire Giant have?

  • @juustgowithit
    @juustgowithit 7 ปีที่แล้ว +142

    My life described with a sorting algorithm

    • @prim16
      @prim16 7 ปีที่แล้ว +8

      Same. Getting our shit together kinda involves just throwing things around randomly, and praying that it falls into place.

    • @damienjones1487
      @damienjones1487 6 ปีที่แล้ว

      HA HA DO FUCKING FUNNY, but seriously this is becoming clique and unfunny

  • @liryan
    @liryan 9 ปีที่แล้ว +145

    Still, I enjoyed the music for this fantastic 3 minutes...

    • @cope9489
      @cope9489 6 ปีที่แล้ว +1

      *Me too*

    • @hubbybubby7867
      @hubbybubby7867 3 ปีที่แล้ว +1

      Wait it’s 3 minutes.?? It doesn’t feel like it at all

  • @oneindelijk
    @oneindelijk 7 ปีที่แล้ว +839

    Isn't this the sorting algorithm the universe used in the beginning ?

    • @professionalshitpost4443
      @professionalshitpost4443 7 ปีที่แล้ว +13

      Amadeus Van Kerckhoven Clever XD

    • @jasonfenton8250
      @jasonfenton8250 6 ปีที่แล้ว +53

      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.

    • @user-eo5bh2zg2f
      @user-eo5bh2zg2f 6 ปีที่แล้ว +4

      Horatio Nelson Did you read that in a book somewhere?

    • @jasonfenton8250
      @jasonfenton8250 6 ปีที่แล้ว +8

      JD Christein Nah, though I've read things in similar style, I'm just ripping it off.

    • @VaibhavShete
      @VaibhavShete 5 ปีที่แล้ว

      Nailed it! ;)

  • @aadipandey8237
    @aadipandey8237 3 ปีที่แล้ว +65

    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.

    • @askinredroads5132
      @askinredroads5132 2 ปีที่แล้ว +27

      I believe you, but I also worry for you, I think you used up all your luck.

    • @aniroblox7139
      @aniroblox7139 ปีที่แล้ว +2

      I do not believe you.

    • @acupofkoffi
      @acupofkoffi ปีที่แล้ว +3

      ​@@askinredroads5132 no good life since then

    • @kohlsnofl5110
      @kohlsnofl5110 7 หลายเดือนก่อน +1

      ​@@acupofkoffi well, it is a 1 in 13! or approximately 1,6*10^(-8)% chance of happening, so... not that small right?
      a

  • @danni8191
    @danni8191 7 ปีที่แล้ว +232

    [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!"

  • @web2student
    @web2student 10 ปีที่แล้ว +140

    This is my favorite sorting algorithm, it may be taught as a cautionary tale, but I say it's under-appreciated.

    • @AredioVani
      @AredioVani 6 ปีที่แล้ว +6

      im presenting this as a joke to my project next month :D

    • @Linx_s
      @Linx_s 2 ปีที่แล้ว +4

      @@AredioVani did it go well?

    • @AredioVani
      @AredioVani 2 ปีที่แล้ว +17

      @@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"

    • @AriTheMothQueen
      @AriTheMothQueen 2 ปีที่แล้ว +4

      @@AredioVani did you get an ok grade? (If you do get grades)

    • @AredioVani
      @AredioVani 2 ปีที่แล้ว +7

      @@AriTheMothQueen Yeah i think i got an A on that course.

  • @PineaFan
    @PineaFan 6 ปีที่แล้ว +76

    me: sort this
    bogo: have some music for a few years!

  • @HersheyCactus
    @HersheyCactus 6 ปีที่แล้ว +63

    This is the sound of computing sadness.

  • @ASTC-Sinon
    @ASTC-Sinon 5 ปีที่แล้ว +39

    It’s like trying to solve a Rubik’s cube if you don’t know the algorithms

  • @Jivvi
    @Jivvi 7 ปีที่แล้ว +528

    Lol, "sort".

    • @dan-gy4vu
      @dan-gy4vu 6 ปีที่แล้ว +51

      Jivan Scarano *they are trying their best you know*

    • @oscarhamilton5769
      @oscarhamilton5769 5 ปีที่แล้ว +3

      Vaigod777 *Did you read the reply above he’s trying his best*

    • @GewelReal
      @GewelReal 5 ปีที่แล้ว +1

      @Vaigod777 xD

    • @logixindie
      @logixindie 5 ปีที่แล้ว +1

      At least it is able to check if the array is sorted. This algo is designed to have infinity runtime.

    • @woooooooooooooooooooooooo
      @woooooooooooooooooooooooo 4 ปีที่แล้ว +4

      it's trying ok

  • @brimcap9891
    @brimcap9891 3 ปีที่แล้ว +20

    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.

  • @IAmNumber4000
    @IAmNumber4000 8 ปีที่แล้ว +215

    This seems like the worst possible way to sort an integer set

    • @someoneyoudontknow106
      @someoneyoudontknow106 7 ปีที่แล้ว +79

      bogo sort is better cuz there is a chance that it will get it first try

    • @palmberry5576
      @palmberry5576 3 ปีที่แล้ว +1

      Haley Fucking Halcyon - Gaming Channel yeah

    • @bonkonfire
      @bonkonfire 3 ปีที่แล้ว +2

      nah it's just luck based

    • @TheOmnipresentEmu
      @TheOmnipresentEmu 3 ปีที่แล้ว

      *best

    • @tellurian7999
      @tellurian7999 3 ปีที่แล้ว

      @Haley Halcyon - Gaming Channel the worst possible wouldn't do anything with a time complexity of O(∞)

  • @aguslel305-vlogsyjuegos9
    @aguslel305-vlogsyjuegos9 8 ปีที่แล้ว +201

    some say its still sorting untis this day...

    • @derino2151
      @derino2151 7 ปีที่แล้ว

      yeah that's about 5.88 * 10^2872 operations in the worst case

    • @juliuszkocinski7478
      @juliuszkocinski7478 6 ปีที่แล้ว +3

      +Derek (Derino) There is no worst case...

    • @NewPhilosopher
      @NewPhilosopher 3 ปีที่แล้ว

      @generic goose how long would it take to sort 5 elements?

  • @BonziBUDDY
    @BonziBUDDY 5 ปีที่แล้ว +117

    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.

  • @LudwigvanBeethoven2
    @LudwigvanBeethoven2 5 ปีที่แล้ว +40

    This is actually a good shuffle algorithm

    • @lwgrazi
      @lwgrazi 2 ปีที่แล้ว +9

      when you gonna drop your next song it's been over 200 years

  • @LOLWAAHH
    @LOLWAAHH 5 ปีที่แล้ว +42

    You have efficient sorts like Quicksort. You have gorgeous sorts like Radix LSD sorts. Then you have this beauty

  • @bobbybrainstorm
    @bobbybrainstorm 4 ปีที่แล้ว +12

    Crush: hi
    My brain:

  • @AustiBomb33
    @AustiBomb33 5 ปีที่แล้ว +40

    Me: I'll hit the bull's eye this time!
    Also me: throws dart backwards

  • @vandelayindustries2971
    @vandelayindustries2971 5 ปีที่แล้ว +8

    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.

  • @fideliskarel6979
    @fideliskarel6979 7 ปีที่แล้ว +39

    1:50
    my new ringtone

  • @asammahina
    @asammahina 5 ปีที่แล้ว +10

    "Sure, I can play the piano."

  • @maiqtheliar5891
    @maiqtheliar5891 2 ปีที่แล้ว +6

    Bogo is the truest definition of "he's intelligent, he just doesn't try".
    But we love our very special boi ❤

  • @Heligoland360
    @Heligoland360 7 ปีที่แล้ว +357

    Still faster than bubble sort!

    • @tram9834
      @tram9834 7 ปีที่แล้ว +22

      Not really!

    • @Heligoland360
      @Heligoland360 7 ปีที่แล้ว +63

      Yeah it's not fair to even put bubble sort in the same league as this. It's just too damn fast!

    • @someoneyoudontknow106
      @someoneyoudontknow106 7 ปีที่แล้ว +10

      why u hate at bubble sort?

    • @Heligoland360
      @Heligoland360 7 ปีที่แล้ว +49

      someone you don't know I don't I just respect the brilliant speed of Bogo sort.

    • @julianx2rl
      @julianx2rl 7 ปีที่แล้ว +8

      This sorting method is sonic faste

  • @IanMacDonaldx
    @IanMacDonaldx 10 ปีที่แล้ว +19

    10 hours version please. I would settle for a shorter version that actually successfully sorts.

  • @didierdeschamps8557
    @didierdeschamps8557 ปีที่แล้ว +3

    This video is already 9 years old and legend said that the computer is still running to sort this array.

  • @batlin
    @batlin 11 ปีที่แล้ว +16

    Potentially the most efficient sorting algorithm... potentially :D

  • @NoggaXII
    @NoggaXII 8 ปีที่แล้ว +182

    Plottwist: It never sorted.

  • @germangb8752
    @germangb8752 9 ปีที่แล้ว +163

    so.. did it sort it eventually?

    • @germangb8752
      @germangb8752 9 ปีที่แล้ว +9

      ***** I know. The question wasn't serious though, it was a joke

    • @RKatz121
      @RKatz121 9 ปีที่แล้ว +54

      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.

    • @germangb8752
      @germangb8752 9 ปีที่แล้ว +3

      You might be the one in every N! and be lucky in the first try!

    • @RKatz121
      @RKatz121 9 ปีที่แล้ว +1

      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...

    • @germangb8752
      @germangb8752 9 ปีที่แล้ว

      ***** actually 20 minutes for 13 elements seems pretty lucky

  • @wunderboy3586
    @wunderboy3586 9 ปีที่แล้ว +193

    This is like the computer equivalent of severe OCD.

    • @DeeWeext
      @DeeWeext 9 ปีที่แล้ว +19

      wtf, it's random, how is that even remotely close to OCD.

    • @DeeWeext
      @DeeWeext 9 ปีที่แล้ว +16

      ***** Why, do you have OCD? I have CDO. It's like OCD, but all the letters are in the fucking right order.

    • @ratchet1freak
      @ratchet1freak 9 ปีที่แล้ว +2

      DeeWeext I'm OCD about the Order of the letters in OCD the letter are in the order of what the ****** acronym means

    • @samstromsw
      @samstromsw 9 ปีที่แล้ว +20

      Adam Kearley No this is a computer with ADHD.

    • @groszak1
      @groszak1 8 ปีที่แล้ว +2

      +Sam Stromswold No, it's ABCD. Ordered alphabet

  • @Minon157
    @Minon157 7 ปีที่แล้ว +107

    Maybe someday with advanced quantum computer Bogo sort will be more usefull?

    • @skyr8449
      @skyr8449 7 ปีที่แล้ว +2

      João Victor Daijó that is an interesting point.

    • @gablooblue
      @gablooblue 7 ปีที่แล้ว +52

      But then again every other sorting algorithm would become even better too

    • @luis_musik
      @luis_musik 6 ปีที่แล้ว +7

      actually not, the other sorting algorithms don't benefit from being run on a quantum computer.

    • @raffimolero64
      @raffimolero64 6 ปีที่แล้ว +13

      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.

    • @luis_musik
      @luis_musik 5 ปีที่แล้ว

      @@musik350 bead sort isn't comparison based

  • @NovaXP
    @NovaXP 6 ปีที่แล้ว +71

    This wouldn't actually be half bad imo if the algorithm didn't start from scratch every time

    • @uncannyplatypus2131
      @uncannyplatypus2131 3 ปีที่แล้ว +10

      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

  • @theiceelemental2770
    @theiceelemental2770 5 ปีที่แล้ว +35

    Me: This looks cool for a computer to sort!
    *ONE ETERNITY LATER*
    Me (As a skeleton): Wow this is great!
    *Jaw falls off*

  • @rahularora8923
    @rahularora8923 5 ปีที่แล้ว +22

    Me: "When will you have the answer?"
    Bogo Sort: "When Jesus comes back online!"

  • @Br00c
    @Br00c 4 ปีที่แล้ว +4

    Bogosort is me thinking I could fix flowers by jamming them back in the ground

  • @GLITCH_-.-
    @GLITCH_-.- 7 ปีที่แล้ว +22

    I don't get it. Why would you want to destroy your hardware so badly?

    • @memestreammedia6764
      @memestreammedia6764 7 ปีที่แล้ว +2

      Distelzombie Centzon Totochtin Obviously to sort some numbers because youre too stupid to do it yourself

    • @undine8750
      @undine8750 4 ปีที่แล้ว +2

      I’ll show you hardware.

  • @WhereWeRoll
    @WhereWeRoll 5 ปีที่แล้ว +4

    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.

  • @burnsy96
    @burnsy96 2 ปีที่แล้ว +2

    As someone who calls themselves 'OnlyFails', bogo sort is my spirit animal.

  • @TheEglenceKanali
    @TheEglenceKanali 8 ปีที่แล้ว +75

    When I want to crash my PC.

  • @AriTheMothQueen
    @AriTheMothQueen 2 ปีที่แล้ว +4

    It sounds like it's becoming increasingly panicked as time goes on

  • @DiggerDeeper01
    @DiggerDeeper01 ปีที่แล้ว +3

    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."

    • @lucaslevelups9592
      @lucaslevelups9592 4 หลายเดือนก่อน

      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.

  • @Fightre_Flighte
    @Fightre_Flighte 3 ปีที่แล้ว +2

    Legend has it that bogo is still sorting this set to this very day.

  • @ferociousfeind8538
    @ferociousfeind8538 7 ปีที่แล้ว +4

    Bogo sort essentially keeps demanding a new array until you randomly give it an already-sorted array.

  • @acathosh
    @acathosh 7 ปีที่แล้ว +8

    When do we get part 2?!

  • @Obstagoon862
    @Obstagoon862 7 ปีที่แล้ว +19

    Communicating in morse code!

  • @laramads5101
    @laramads5101 5 ปีที่แล้ว +1

    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

  • @mnvr-ug4rr
    @mnvr-ug4rr 7 ปีที่แล้ว +4

    The awesomest thing I've seen ever.

  • @keilafleischbein59
    @keilafleischbein59 5 ปีที่แล้ว +3

    The new youtube algorithm looks great

  • @JackIsNotInTheBox
    @JackIsNotInTheBox 7 ปีที่แล้ว +3

    Legends say it is still trying to find the sort to this day.

  • @josephstallin445
    @josephstallin445 3 ปีที่แล้ว +1

    You *almost* did it, never give up Bogo Sort

  • @scoutkirby144
    @scoutkirby144 6 ปีที่แล้ว +6

    Suddenly I want my own temporary secretary.

  • @thetruth5084
    @thetruth5084 8 ปีที่แล้ว +24

    Those beeps make me uncomfortable af..

    • @undine8750
      @undine8750 4 ปีที่แล้ว

      I know you like it ;)

  • @skelebratz
    @skelebratz 2 ปีที่แล้ว +5

    “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*

  • @enzozaqueu1759
    @enzozaqueu1759 ปีที่แล้ว +1

    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

  • @LindenF
    @LindenF ปีที่แล้ว +1

    this is the biggest bogo sort I can find on youtube so far

  • @ImperatorGrausam
    @ImperatorGrausam 6 ปีที่แล้ว +6

    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

  • @ChibisOnTheLoose
    @ChibisOnTheLoose 7 ปีที่แล้ว +42

    #BogoSortBestSort

  • @cepi8830
    @cepi8830 2 ปีที่แล้ว +2

    "hey you get those photos sorted?"
    "bogos borted?"
    "wha-"

  • @thicclasagna
    @thicclasagna 5 ปีที่แล้ว +1

    my brain during an exam trying to find the correct answer

  • @Siciliandef
    @Siciliandef 2 ปีที่แล้ว +11

    bogos sorted? 👽

  • @SnowCocoaCookie
    @SnowCocoaCookie 10 ปีที่แล้ว +34

    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?

    • @NthPortal
      @NthPortal 10 ปีที่แล้ว +24

      Hey, calm down man. It's orders of magnitude faster than bogobogosort ;)

    • @NthPortal
      @NthPortal 10 ปีที่แล้ว +4

      ***** 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).

    • @SnowCocoaCookie
      @SnowCocoaCookie 9 ปีที่แล้ว +5

      Bogo is actually a sorting algorithm based on random values.
      When it hits all of them right on, it's done.

    • @edibleturd
      @edibleturd 5 ปีที่แล้ว +1

      NthPortal which is infinitely faster than worstsort

    • @Iristallite
      @Iristallite 3 ปีที่แล้ว

      it's best

  • @vonschuhart
    @vonschuhart 4 ปีที่แล้ว

    It's okay bogo sort. You're trying your best and that's all that matters. I love you

  • @harshwardhan8682
    @harshwardhan8682 4 ปีที่แล้ว +4

    TH-cam video recommendation algorithm

  • @orvilleredenpiller338
    @orvilleredenpiller338 5 ปีที่แล้ว +7

    Me when Jordan Peterson tells me to sort myself out.

  • @katphisH11
    @katphisH11 6 ปีที่แล้ว +3

    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.

    • @felynecomrade
      @felynecomrade 5 ปีที่แล้ว

      Gravity, chemistry and evolution sorted us.

  • @jakobyarns4369
    @jakobyarns4369 3 ปีที่แล้ว +1

    Its like one of those old timey dance songs that starts really slow but once it picks up everyone starts dancing around

  • @pathologicalfrolic8641
    @pathologicalfrolic8641 2 ปีที่แล้ว +1

    This is like the computer equivalent of monkeys typing Shakespeare.

  • @pizzabroadcast
    @pizzabroadcast 7 หลายเดือนก่อน +3

    one must imagine sisyphus using Bogo Sorting Algorithm

  • @khhnator
    @khhnator 10 ปีที่แล้ว +5

    and this is still faster than Evilsort

  • @an8thdimensionalbeing142
    @an8thdimensionalbeing142 4 ปีที่แล้ว +2

    1:11
    Bogo sort: struggling*
    me: HMMM THIS IS GOOD MUSIC

  • @aprillomat
    @aprillomat 7 ปีที่แล้ว +2

    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

  • @bunniklinoevil
    @bunniklinoevil 2 ปีที่แล้ว +6

    bogos binted?

  • @YuNoGuy123
    @YuNoGuy123 6 ปีที่แล้ว +3

    imagine sorting all of your computer files with bogo sort.

    • @netkid5460
      @netkid5460 3 ปีที่แล้ว

      nobody will find my porn collection if i dont even know where to find it

  • @SaviourV
    @SaviourV 4 ปีที่แล้ว

    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".

  • @FifinatorKlon
    @FifinatorKlon 3 ปีที่แล้ว

    Legend has it, it is still sorting to this day.