Slashdot Mirror


Sorting Algorithms As Dances

mikejuk writes "You may well have seen many simulations of sorting algorithms that aim to show how the algorithm works. However I guarantee that you have never seen anything quite in the same league as the videos made by Sapientia University — they are simply crazy but in the nicest possible way. They folk dance their way though bubble sort, shell sort, insertion sort and selection sort. Very, very weird but you find you can't but help checking that they are doing it right. Now anyone want to try quicksort?"

68 comments

  1. DANCE DAMMIT !! DANCE LIKE YOU NEVER DANCED BEFORE by Anonymous Coward · · Score: 0

    Tance !!

    Yes, this is stupid.

  2. 5 minute video by zanian · · Score: 1

    That's why we use computers for algorithms. Neat idea though.

    1. Re:5 minute video by mmmmbeer · · Score: 2

      Yes, but they were using inefficient algorithms. A quicksort, for example, would be much faster, and could also be done in parallel.

    2. Re:5 minute video by plover · · Score: 5, Funny

      That's why we use computers for algorithms. Neat idea though.

      See, that's what you get with interpretive dance.

      A compiled dance would be much more efficient.

      --
      John
    3. Re:5 minute video by Anonymous Coward · · Score: 0

      ahahaha PMSL @ 0617 on a Monday morning.

      Over 9000 internetz to you, Sir!

    4. Re:5 minute video by CrazyJim1 · · Score: 1

      You win the funniest comment of the month award.

    5. Re:5 minute video by Tablizer · · Score: 1

      See, that's what you get with interpretive dance. A compiled dance would be much more efficient.

      But require twice as many dancers wearing twice as many costumes.
         

    6. Re:5 minute video by mgiuca · · Score: 1

      I don't know why they didn't do quicksort. That would have been a much more interesting dance to watch, because they would all be dancing in parallel.

    7. Re:5 minute video by Bovius · · Score: 1

      *slow clap*

    8. Re:5 minute video by masterwit · · Score: 1

      See, that's what you get with interpretive dance.

      A compiled dance would be much more efficient.

      Ah but a translation would work fine also... Although we may need someone that knows how to interpret this in order to properly create an efficient translation...

      --
      We should start a new Slashdot and return control to the geeks. It actually wouldn't be that hard to get some users to
    9. Re:5 minute video by martin-boundary · · Score: 5, Funny
      Did you notice that the comparison function is actually polymorphic? For example, the dance steps are different when comparing two guys and when comparing a guy and a girl.

      So really, even if you compile the dance, I think you'll find that the dynamic binding overhead will kill the running performance.

    10. Re:5 minute video by Anonymous Coward · · Score: 0

      thats what we got the cloud for!

      What would that be, flash dancing?

    11. Re:5 minute video by Anonymous Coward · · Score: 0, Insightful

      5 minute video. That's why we use computers for algorithms.

      Did it ever occur to you that the purpose of this dance, and video, was not to actually *sort* the data in question?

      It doesn't matter if it's taking five minutes for something that would've been finished in microseconds (if even that) on a modern computer. It's not about fastness; it's about illustrating how these algorithms work. Visualizing them, in a nutshell.

      Sheesh. Either you're trolling, or Slashdotters are getting stupider by the week.

    12. Re:5 minute video by metacell · · Score: 2

      Pfft, real programming languages have static polymorphism.

    13. Re:5 minute video by meiao · · Score: 1

      Yeah, slashdotters are getting stupider by the week.

    14. Re:5 minute video by maxwell+demon · · Score: 1

      Sheesh. Either you're trolling, or Slashdotters are getting stupider by the week.

      I'm pretty sure it's neither. He just aimed at +1 Funny.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    15. Re:5 minute video by zerro · · Score: 1

      don't forget the trolling, too!

    16. Re:5 minute video by DrVxD · · Score: 1

      ..and you win "+1 Statement of the bleedin' obvious" ;)

      --
      Not everything that can be measured matters; Not everything that matters can be measured.
  3. Where is the quick sort or merge sort dances? by Anonymous Coward · · Score: 0

    Now they would be awesome to see done in dance!!!!

    1. Re:Where is the quick sort or merge sort dances? by underqualified · · Score: 1

      They'd have to be able to do something similar to mitosis: split in two repeatedly and then merge again.

      Or maybe something like Inception wherein it's a dance within a dream within a dream within the Matrix within a dream.

    2. Re:Where is the quick sort or merge sort dances? by zippthorne · · Score: 4, Insightful

      Yeah, there's never been any kind of line dance where the dancers split into two groups, do stuff, and than merge back into the larger group in some ordered fashion....

      --
      Can you be Even More Awesome?!
    3. Re:Where is the quick sort or merge sort dances? by mehemiah · · Score: 1

      you mean like this dance ?

    4. Re:Where is the quick sort or merge sort dances? by underqualified · · Score: 1

      Good point. I was more focused on the call recursion and was not able to think about the "recursed" group being able to separate themselves from the main group by stepping forward and doing the dance/sort there.

    5. Re:Where is the quick sort or merge sort dances? by zippthorne · · Score: 1

      I suppose the real problem is that if you take advantage of parallelism, a sort-dance could be over before anyone had a chance to see what was going on.

      Not quicksort though. That would be a cool dance, as long as you pre-unsort the dancers to avoid the degenerate case: The "pivot" steps out, then the whole line comes forward and crosses to either side based on the comparison, then each side does the same trick, so you want at least the first iteration to be fairly even.

      --
      Can you be Even More Awesome?!
  4. They tried bogosort... by dgatwood · · Score: 5, Funny

    ...but it was indistinguishable from a bunch of drunk guys stumbling around in a crowded SF Muni station.

    --

    Check out my sci-fi/humor trilogy at PatriotsBooks.

  5. what sort of dance is this? by PJ6 · · Score: 1

    See how long it takes? It ain't the quick sort, son.

    1. Re:what sort of dance is this? by Anonymous Coward · · Score: 1

      Funny, too, I think Quick Sort would be marvelous as an interpretive dance.

  6. Missing option by Jeremi · · Score: 2

    I'm disappointed that they don't have a video demonstrating Stooge Sort.

    --


    I don't care if it's 90,000 hectares. That lake was not my doing.
  7. An article about this by Anonymous Coward · · Score: 0

    Without a single link to the youtube page or any kind of input from the students.

    Pretty disgraceful

  8. parallel versions by Odinlake · · Score: 4, Interesting

    I'd love to see parallel versions.. Much more action that way. Confusing? I think it could be beautiful.

    1. Re:parallel versions by mmmmbeer · · Score: 2

      I think you could do quicksort that way without being confusing. Have them come in as a line, with the first person (who happens to conveniently be 4) splits them into two groups. He then moves to the background while the two groups split again (on 1 or 2 and 7). This leaves only pairs, who reorder as necessary, then everybody comes back into one line. Quite simple, so long as you choose the initial sorting carefully.

    2. Re:parallel versions by Hultis · · Score: 0

      At my university it's customary to spend a lot of time sorting the freshmen based on various parameters, and with various sorting algorithms. I recall using bubble sort, multithreaded bubblesort (when the sequential bubble sort turned out to be too slow) as well as multithreaded quicksort. I don't think we managed to look as stupid as those guys, but we were admittedly pretty close.

  9. Calling this dance... by BluBrick · · Score: 1

    Grab your partner and look her in the eye,
    Push her to the right if you're lookin' t'ward at the sky
    Pass her to the left if your eyes are looking low.
    Lather, rinse, repeat folks - Do Si Do.

    --
    Ahh - My eye!
    The doctor said I'm not supposed to get Slashdot in it!
    1. Re:Calling this dance... by ciderbrew · · Score: 1

      Why, if it dont got none no rhythm, then it aint not none no algorithm twas what my greatgranpappy use't say.

      I want every algorithm expressed in dance. It's the only way it makes sense.

  10. Genetic sorting algorithm by syousef · · Score: 1

    Anyone participating in these dances is unlikely to ever be permitted to mate with anyone of the opposite sex. So I guess this is a genetic sorting algorithm called "End-of-the-line sort". Now all we need to make this truly cringeworth is the right (wrong!) lyrics.

    "Baby, you've reached the end of the line tonight See-Arrr-Elll-Effff!
    There ain't no way you'll pass on your code tonight See-Arrr-Elll-Effff!"

    --
    These posts express my own personal views, not those of my employer
    1. Re:Genetic sorting algorithm by Anonymous Coward · · Score: 0

      That was really bad. even worse than the dance. Wow. I'm definitely cringing.

    2. Re:Genetic sorting algorithm by Anonymous Coward · · Score: 1

      Anyone participating in these dances is unlikely to ever be permitted to mate with anyone of the opposite sex. So I guess this is a genetic sorting algorithm called "End-of-the-line sort".

      Um, speaking from personal experience, participating in dance (yes, even folk dance) is pretty much the most surefire way to get laid ever. Social and folk dances are basically just a codified means of getting members of the opposite sex to interact with each other.

    3. Re:Genetic sorting algorithm by Anonymous Coward · · Score: 0

      As there were members of both genders involved in the dancing your comment doesn't make any sense.

    4. Re:Genetic sorting algorithm by syousef · · Score: 1

      As there were members of both genders involved in the dancing your comment doesn't make any sense.

      It is possible to have members of the same gender in a room and not have any mating happening for a wide gamut of reasons. It only makes no sense because you learnt your logic skills watching episodes of Mythbusters.

      --
      These posts express my own personal views, not those of my employer
    5. Re:Genetic sorting algorithm by Anonymous Coward · · Score: 0

      So you're telling me you use folk dancing to get laid? Ewwww! Seriously.

      Some people don't require a "codified means of getting members of the opposite sex to interact". Try walking up and saying 'hi'. And stop treating every interaction as a potential opportunity to mate. Nothing less sexy than desperation.

      Shut up and get out of the basement, Nerdy McNerdenstein! Newsflash: 99% of all human civilization is nothing but a thinly veiled attempt to get the opposite sex in bed with you! (and sometimes the same sex) This is why the invention of sex robots will mean the END OF MANKIND!

        DON'T!

        DATE!

        ROBOTS!

    6. Re:Genetic sorting algorithm by Anonymous Coward · · Score: 0

      lol yea, I'm sure you get laid *tons* ::pat on the back:: please give us more advice.

  11. YES WIFE Will understand. by bongey · · Score: 0

    Honey do the bubble sort dance. Who would of thought my wife will finally understand my computer science degree. She has been a ballet dancer all her life, dance is something she just gets.

  12. Just imagine quicksort as a.. by qrwe · · Score: 1

    ..quickstep.

    --
    There are 2 types of people in the world - those who understand decimal and those who don't.
  13. Dance Your PhD by nbauman · · Score: 2

    I guarantee that you have never seen anything quite in the same league as the videos made by Sapientia University

    Without diminishing the creativity of these videos, I recommend that if you enjoyed these you might do a Google search for "Dance Your PhD".

    Selection of a DNA aptamer for homocysteine using systematic evolution of ligands by exponential enrichment
    http://news.sciencemag.org/sciencenow/2010/10/and-the-dance-your-phd-winner-is.html

    Nucleic acids never looked so good.

  14. Quantum Bogosort? by Anonymous Coward · · Score: 0

    I'm noticing a lack of interpretations of the Quantum Bogosort, here.

    1. Re:Quantum Bogosort? by maxwell+demon · · Score: 1

      They tried it. Unfortunately, the camera watching them always destroyed the quantum state. :-)

      --
      The Tao of math: The numbers you can count are not the real numbers.
  15. what, no heapsort? by grikdog · · Score: 1

    Another nicely weird s.a.

    --
    ``Tension, apprehension & dissension have begun!'' - Duffy Wyg&, in Alfred Bester's _The Demolished Man_
  16. This one was better IMHO :) by Anonymous Coward · · Score: 0

    http://www.youtube.com/watch?v=INHF_5RIxTE

  17. Had it at school already by alonz · · Score: 4, Interesting

    My intro-to-CS professor (20 years ago... my, how time flies) used to illustrate sorting algorithms by sorting the students in class by height.
    Once someone participates in a sorting algorithm, they sure won't forget :)

  18. Sorry but.. by Anonymous Coward · · Score: 0

    ...boooooring.

  19. Laugh all you like by neiras · · Score: 1

    A quantum bogosort could be solved with a time complexity of O(n).

    That's several spawned universes worth of stumbling, drunken Muni passengers (or dancers), and one hell of an efficient sort.

  20. Dance to assembly by submain · · Score: 1

    Now I wanna see a dance of bits being changed in an ALU. That should be entertaining.

    Heck, we could even write an asm program and have it ran by a dance processor...

  21. Protein Synthesis Dance by Anonymous Coward · · Score: 0

    My cell biology professor showed us this in college:

    Directed in 1971 by Robert Alan Weiss for the Department of Chemistry of Stanford University and imprinted with the "free love" aura of the period, this short film continues to be shown in biology class today. It has since spawn a series of similar funny attempts at vulgarizing protein synthesis. Narrated by Paul Berg, 1980 Nobel prize for Chemistry.

    http://www.youtube.com/watch?v=u9dhO0iCLww

  22. Irish Ceili Dancing Quicksort by Anonymous Coward · · Score: 0

    I've done Irish Ceili dancing (the rural version of Lord of the Dance). Quicksort could easily be done in that style.

    The partition element would be the last element on one end of the line. They would dance down the line with each person, leaving their partner either upstage or downstage. So, greater thans would be in a (gap filled) row upstage and less thans would be in a row downstage.

    Then the partition element would lead the greater thans in a line around the stage to the end of the less thans and the line would compress. So, the less thans would be on one end, then the partition element, and then the greater thans.

    At this point, the dance recurses. You do get tight with stage space for the final rounds, so you may want to end with insertion sort. :)

    Mike

  23. Quicksort. by 0101000001001010 · · Score: 1

    That was cool, but when clicking the link I really, really wanted to see quicksort done as a dance. Curse me and my expectations.

    Anybody know of any entertaining visual representation of quicksort?

  24. And in other news. by Anonymous Coward · · Score: 0

    And in other news. China announces a failed manned orbital mission where 3 cosmonauts failed to make reentry back in 1950.

    1. Re:And in other news. by Anonymous Coward · · Score: 0

      Why would China make an announcement about the Russians?

  25. Heapsort would end up.... by Anonymous Coward · · Score: 0

    An orgy?

  26. made a quick dragontape about it by Anonymous Coward · · Score: 0

    a completely amazing idea (which was seconded by all the coders around me), so I gathered all the tapes into one batch:

    http://www.dragontape.com/v/3040002-folk_dancers_show_you_how_selection_algorhythms_work

  27. How about sorting Dances as Algorithms? by wisebabo · · Score: 1

    Actually this is probably what dance theory is all about right? Might provide a useful abstraction of the subject though. Maybe there's a thesis in this for some non-tech averse grad student!

  28. Line dancing by sam_nead · · Score: 1

    First, I want to point out that line dancing and merge sort are clearly made for each other. Second, I just realized that bubble sort with n processors is linear time, right? It might also make for a more interesting dance, seeing all adjacent pairs do the little move at the same time... Or would that be too busy?

  29. Algo-rythmics by Anonymous Coward · · Score: 0

    Merge-sort with Transylvanian-saxon (German) folk dance, and quick-sort
    with Hungarian (“Küküllmenti legényes”) folk dance will be uploaded in few
    days. We are developing a software tool that didactically exploits the six
    dance-performances. This software will also be available soon.

    Algo-rythmics

  30. nice video by Anonymous Coward · · Score: 0

    article is very interesting. thank you for posting article. but video links are broken despite this post is very new. please check links.

      siri
    siri stocks

  31. I'd love... by DaVince21 · · Score: 1

    ...to see a dance of spaghetti sort.

    --
    I am not devoid of humor.