I am a theoretical computer scientist and, yes, we urgently need to rebrand that name. It sounds as if I stare at computers and dream up better ways of doing stuff.
Close, but not quite.
I stare at algorithms, marvel at their stunning beauty and strive to grasp their mysterious nature, wondering: “that's all very well in practice but how does it work in theory?” Because theory matters.
It is a tough job—algorithms don't give up their secrets easily—and it is a joy. Algorithms are beautiful things. Like snow crystals or spiralling shells.
The best algorithms are the product of the finest minds and it shows. They are intricate, often display high levels of symmetry and execute faster than a dragon fly snatches its prey.
Recently algorithms received a bad rep. Some are designed to follow your every online move and trick you into buying more stuff, some to get hold of your data, and others to flag you to the government. The situation resembles architectural design: buildings can be constructed for the common good or for nefarious purpose but the latter does not prevent the wealth of stunning architecture we can all admire in this world.
I study the more innocent kind of algorithm. The staple workhorses that have been around “forever” which in computer science typically means since the sixties, though some algorithms have been around since Babylonian times.
One of my favourite algorithms, published in the early sixties, is Quicksort. It does what it says on the tin: Quicksort sorts stuff quickly in the right order.
Have a messy list of people attending your party? Quicksort will order that list alphabetically in no time.
The algorithm was invented by Sir Tony Hoare, my academic grandfather.
I work to find out why algorithms come in the shape they do. Why are they so beautiful? What makes them so efficient? Quicksort is one of these and I admire it. It is lightning fast, “linearithmic” to be precise: its number of execution steps stays close to the number of things to be sorted.
Quicksort is a super gracious algorithm. More efficient than a dragon fly with its 95% hunting success. I recently worked out that Quicksort’s core operation is 100% non-redundant: it wastes not a single comparison operation in its execution. It does not get better than that. Happy days. I will present a talk on that topic soon and can't wait.
I do not believe that the best algorithms are created by chance or on a case-by-case basis by brute force genius alone. The pure mathematician in me, forever on the hunt for beautiful patterns, does not buy it. Mathematical principles must be at work. That is my belief and my work bears it out.
These days even AI turns it hand at creating new algorithms and big claims have been made: the end of all human programming and the creation of entirely new algorithms by AI. The claims are sadly piffle and tosh. Even reviewers seem to lose their cool around AI. The field is exciting for sure and we all get a bit carried away by it.
AI in its current incarnation does not design novel algorithms. Some predict that it will and soon. Never say never but “soon” is as relative as the length of a piece of string.
I firmly believe that maths is part of the answer when it comes to capturing algorithm design. Not stats alone, the current root of AI, but pure maths. A clue lies in the utter beauty of algorithms. When there is beauty in structure pure maths is close at hand.
I have spent decades working on this topic. That does not make me right of course. But this is my line of my work and one thing should be clear by now: I am a huge algofan and happy for it.
These beauties mesmerise me. And I wonder. Are you scared or worried about algorithms or curious about their beauty? Are you an algofan or an algofoe or both, and why?
Do you believe that computer scientists will be out of a job soon due to their own AI taking over writing their code? The irony does not preclude the dread many felt when the end of programming was announced.
Algorithms affect us all. And their beauty can get lost in the noise.
Stay tuned for more algomusings on the ShadowLands—and amazing stories! Check out upcoming ones below.