Loren on the Art of MATLAB

Turn ideas into MATLAB

Mathematics and Humanities: Understanding Sort Algorithms 2

Posted by Loren Shure,

Steve recently mentioned a video showing how the quiksort algorithm works, including an explanation from Bobby regarding the need for the final seconds to be sure that NaN values are sorted correctly.


Visualizing Quiksort

With much amusement, many of us from MathWorks recently viewed this video depicting the quiksort algorithm in dance. I don't think you'll see a MATLAB animation quite like this!

Visualizing Other Sort Algorithms

If you are interested in similar visual depictions of other sorting algorithms, check out this link.

A Place Where Math Meets the Humanities

In addition to these animations showing off mathematical algorithms, I have also enjoyed listening to and trying my hand at change ringing. I find similar points of intersection between my love of math and my interest in other art forms as well. Also check out the 17 regular tilings of the plane.

Do you have similar links between some interesting math and art? Let me know here.

Get the MATLAB code

Published with MATLAB® 7.14


Comments are closed.

2 CommentsOldest to Newest

Kye replied on : 1 of 2

Hey Loren,

thanks for the pointer to the video: awesome.

The choreography of the dance made me think of another sweet visualization built on mathematics: choreographic orbits.

A neat visualization of several of these planar choreographic orbits is available at http://users.soe.ucsc.edu/~charlie/3body/

Dimensions in Mathematics replied on : 2 of 2

Haha, this is ingenious! Quicksort demonstration in a folk dance – I loved that one. I will probably have to show this to my students. Thanks for sharing!