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

41 of 68 comments (clear)

  1. 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 CrazyJim1 · · Score: 1

      You win the funniest comment of the month award.

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

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

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

      *slow clap*

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

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

      Pfft, real programming languages have static polymorphism.

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

      Yeah, slashdotters are getting stupider by the week.

    11. 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.
    12. Re:5 minute video by zerro · · Score: 1

      don't forget the trolling, too!

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

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

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

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

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

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

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

  11. 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_
  12. 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 :)

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

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

  15. 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?!
  16. 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?

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

  18. 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.
  19. Re:Where is the quick sort or merge sort dances? by mehemiah · · Score: 1

    you mean like this dance ?

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

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

  22. 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?!
  23. I'd love... by DaVince21 · · Score: 1

    ...to see a dance of spaghetti sort.

    --
    I am not devoid of humor.