The Art of Sorting!

When Art is combined with Science and vice versa, it has a magical quality! I suppose if you are movie goer, you should be intensely aware of it, especially if you watched this year’s Oscars front runner – The shape of water.

People have done some wonderfully inspiring stuff around illustrating and promoting understanding of algorithmic (and mathematical) concepts.  Sorting algorithms, which deal with arranging objects (say, numbers) in ascending or descending order somehow lend themselves to a few such creative exercises. Here are two examples which I really enjoy using while teaching my Algorithms classes. The best quality they have is they  wake up students (with a bang, I should say) from the deep sleep induced by a tough lecture, and even infuse some with a love of algorithms (at least I fantasize so).

  1. Sound and Fury: The video below titled 15 sorting algorithms in 16 minutes, probably my favourite ‘cool-aid’, is by Timo Bingmann from Kalsruhe (KIT). It’s quite fascinating to see how he uses the numeric values to generate the plots and the relative difference of the compared values to generate the sound. The video has a mere 4.1 Million views so don’t stress if you add a bit more to the count!

The closest I came to doing something like this is when as a high school student, I wrote a program in the programming language Basica that plotted the initials of a girl I liked using a cosine function. Do try that some time!

Details about the above video and its companions, the algorithms behind their generation and the complete source code is available at http://panthema.net/2013/sound-of-sorting/ – if you like, download and have fun!!

2. Sorting Come Dancing: Now, on to the ‘sorting dances’. This group Algorhythmics from Sapentia University, Romania, seem to have a real affinity for dancing their algorithms! They have a number of well known folk dances which end up doing sorting or even other things such as linear and binary search. Watch the numbers Quick Sort themselves by doing a Hungarian dance!!

I wonder how another dance, say an Indian classical dance, effect quick sort! ;). Watch more of their dancing at their youtube channel: AlgoRythmics

I have issued a challenge to my UG year 1 Algorithms class to see if they can come up with something similarly creative. Considering that Loughborough University is ranked the number 1 sports university in the world, I wouldn’t be surprised if it had some sporty angle to it. Let’s wait and watch!

Advertisements

I have moved to Lufbra!

In February, I moved to the department of Computer Science at Loughborough University (called Lufbra or Lboro or other variants, in short) after spending more than three years at Queen’s University Belfast. I am pretty excited about the move and got a really nice welcome with the news of  the award of an EPSRC first grant in my first week here (more on that later). The department has a good mixture of systems and theory and, heartingly, sits in the School of Science (along with Maths and Physics, the right place I feel for CS – Djikstra would have it rather called Computing Science). I will work most closely with the Theory and Networks groups but, in fact, with anybody who’s willing to go to lunch or coffee with me (speaking of which, we have a nice communal and very active Nespresso machine)!

This slideshow requires JavaScript.

Though recent years and, let’s say, world events, have made me wary about news and rankings, this is the right time to brag about Lufbra – top 5  in the Guardian league tables, top 10 in complete University Guide and other rankings (more here), and #1 in student satisfaction rankings.  But what Lufbra is really legendary for is its sports (with alumni like Sebastian Coe and Paula Radcliffe) with it recently been crowned the best sports university in the world. Sports is everywhere on one of the largest closed campuses in the UK with many national and olympic facilities based here. Even more exciting for me is that the  English and Wales Cricket board national cricket performance centre is outside my window and also one of the two international standard cricket grounds on campus! We, at Computer Science have even graduated some test cricketers like Monty Panesar (nice article here on Monty’s story). There will be lot of nice cricket to watch from work over summer 😉

When I was a kid, I  wanted to be a Scientist and a Cricketer (let’s say, I have had moderate success in both ventures) – now, in my office, I’ll be a scientist and watch cricketers!