Forgot your password?
typodupeerror
Programming Idle

Sorting Algorithms As Dances 68

Posted by samzenpus
from the dancing-around-the-answer dept.
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?"
This discussion has been archived. No new comments can be posted.

Sorting Algorithms As Dances

Comments Filter:
  • That's why we use computers for algorithms. Neat idea though.

    • by mmmmbeer (107215)

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

      • by mgiuca (1040724)

        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.

    • by plover (150551) * on Monday April 11, 2011 @12:01AM (#35778334) Homepage Journal

      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.

      • by CrazyJim1 (809850)
        You win the funniest comment of the month award.
      • by Tablizer (95088)

        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.
           

      • by Bovius (1243040)

        *slow clap*

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

      • by martin-boundary (547041) on Monday April 11, 2011 @02:35AM (#35778954)
        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.

  • by dgatwood (11270) on Sunday April 10, 2011 @10:29PM (#35777858) Journal

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

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

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

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

  • by Jeremi (14640) on Sunday April 10, 2011 @10:49PM (#35777990) Homepage

    I'm disappointed that they don't have a video demonstrating Stooge Sort [wikipedia.org].

  • parallel versions (Score:5, Interesting)

    by Odinlake (1057938) on Sunday April 10, 2011 @10:54PM (#35778028)
    I'd love to see parallel versions.. Much more action that way. Confusing? I think it could be beautiful.
    • by mmmmbeer (107215)

      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.

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

    • by Anonymous Coward

      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.

  • by nbauman (624611) on Monday April 11, 2011 @12:31AM (#35778466) Homepage Journal

    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 [sciencemag.org]

    Nucleic acids never looked so good.

  • Another nicely weird s.a.

  • by alonz (21571) on Monday April 11, 2011 @02:47AM (#35778992)

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

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

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

  • 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!

  • 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?
  • ...to see a dance of spaghetti sort.

The use of anthropomorphic terminology when dealing with computing systems is a symptom of professional immaturity. -- Edsger Dijkstra

Working...