Sorting algorithms, embodied in folk dance

Whether you think about it or not, like it or not, your computer spends much of its time sorting things. There are many ways, many recipes, many algorithms for sorting. Read all about them, if you want the full low-down, inĀ volume 3 of Donald Knuth’s bible of computer science.

But if you want a quick feel for how some of them work, you might instead begin by watching some curious videos of Hungarian folk dancers dancing sort of algorithmically. Here’s the sorting method called quicksort:

But what if you hate dancing, hate it to the extent that you don’t even want to watch a stylish applied mathematical dance? Well, strip off the costumes, replace all the people with colored lines, and here’s what you get:

(Thanks to investigator Stan Amar for bringing this to our attention.)

One Response to “Sorting algorithms, embodied in folk dance”

  1. Alexandra Grayson Says:

    This is fascinating. But where’s the part where they talk about someone just driving over to the projected locations and doing some preliminary scouting? I mean, even just stopping the car and getting out to look around would give some useful information.

    For example, if your projections happens to be the bottom of a lake, you are probably wrong. But if it’s at the meeting of 2 rivers, or a spot where known trade routes used to be… well that’s a good sign.

    As the C++ coder at I’d say there should be something about real world testing of their neat idea.