×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Sorting Algorithms As Dances

samzenpus posted about 3 years ago | from the dancing-around-the-answer dept.

Programming 68

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

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

68 comments

DANCE DAMMIT !! DANCE LIKE YOU NEVER DANCED BEFORE (0)

Anonymous Coward | about 3 years ago | (#35777828)

Tance !!

Yes, this is stupid.

5 minute video (1)

zanian (1621285) | about 3 years ago | (#35777844)

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

Re:5 minute video (2)

mmmmbeer (107215) | about 3 years ago | (#35778282)

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

Re:5 minute video (1)

mgiuca (1040724) | about 3 years ago | (#35778662)

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.

Re:5 minute video (5, Funny)

plover (150551) | about 3 years ago | (#35778334)

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.

Re:5 minute video (0)

Anonymous Coward | about 3 years ago | (#35778402)

ahahaha PMSL @ 0617 on a Monday morning.

Over 9000 internetz to you, Sir!

Re:5 minute video (1)

Tablizer (95088) | about 3 years ago | (#35778622)

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.
   

Re:5 minute video (1)

masterwit (1800118) | about 3 years ago | (#35778904)

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

Re:5 minute video (5, Funny)

martin-boundary (547041) | about 3 years ago | (#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.

Re:5 minute video (0)

Anonymous Coward | about 3 years ago | (#35779088)

thats what we got the cloud for!

What would that be, flash dancing?

Re:5 minute video (0, Insightful)

Anonymous Coward | about 3 years ago | (#35779348)

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.

Re:5 minute video (1)

maxwell demon (590494) | about 3 years ago | (#35781082)

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.

Where is the quick sort or merge sort dances? (0)

Anonymous Coward | about 3 years ago | (#35777854)

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

Re:Where is the quick sort or merge sort dances? (1)

underqualified (1318035) | about 3 years ago | (#35778264)

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.

Re:Where is the quick sort or merge sort dances? (4, Insightful)

zippthorne (748122) | about 3 years ago | (#35779862)

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

Re:Where is the quick sort or merge sort dances? (1)

underqualified (1318035) | about 3 years ago | (#35782830)

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.

Re:Where is the quick sort or merge sort dances? (1)

zippthorne (748122) | about 3 years ago | (#35788668)

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.

WTF (0)

netdigger (847764) | about 3 years ago | (#35777856)

I understand the algorithm works and I do believe that in some strange sense that the videos do demonstrate it, but the dancing leave me with the feeling of WTF

They tried bogosort... (5, Funny)

dgatwood (11270) | about 3 years ago | (#35777858)

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

Laugh all you like (1)

neiras (723124) | about 3 years ago | (#35779312)

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.

what sort of dance is this? (1)

PJ6 (1151747) | about 3 years ago | (#35777886)

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

Re:what sort of dance is this? (1)

Anonymous Coward | about 3 years ago | (#35778232)

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

An article about this (0)

Anonymous Coward | about 3 years ago | (#35777994)

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

Pretty disgraceful

parallel versions (4, Interesting)

Odinlake (1057938) | about 3 years ago | (#35778028)

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

Re:parallel versions (2)

mmmmbeer (107215) | about 3 years ago | (#35778272)

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.

Re:parallel versions (1)

Hultis (1969080) | about 3 years ago | (#35780008)

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.

Calling this dance... (1)

BluBrick (1924) | about 3 years ago | (#35778134)

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.

Re:Calling this dance... (1)

ciderbrew (1860166) | about 3 years ago | (#35779396)

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.

Genetic sorting algorithm (1)

syousef (465911) | about 3 years ago | (#35778222)

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

Re:Genetic sorting algorithm (0)

Anonymous Coward | about 3 years ago | (#35778246)

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

Re:Genetic sorting algorithm (1)

Anonymous Coward | about 3 years ago | (#35778276)

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.

Re:Genetic sorting algorithm (-1, Troll)

syousef (465911) | about 3 years ago | (#35778296)

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.

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.

Re:Genetic sorting algorithm (0)

Anonymous Coward | about 3 years ago | (#35778810)

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!

Re:Genetic sorting algorithm (0)

Anonymous Coward | about 3 years ago | (#35778860)

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

Re:Genetic sorting algorithm (0)

Anonymous Coward | about 3 years ago | (#35778486)

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

Re:Genetic sorting algorithm (1)

syousef (465911) | about 3 years ago | (#35778510)

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.

YES WIFE Will understand. (1)

bongey (974911) | about 3 years ago | (#35778308)

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.

Dance Your PhD (2)

nbauman (624611) | about 3 years ago | (#35778466)

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.

Quantum Bogosort? (0)

Anonymous Coward | about 3 years ago | (#35778762)

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

hymenology; strange twist into total darkness (-1)

Anonymous Coward | about 3 years ago | (#35778922)

not literally? it's just like getting almost nowhere inquiring as to the real origins of the abominable chosen ones' holycostal 'toll booth', which was never exhibited in our ancestors, & can reduce a female's value to less than alive, should her's turn up missing. no wonder we all have to be killed until there's only .5billion of us left, as it is written on the georgia stone by the 'other' chosen ones (queen's incestuous inbred brother/cousin uncle sam). lots of darkness, depopulations, weapons peddlers, (un)missing hymens, other fatal fictional religious holycost scenarios etc.., kicks in here some where. in all versions of their book, almost everybody suffers/dies for 'god', over & over & over again. fruity? hypenosys? fake history math science etc...?

This one was better IMHO :) (0)

Anonymous Coward | about 3 years ago | (#35778932)

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

Had it at school already (4, Interesting)

alonz (21571) | about 3 years ago | (#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 :)

Sorry but.. (0)

Anonymous Coward | about 3 years ago | (#35779244)

...boooooring.

Dance to assembly (1)

submain (856941) | about 3 years ago | (#35779324)

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

yes (-1)

Anonymous Coward | about 3 years ago | (#35779468)

welcome to our website:
========== http://www.addtostock.com [addtostock.com]=======

Good news to tell you: Yes , Trust your eyes! it's really!!! , 100% original , come withinternational warranty! free shipping ,P A Y P A L accepted! Fast and door to door delivery!

Macbook pro laptops i7 [addtostock.com] $280- 520 U S D

Apple iPhone 4G 32GB [addtostock.com] $260 USD

Ipad 2 64gb + wifi + 3G [addtostock.com]$330 USD

New Ipod touch 64gb [addtostock.com]$120 USD

Dell Alienware M17x laptops: $700 [addtostock.com]

Dell Alienware M15x [addtostock.com] $500

MacBook Pro MC024 LL/A [addtostock.com] $510

MacBook Pro MC373 LL/A [addtostock.com] $485

BlackBerry Pearl 3G 9105 [addtostock.com]$350

Nikon F 6 - SLR camera - 35mm [addtostock.com]$685

Nikon D3000 (with 18mm-55mm and 55mm-200mm lens) [addtostock.com]$315

Nikon D3X SLR Cameras [addtostock.com]$985

Canon EOS 5D Mark [addtostock.com]$565

Playstation 3 PS3 Metal Gear Solid 4 [addtostock.com]$220

Free shipping , P A Y P A L accepted! Fast and door to door delivery!

Protein Synthesis Dance (0)

Anonymous Coward | about 3 years ago | (#35779864)

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

Irish Ceili Dancing Quicksort (0)

Anonymous Coward | about 3 years ago | (#35779938)

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

Quicksort. (1)

0101000001001010 (466440) | about 3 years ago | (#35780006)

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?

And in other news. (0)

Anonymous Coward | about 3 years ago | (#35780036)

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

Re:And in other news. (0)

Anonymous Coward | about 3 years ago | (#35781124)

Why would China make an announcement about the Russians?

Heapsort would end up.... (0)

Anonymous Coward | about 3 years ago | (#35780364)

An orgy?

made a quick dragontape about it (0)

Anonymous Coward | about 3 years ago | (#35780834)

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

How about sorting Dances as Algorithms? (1)

wisebabo (638845) | about 3 years ago | (#35780928)

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!

Line dancing (1)

sam_nead (607057) | about 3 years ago | (#35783340)

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?

Algo-rythmics (0)

Anonymous Coward | about 3 years ago | (#35790930)

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

nice video (0)

Anonymous Coward | more than 2 years ago | (#35845162)

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.biz]
siri stocks [siri.biz]

Check for New Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...