They are the reason your social media video went viral. They suggest the perfect wine to add to your online shop. And they seem to know exactly which songs will hit the spot. In our digital world, algorithms are everywhere yet how much do we really know about them?
The fact is that many of our daily activities (perhaps more than you realise) are handled by a digital version of what is essentially a simple process: a sequence of tasks that takes a request for ‘something’ all the way to its logical conclusion. But let’s start at the beginning, as all algorithms do.
Counting backwards
Nine centuries ago, in a region of ancient Persia, which now straddles Turkmenistan and Uzbekistan, the polymath Muhammad ibn Musa al-Khwarizmi wrote an influential book on the Hindu art of reckoning – a decimal numeral system devised by Indian mathematicians.
Khwarizmi, who was also a brilliant astronomer and geographer, is thought to be the first mathematician to treat algebra as an independent discipline, sharing his workings with wider society (an equally fascinating story for another day).
By the 12th century, Latin translations of Khwarizmi’s book – by this time titled Algorithmo de Numero Indorum – had introduced the decimal system to the Western world as well as a more practical system of Hindu-Arabic numerals. His work had also shown how complex problems could be broken down into simpler parts and solved. Khwarizmi’s name, when written in Latin, had become Algoritmi – and the originator of the word ‘algorithm’.
Fast forward to the 20th century when Alan Turing, the British mathematician and computer scientist, worked out how – in theory – a machine could follow algorithmic instructions to solve complex mathematics. His Turing machine provided a mathematical model for a general-purpose computer, or rather its central processing unit that underpins the computers we use today.
We’re often guilty of taking the speed and ability of computers, and spin-off devices such as smartphones and tablets, for granted. But just pause for a moment to consider the sheer quantity of computational calculations happening across the world in every home and workplace right now. They all depend on algorithms.
Everyday magic
Just to recap, algorithms are a sequence of tasks carried out to fulfil a request or solve a problem. Consider the process of baking a cake. First, you decide on the finished product – say, a Victoria sponge – and set out the ingredients. Then you follow a step-by-step process defined by the recipe to mix, bake and eventually, if it all goes to plan, assemble the perfect cake. In computer terms, an algorithm is a perfectly defined set of instructions written in programming language. That’s all we need to know here but, if you want to dig a bit deeper, this blog is an excellent introduction.
So how are these handy little computer conversations used in our daily lives – where to begin? They are behind the playlist that gets you up and ready for the day ahead. You log in at work and call up your preferred search engine for the first of many, many queries (work-related or otherwise). Heading to meet friends for lunch at a new restaurant, you punch the details into the GPS on your smartphone or car satnav. Then you share some selfies on social media before heading back to work.
On your way home, you call in at the supermarket to collect your pre-ordered groceries, picked for you by human hands that have been guided by onscreen information. It’s been a stressful day so, to wind down, you call up your favourite entertainment system, which recommends – based on previous choices – a film or TV boxset. In the background, you can hear your children battling it out on the latest video game.
Then consider the algorithms used in designing, producing and operating the products you depend on – such as the car, personal computer … or dishwasher – or the systems that kept the lights on, the phonelines working and supplies for tomorrow’s supermarket shelves flowing.
The application of the “simple” algorithm is both exhilarating and bewildering. And we have a long way to go yet in our digital universe. So whether you are part of developing that future or are just happy to benefit from it, spare a thought for the humble algorithm and the long way it has already travelled.
A potted history of the algorithm
Want to learn more? Check out these links:
Geeks for Geeks, search ‘algorithms’



