Mention algorithms and most people's eyes will simply glaze over. But they really shouldn't. Algorithms are not only pretty interesting when you look into them, but they are also vitally important for the operation of our modern, digital world.
As you may know, algorithms are widely used in mathematics and computer science. But you may be surprised to learn that you personally also use them all the time.
Algorithms provide a step-by-step procedure for doing things, like mathematical calculations. But you also use it whenever you do something like baking a cake.
In their modern sense, algorithms are used for mathematical determinations, data processing, and automated reasoning to name a few. Put simply, without them, the modern world would work very differently indeed.
Here we will explore, very briefly, the fascinating and long history of algorithms. We will look at the origin of algorithms, including the etymology of algorithms, and take a peek at some of the most important ones. We will also take you on a quick tour of some uses of them in the modern world. Let's get stuck in, shall we?
What are the main characteristics of an algorithm?
As previously mentioned, an algorithm is, essentially, a sequence of steps used to solve a certain task. For an algorithm to truly be considered valid, it must have three important characteristics:
- It should be finite. If the algorithm never ends then trying to solve a problem is useless
- It should have well-defined instructions. Each step in the sequence must be defined with no ambiguity
- Clearly, it should be effective. The sequence should do or solve what it's supposed to solve with consistency. It should also be possible to achieve by hand with just a pencil and paper
We use algorithms every single day, but you may not notice it. Any recipe you use for making your favorite meal, the route you use to get from A to B, or the act of searching for your recipe or route online all make use of algorithms at some level.
What is the etymology of the word algorithm?
The term "algorithm" has a very interesting origin in English. In the 9th century, the influential scholar, astronomer, geographer, and mathematician Muhammad ibn Mūsa al-Khwarizmī became known for his contributions to the study of algebra. It is the Latinization of his name, which meant ‘the native of Khwãrezm’ (a town in Central Asia, along the borders of modern-day Turkmenistan and Uzbekistan) in Persian, gave English the word algorithm.
Al-Khwarizmī wrote a book in Arabic about Hindu-Arabic numerals, which was later translated into Latin. The Latin translation of the book titled Algoritmi de numero Indorum (in English, Al-Khwarizmi on the Hindu Art of Reckoning). The Latin word algoritmi was then translated into English as 'algorithm'.
Al-Khwarizmi is also known as, by some, "the father of Algebra" and is widely credited as the man who introduced sophisticated mathematics to the West after the fall of Rome.
Interestingly, it also seems that Al-Khwarizmi built on the work of an older Indian polymath known as Brahmagupta.
Today, the meaning of the term algorithm has been broadened to include any method of computation. This is especially the case from the mid-20th Century onwards where it is commonly used with reference to computing.
What is the origin of algorithms?
While the term is an old one, our modern thinking about algorithms only really came into existence with the rise and use of variables in mathematics. They have been used for millennia actually.
According to historical records and archaeological artifacts, the very first recognizable algorithm may well have been created by the Babylonians around 1600 BC. Recorded on clay tablets in a form of cuniform, these algorithms were used for factorization and finding square roots, etc, and were very simple by today's standards.
The great Euclid produced his famous "Euclidean algorithm" in around 300 BC, he was followed by Eratosthenes in 200 BC with his so-called "Sieve of Eratosthenes". Gaussian elimination was described by Lui Hui in 263 AD, and Brahmagupta developed Chakravala in 628 AD.
Over the following centuries, the Islamic world built on the ancient Greek, Indian, and Chinese works to develop more complex cryptanalysis, encryptions, and ciphers.
The real progress of the modern algorithm occurred during the mid-to-late-industrial revolution. At this time, George Boole notably invented binary algebra, the basis for modern computer code.
Ada Lovelace produced the very first "computer program" in the 1840s. Alfred North Whitehead and Bertrand Russell further simplified and amplified the work of Geran philosopher and logician Friedrich Ludwig Gottlob Frege in their Principia Mathematica (1910-1913). Frege is credited with constructing a formal system which used an analysis of quantified statements and the formalization of the notion of a ‘proof’ in the sense that we use today.
Alan Turing first formalized the concept of the algorithm in 1936 with his infamous Turing machine. The addition of Alonzo Church's lambda calculus paved the way for modern computer science.
The world would never be the same again.
What are some examples of the daily use of algorithms?
As you have seen, algorithms not only have a long history, but they are essential parts of modern daily life. Even without the rise of computers, it is likely algorithms of some kind would still play a major role in your daily routine.
That being said, here are some examples of algorithms used in daily life. Please note the following examples are in no particular order and the list is not exhaustive.
1. Recipes are basic but very common algorithms
From the humble cup of tea to the vastly more intricate daube of beef, recipes are a series of instructions to create what are some of the most important things in your life - food and drinks.
In most cases, the rules can be "bent" to your taste, but often complete disregard of the recipe will result in a failed or flawed end result.
2. Online searches are a very common everyday use of algorithms
Of course, if you don't know that recipe off by heart you can always "Google it!". The rise of the internet has led to a massive need for complex data storage and search functionality, for easy recollection. But how is this achieved? You've guessed it, through algorithms. Search engine indexing, page ranking, etc, all use complex algorithms to parse your request and generate a list of suggestions. While we take this kind of service for granted today, the algorithms used behind the scenes are actually pretty complex.
3. Share it! functions also use clever algorithms
Let's suppose you've decided what you wanted to cook, found the recipe, followed it, and successfully, dare we say masterfully, created it. What now? While most would probably sit down and eat it, others may wish to first take a picture and share it with the world. Both the act of capturing it on "film", uploading it to the internet and sharing it with your friends all use clever forms of algorithms.
The software on your smartphone uses algorithm commands to work the camera and store the image. Then, using your favorite app, they step in again to compress, upload, render, and show your image to the world. Each and every phase of this seemingly simple task takes thousands, if not millions, of lines of code to complete each step perfectly every time. Truly astounding.
4. Basic arithmetic is another form of an algorithm
Even basic numeracy, like arithmetic, is a form of algorithm too. Whenever you multiply two numbers together, say two times two, you are also following some basic procedures to reach an end result - the product.
The same is true for whenever you receive change when buying something with cash at a shop, cut up a pizza, share a bag of sweets between friends, or calculate your portion of the bill at the restaurant or bar.
All of these actions use very basic algorithms to make them possible.
5. All computer programs use algorithms at some level
Whenever you send an email, write a word document, enter data into a spreadsheet or database, all these processes use algorithms to function. While algorithms form the basic operational code of these programs, you may even find that you write some yourself.
Take spreadsheets for example. Do you find you commonly use the SUM() function or any other form of data manipulation formula? Every time you do this, you are quite literally using an algorithm to reach an end result - the sum form of a mathematical product.
Perhaps you are a more advanced user who loves nothing more than making good use of VLOOKUP, Concatenation, or even creating Macros? Not to mention nesting formulae or using if statements. These all make use of algorithms to quite literally do your bidding.
Still here? Phew, that's quite enough for one day, and we haven't even touched on encryption, security, medical procedures, databases, computer games, data analysis, computer modeling, and, of course, artificial intelligence!
There are many other uses for algorithms in the modern world and going through them all is quite out of the remit of this article. But we are confident you can think of some critically important algorithms you probably use every single day.