TalkBox |
![]() You could do gravity sorting. |
![]() MSD radix sort is wrong for some sizes with input n-2 equal. |
![]() There is a sort of this algorithm is very slow: |
![]() I don’t see much point in the input types, you can check out the code and try these yourself. One can add many different types of inputs. There is no release schedule. Releases are quite a hassle to make, but once enough additional algorithms are added in the git repo, I’ll make new binaries. |
![]() Could you add ascending/descending cubic and quintic input types? When do you plan to push to a new downloadable executable? Just wondering. |
![]() @Dan: thanks for the bug report. It’s fixed in git now, the number of radix rounds needed was too low for n=4^k. |
![]() Radix sort LSD gives incorrect results every time with array size 12 and shuffled cubic or quintic as source on linux version. |
![]() Yes, well, I don’t have Windows 8.1. |
![]() I found something about high-resolution timers for Windows 8.1 and later. Would be great to have the < 1 ms resolution. |
![]() @mgutt: that sounds like a very good idea. I’ll replace the “Random” button with Shuffle/Reset in the next version. |
![]() Have you done any kind of comparison statistics of total computing time vs array accesses/comparisons? Those would be pretty cool. |
![]() It would be nice if the “Reset” button simply reverted the array to its presorted state, not mix the elements. That way, it is possible to see different sorting algorithms being performed on the exact same array. To mix the array, you could add a “Shuffle” button. |
![]() Please add Timsort, Stooge sort, and slow sort to the demo program. This program is so amazing to me. |
![]() TimSort is already implemented on git. Wouldn’t KraaySort violate a patent? I can’t find any implementation. |
![]() hi |
![]() |
![]() The sound in that andrut video has clearly been done by modulating the cutoff point of an analog-like filter, over a toothy waveform. Maybe a fixed high saw waveform or something like that. I might be wrong, but the filter might also be the rarest one in analog synthesis: the band reject one. |
![]() That would be amazing if I were able to manually specify the input: I would definitely use this to try making a song!!! :D |
![]() Upon your requests: added TimSort, Slow Sort and Stooge Sort (see github). Videos about them are also on Youtube now. |
![]() Slowsort is missing! It’s a highly entertaining variant of mergesort, described in this paper: http://www.cse.ohio-state.edu/~yusu/courses/780/pessimal.pdf |
![]() yes yes timsort pls |
![]() Hi! Here some links to an other project we did in 2010. http://sourceforge.net/p/algorhythmics/code/288/tree/algorhythmicSorting/ https://vimeo.com/42353230 |
![]() Would love to see Timsort too: |
Posted on 2013-05-22, last updated 2014-05-15 by Timo Bingmann at Permlink.
Sorting algorithms are an essential chapter in undergraduate computer science education. Due to their easy to explain nature and fairly straight-forward analysis, this set of algorithms offers a convenient introduction to the methods and techniques of theoretical computer science and algorithm analysis.
This web page presents my own demo program for sortings algorithms, called “The Sound of Sorting”, which both visualizes the algorithms internals and their operations, and generates sound effects from the values being compared. See below for YouTube videos created with the demo.
The demo is implemented using the cross-platform toolkits wxWidgets and SDL, can be executed on Windows, Linux and Mac, and runs in real time.
All of the sorting algorithms are implemented in the SortAlgo.cpp.
Since November 2013, there is also the SoS-CheatSheet.pdf , which contains pseudo-code of a small selection of the algorithms.
On 2013-10-24, the viral YouTube video infected the front page of my current employer: the Department of Informatics at the Karlsruhe Institute of Technology (KIT), which is of course whom I originally made the demo program for. See the blog post about this occasion for another more technical description of the sorting demo program. [Added 2013-10-25]
See the README file below for information about using the program.
Prior Sorting Demos
There are many resources on the Internet about sorting algorithms, among them are Wikipedia, animated sorting algorithms by David R. Martin and various Java applets by many college or university staff.
However, one of the most intriguing demos of integer sorting algorithms is the visualization and “audibilization” by andrut, available in a YouTube video. However, there is not a whole lot of technical information available about how sound is generated from the sorting algorithms’ operations. According to the YouTube comment, there have been two previous approaches to generating sound from sorting: first and second. Both are constrained by using MIDI notes and slow instruments. Andrut’s is the first good sound generator, and it was the main guideline for the sound effects in the Sound of Sorting.
As was pointed out to me, Andrut’s video is again not the first sound generator for sorting algorithms. The old QBasic produced by Microsoft in 1991 also contained a sorting demo program with audibilization: SORTDEMO.BAS, which can be viewed on YouTube. So one sees again, no idea is really new, there is nothing new under the sun. [Added 2013-10-25]
However, for use in undergraduate teaching the YouTube demo has a lot of drawbacks. Most importantly, it cannot be slowed down! It also contains little additional information about how the algorithms operate. Furthermore, the set of algorithms is very small and some are not as good as they could be. Thus I decided to creat