The Sound of Sorting - Visualization and “Audibilization” of Sorting Algorithms

created by: Timo Bingmann

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 

Timo Bingmann’s  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.

More information about the creation. You can play with several different kinds of sorts here

Waldeinsamkeit

I do not count the hours I spendIn wandering by the sea;The forest is my loyal friend,Like God it useth me.In plains that room for shadows makeOf skirting hills to lie,Bound in by streams which give and takeTheir colours from the sky;Or on the mountain-crest sublime,Or down the oaken glade,O what have I to do with time?For this the day was made.Cities of mortals woe begoneFantastic care derides,But in the serious landscape loneStern benefit abides.Sheen will tarnish, honey cloy,And merry is only a mask of sad,But, sober on a fund of joy,The woods at heart are glad.There the great Planter plantsOf fruitful worlds the grain,And with a million spells enchantsThe souls that walk in pain.Still on the seeds of all he madeThe rose of beauty burns;Through times that wear, and forms that fade,Immortal youth returns.The black ducks mounting from the lake,The pigeon in the pines,The bittern’s boom, a desert makeWhich no false art refines.Down in yon watery nook,Where bearded mists divide,The gray old gods whom Chaos knew,The sires of Nature, hide.Aloft, in secret veins of air,Blows the sweet breath of song,O, few to scale those uplands dare,Though they to all belong!See thou bring not to field or stoneThe fancies found in books;Leave authors’ eyes, and fetch your own,To brave the landscape’s looks.And if, amid this dear delight,My thoughts did home rebound,I well might reckon it a slightTo the high cheer I found.Oblivion here thy wisdom is,Thy thrift, the sleep of cares;For a proud idleness like thisCrowns all thy mean affairs. 

Ralph Waldo Emerson

Waldeinsamkeit

I do not count the hours I spend
In wandering by the sea;
The forest is my loyal friend,
Like God it useth me.

In plains that room for shadows make
Of skirting hills to lie,
Bound in by streams which give and take
Their colours from the sky;

Or on the mountain-crest sublime,
Or down the oaken glade,
O what have I to do with time?
For this the day was made.

Cities of mortals woe begone
Fantastic care derides,
But in the serious landscape lone
Stern benefit abides.

Sheen will tarnish, honey cloy,
And merry is only a mask of sad,
But, sober on a fund of joy,
The woods at heart are glad.

There the great Planter plants
Of fruitful worlds the grain,
And with a million spells enchants
The souls that walk in pain.

Still on the seeds of all he made
The rose of beauty burns;
Through times that wear, and forms that fade,
Immortal youth returns.

The black ducks mounting from the lake,
The pigeon in the pines,
The bittern’s boom, a desert make
Which no false art refines.

Down in yon watery nook,
Where bearded mists divide,
The gray old gods whom Chaos knew,
The sires of Nature, hide.

Aloft, in secret veins of air,
Blows the sweet breath of song,
O, few to scale those uplands dare,
Though they to all belong!

See thou bring not to field or stone
The fancies found in books;
Leave authors’ eyes, and fetch your own,
To brave the landscape’s looks.

And if, amid this dear delight,
My thoughts did home rebound,
I well might reckon it a slight
To the high cheer I found.

Oblivion here thy wisdom is,
Thy thrift, the sleep of cares;
For a proud idleness like this
Crowns all thy mean affairs. 

Ralph Waldo Emerson

A very interesting interview with Tomás Sedlácek who talks about the post-crisis world and how economist reason and view the world.

Yesterday I finally received my OP-1 Synthesizer. Wanting to own one from the day it came out.  Luckily I was able to buy a used one.

Here is my first try-out using the OP-1 Synthesizer. Everything was made and sequenced on the machine itself.

I look forward to start more experiments with this awesome music machine.

I’m managing all my pictures on Google+ and checking out the new photo features launched yesterday at Google I/O 2013 . This is a panorama generated completely automatically by Google based on a number of pictures inside one of my albums. I’m really amazed by this.

I’m managing all my pictures on Google+ and checking out the new photo features launched yesterday at Google I/O 2013 . This is a panorama generated completely automatically by Google based on a number of pictures inside one of my albums. I’m really amazed by this.

haptictalks:

THE GEOGRAPHY OF AN IDEA

Data mining is making the sentient world more visible. Or perhaps more directly, human vanity and the socially hard-wired mind is making the sentient world more visible. Turns out collective behavioral patterns, uncovered by an endless stream of digital-life information (geo-tagging, checking-in, mapping, foursquare, stacking, posting, sharing, texting, tagging, friending, tweeting, editing, pinning, liking) have a lot to say about the geography of the ephemeral. The physical landscape of our ideas and identities can be mined, and we can learn from them.

An interesting illustration of this popped up in the Atlantic Times recently. Emily Badger (one of my fave writers on the Atlantic Cities blog), posted about a webpage that tracks Wikipedia edits in real time. A feed of users, their locations and the page they edited, endlessly updates before your eyes. After seeing your screen come alive with the activities from people all over the world updating information about concepts ranging from local hockey teams to song lyrics to historic figures, this eerie feeling begins to stir within you. This is the part when you realize that you are part of something really, really big, and likely, thoughtful. Knowledge no longer possesses a geographical substrate. It’s intensely dislodged from local memory. Someone in Medellin, Colombia just edited “Vladimir Kramnik.”

But aside from generating creepy feelings about global consciousness, data mining this kind of information has altogether useful purposes. Take for example MIT’s recent data-mining project using cell-phone data to track transportation patterns of people riding informal bus systems. The idea is to use this information to plan a better transportation system that accurately reflects how people actually get around the city, lending serious cred to the adage “vote with your feet.”

Also the pic above comes from Anil Bawa-Cavia’s research on social patterns in cities (UCL). More data-mining to reinterpret cities as a social stratosphere. Let’s put some space-time continuum on that.

A great article featured on first monday ( a peer-reviewed journal on the internet)  written by Kalev H. Leetaru, Shaowen Wang, Guofeng Cao, Anand Padmanabhan and Eric Shook.
Abstract
In just under seven years, Twitter has grown to count nearly three percent of the entire global population among its active users who have sent more than 170 billion 140–character messages. Today the service plays such a significant role in American culture that the Library of Congress has assembled a permanent archive of the site back to its first tweet, updated daily. With its open API, Twitter has become one of the most popular data sources for social research, yet the majority of the literature has focused on it as a text or network graph source, with only limited efforts to date focusing exclusively on the geography of Twitter, assessing the various sources of geographic information on the service and their accuracy. More than three percent of all tweets are found to have native location information available, while a naive geocoder based on a simple major cities gazetteer and relying on the user–provided Location and Profile fields is able to geolocate more than a third of all tweets with high accuracy when measured against the GPS–based baseline. Geographic proximity is found to play a minimal role both in who users communicate with and what they communicate about, providing evidence that social media is shifting the communicative landscape.
Read more at : http://firstmonday.org/ojs/index.php/fm/article/view/4366/3654

A great article featured on first monday ( a peer-reviewed journal on the internet)  written by Kalev H. Leetaru, Shaowen Wang, Guofeng Cao, Anand Padmanabhan and Eric Shook.

Abstract

In just under seven years, Twitter has grown to count nearly three percent of the entire global population among its active users who have sent more than 170 billion 140–character messages. Today the service plays such a significant role in American culture that the Library of Congress has assembled a permanent archive of the site back to its first tweet, updated daily. With its open API, Twitter has become one of the most popular data sources for social research, yet the majority of the literature has focused on it as a text or network graph source, with only limited efforts to date focusing exclusively on the geography of Twitter, assessing the various sources of geographic information on the service and their accuracy. More than three percent of all tweets are found to have native location information available, while a naive geocoder based on a simple major cities gazetteer and relying on the user–provided Location and Profile fields is able to geolocate more than a third of all tweets with high accuracy when measured against the GPS–based baseline. Geographic proximity is found to play a minimal role both in who users communicate with and what they communicate about, providing evidence that social media is shifting the communicative landscape.

Read more at : http://firstmonday.org/ojs/index.php/fm/article/view/4366/3654

A great short web documentary about the art of data visualization featuring Edward Tufte.

Humans have a powerful capacity to process visual information, skills that date far back in our evolutionary lineage. And since the advent of science, we have employed intricate visual strategies to communicate data, often utilizing design principles that draw on these basic cognitive skills. In a modern world where we have far more data than we can process, the practice of data visualization has gained even more importance. From scientific visualization to pop infographics, designers are increasingly tasked with incorporating data into the media experience. Data has emerged as such a critical part of modern life that it has entered into the realm of art, where data-driven visual experiences challenge viewers to find personal meaning from a sea of information, a task that is increasingly present in every aspect of our information-infused lives. 

Featuring:
Edward Tufte, Yale University
Julie Steele, O’Reilly Media
Josh Smith, Hyperakt
Jer Thorp, Office for Creative Research

(Source: youtube.com)

nestofvellum:

Processing sketch. 

nestofvellum:

Processing sketch.