Dancing About Architecture

From the Sapientia Hungarian University of Transylvania comes a fantastic visualization of sorting algorithms using Romanian folk dance.

Here is Insert Sort:

Here is Bubble Sort:

Here is Shell Sort:

And here is Select Sort:

The dancers are a little slow, which can try your patience a bit, but that’s good because it makes the logic clear and gives you a visceral appreciation of algorithmic efficiency.

In addition to being a great visualization in its own right, this makes you think about the various kinds of geometric metaphors used to illustrate sorting. In these videos they stick to algorithms that operate on pairs of items extracted from the array one at a time while the rest of the line stands still. So no Heap Sort, because you have to visualize that one as a tree rather than an array, which would be difficult to film.  (Unless maybe you hung a mirror over the back of the stage at an angle so that you could see the dancers from the top as well as from the front.)  Also no Merge Sort, which would require that all the dancers be moving at once in intricate Busby Berkeley-like patterns. Might we (and I’m only half kidding here) think of sort algorithms as being divided into line-dance-able and non-line-dance-able classes?

Advertisements
This entry was posted in Those that have just broken the flower vase. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s