How To Really Understand The Concept Of An Algorithm? - An illustration that shows a stick figure on the left with the dialogue bubble: "I have a problem!" This points to → A box that says "Do this first." → Then, a box that says "Then, do this." → Then, a box that says "Finally, do this." → This points to another version of the same stick figure from before with the dialogue bubble: "Problem solved!"

When you think of the word “algorithm”, you are likely to associate with computers or computer science. This is because algorithms seemingly rule the world of computers. As we live in an increasingly computerized world, new and upcoming fields such as machine learning and artificial intelligence are juxtaposed with the word “algorithm” as well.

As it turns out, algorithms are not exclusive to computer science or computers. Even before computers, algorithms were profusely used in mathematics and engineering. After computers, new and upcoming fields such as operations research and data science also use algorithms.

In this essay, we start by tracing the concept of the algorithm back to its roots. Then, we dive into the philosophy of algorithms and cover how algorithms straddle the real world and the technological world. Finally, we look at how we could explicitly benefit from algorithms in real life. Let us begin.

This essay is supported by Generatebg

A product with a beautiful background featuring the sponsor: Generatebg - a service that generates high-resolution backgrounds in just one click. The description says "No more costly photographers" and displays a "Get Started" button beneath the description.

The Roots of the Algorithm

The world “algorithm” originally comes from the name of the 9th Century Persian mathematician, astronomer, geographer, and scholar, Muḥammad ibn Mūsā al-Khwārizmī. Al-Khwārizmī was one the most widely read mathematicians in late-middle-age Europe. In Latin, his name “Al-Khwārizmī” was translated to “Algorizmi”, which eventually came to be known as “algorithm” in English.

Fun fact: Al-Khwārizmī wrote a book titled “al-Jabr wa’l-Muqābala”. The “al-Jabr” part of the title is the source of the mathematical world/field “algebra”. Now, back to algorithms.

You see, one of the earliest known algorithms was a mathematical long division procedure described by a four-thousand-year-old Sumerian clay tablet found near Baghdad. So, algorithms pre-date computers by a fair number of years. But the rabbit hole goes deeper than that.

The truth about algorithms is hidden in plain sight. Let us uncover some of it by diving further into the world of algorithms.


The Philosophy of the Algorithm

Although one of the earliest known algorithms was a mathematical algorithm, algorithms are not exclusive to mathematics either. They stem from one of the most fundamental needs of humanity: the need to solve problems!

Once upon a time, I decided that I wished to follow a healthy diet. I figured (via trial-and-error) that cooking my own meals was a very efficient way to achieve this goal. However, there was one catch. I did not enjoy cooking.

The situation improved a little when I ditched recipes and started “winging it”. Sure, my cooking was not the best, but I had developed my own imprecise “style” of cooking that was almost always edible and sometimes tasty.

Having conquered cooking, I set foot on the land of baking. Drunk on arrogance, I tried winging it with baking as well and ended up with disaster after disaster. I learnt the hard way that in the world of baking, the recipe is king. That is an interesting story; but what does this have to do with algorithms?

Well, what do you think a recipe is? It is as explicit an algorithm as they come. It is rather interesting to note that in the cooking world, there is a lot of freedom to deviate from the algorithm, whereas in the baking world, there seems to be lesser freedom available.

Is there an Algorithm for Life?

The application of algorithms does not stop with baking. The human brain is the architect of the modern digital computer. So, it is not far-fetched to say that our brain executes subtly implicit algorithms all the time to solve real-world problems.

1. What is the best route to drive to Grandma’s on a Sunday?

2. Is it better to eat ice cream before the meal or after the meal?

3. Should I go for a run in the morning or the evening?

4. Should I commit my next 8 hours to this series on this streaming platform?

Questions like these involve subtly implicit algorithms. But the moment you start thinking about these decision processes explicitly, it becomes clearer and clearer that they are indeed algorithms. This brings us to the next big question:

If algorithms help solve problems, can they help solve the problem of how we should live life?

The answers are a bit dodgy here, but there are at least two ventures that aim to develop algorithms for life:

1. Religion

2. Philosophy

If you like neither, there is always the third option of “winging it”. So, pick your pill. If real life features algorithms, and computers feature algorithms too, are they related in some way?


How the Algorithm Straddles Technology and Real Life

Early computer algorithms dealt with optimal utilization of limited resources in the form of sorting, searching, caching algorithms, etc. The latest computer algorithms deal with solving problems of decision making given unclear patterns, processes involving large (yet finite number) of possibilities, efficient approximations that save time, etc.

If you think about it, there is one commonality between computers and real life. In both cases, resources are limited. We, as human beings, may not realise it, but we try to sort, search and cache all the time. We have limited capacity to process large amounts of information, make probabilistic calculations, trade time off for speed of decisions, etc.

Computing technology might be more capable than us with these algorithms, but it is nothing but an extension of our brains to solve our own problems. In other words, humanity finds ways of solving its problems by outsourcing algorithms to more efficient resources in the form of technology.

How to Explicitly Benefit from Algorithms in Real Life?

Just like my experience with cooking and baking, certain areas of life are not so conducive to algorithms, whereas others really benefit from algorithmic approaches. The challenge is that (at least from my experience) we can only make out which is which only by trial and error. Often, algorithms serve us well where we least expect it.

As an example, check out my essay on how to use mathematics to choose a life partner. It comes from a class of computational/mathematical problems known as “optimal stopping problems.” As another counter-intuitive example, I documented my journey of how I coded an algorithm to help me make a life changing decision. Even as I was doing it, it felt very counter-intuitive to me.

The good news is that since all of us live in limited space and time, we share this world of ours. If you have a problem, chances are that someone, somewhere, at some point in time has had the same problem.

Based on this hypothesis, it makes sense to search for documented algorithms that have solved the same or a similar problem in the past. You need not reinvent the wheel every time you face a difficult challenge.

Final Remarks

To conclude, the word “algorithm” has more to do with the innate human need to solve problems than with computers/technology. There is a certain class of real-life problems that renders itself suitable to be solved using algorithms.

My experience is that we often find out which problems are conducive to algorithmic solutions only after trying (trial and error). If you are perceptive enough and reflective enough, you may find documented references to people who have faced the same or a relatable problem to your own.

Such documentations often include the algorithm that solved the problem as well. This can greatly save time and resources for you. This way, you don’t need to reinvent the wheel every time you face a new challenge.


References and credit: Brian Christian and Tom Griffiths.

If you’d like to get notified when interesting content gets published here, consider subscribing.

Further reading that might interest you: How To Really Understand Statistical Significance and How To Perfectly Predict Improbable Events.

If you would like to support me as an author, consider contributing on Patreon.

Street Science

Explore humanity's most curious questions!

Sign up to receive more of our awesome content in your inbox!

Select your update frequency:

We don’t spam! Read our privacy policy for more info.