A Short Story of Algorithms: Defined, Simplified, Applied, and Critiqued
How algorithms have become ubiquitous in every day life
Algorithms are now a huge part of our everyday lives — they are ubiquitous in everything we do.
Still, for many, the word algorithm strikes fear of pages-long formulas involving complex mathematics.
This does not apply to many algorithms that we use in every day life.
Let’s take a deeper look at algorithms — how to define, how to simplify, how to apply, and how to critique the algorithms we find all around us.
What is an Algorithm?
By definition, an algorithm is:
A set of defined steps structured in a way to process instructions to produce an output
In the English language, the term algorithm can be traced back to the 12th century. According to Miyazaki (2012) the works of an Arabian mathematician (al-Khwarizmi) were translated to Latin and given the term algorism, the method of performing written elementary arithmetic such as addition, deletion, and shifting of numbers.
Revolutionary at the time, these basic operations form the foundation of later computing processors as being derived from a system not of ten states, but of two (0 or 1). These two states are then shifted, added, deleted and moved.
With the advent of higher-level programming languages (Algol 58, Algol 60), the notion of algorithms spread through the computational community. By the mid 20th century, the term “algorithm” was being used to define the logical steps of “new” computer languages for computer programmers:
Algorithm = Logic + control
The logic refers to “what needs to be done”, the control refers to “how to do it”.
Mathematical formulas are the “traditional” form of an algorithm — they are precise mathematical calculations that take inputs, require calculations, and produce outputs.
Computers have become algorithm-processing machines — processing well beyond the capacity of the human mind. We are now inundated, augmented, penetrated and mediated by software-enabled systems, all composed of algorithms.
In short, they cause things to happen.
But algorithms are not always composed of complicated mathematical calculations.
Sometimes they are quite simple, and maybe even tasty.
A Simple Algorithm
Let’s take a look at two simple algorithms that I have applied more than once in my every day life.
1. Growing Tomatoes
I decided I wanted to grow some tomatoes. Having never done this before, how did I go about doing this successfully?
I found (or developed) a step-by-step process:
Use a large pot or container with drainage holes in the bottom.
Fill the pot with loose, well-draining soil.
Plant one tomato plant (or seed) per pot (with a stake)
Place the pot in a sunny spot with 6 to 8 hours of full sun a day.
Keep soil moist by adding water.
This process is an example of a simple algorithm.
2. Completing an Ironman
For years, I competed in Ironman triathlons (8 in total). To complete an Ironman, I needed a very detailed training plan (an algorithm).
Before the advent of smart watches and training software (pre year 2000), my algorithm looked something like this:
I used to derive (design) my training plan (my algorithm) from a book called the Triathlete’s Training Bible (by Joe Friel). It was (still is) a fantastic source of pre-made formulas and ideas to generate the desired output (finishing the race). I would pore over this resource to design my 6-month long algorithm.
All algorithms, both computer and non-computer, follow the same steps:
Input-process-output
Once my algorithm was developed, I was ready to provide the input— me.
The process of the algorithm would last 6 months, culminating with the Ironman race.
The output of this algorithm was the result of the actual Ironman race time.
Now if the output was not what I “expected”, for example, the dreaded DNF (did not finish), I have the ability to iterate (yes, I was sadistic enough back then to do this).
I would go back and refine the algorithm.
Back in the old days this involved a manual re-design with paper and a pencil. And I did it meticulously - to some success. On the fourth iteration of my algorithm, I qualified to go to the Ironman World Championships in Hawaii.
These days, in 2024, it is much easier to refine my Ironman algorithm:
I can ask my Garmin smart watch to create, and manage, the algorithm for me based on my current level of fitness and my training volume. There is no need anymore for manual algorithm adjustments.
Great! This is fantastic, and so much easier.
But what about if I don’t reach my goals with this new algorithm? What if the output is a DNF?
Is it the algorithms fault, or is it the input? How do I know what needs to be changed or adjusted? Was it me, or was it the training plan?
A Few Issues With Algorithms
Algorithms are not infallible — they may have mistakes (bugs, coding errors, etc). The performance of algorithms can also have side effects and unintended outcomes.
Poor Input Data
For example, poor input data can lead to weak (or incorrect) outcomes. If I continue with the training plan algorithm example, if I am not performing the workouts properly, or not doing them at all, the outcomes may be weak.
This would not be an unexpected outcome. BUT, what if me, as the input, performed brilliantly for all my workouts, and the outcomes were still very weak. What to do now? Was it the algorithm that was at issue? The input was fine, right?
If I created and managed this algorithm myself, I can go over it carefully and think about where it can be adapted and refined. Algorithms can have mistakes (bugs, coding errors, etc).
But I can’t do this with Garmin’s algorithm.
Black Box Algorithms
Garmin’s training is an example of a black box algorithm. The inner workings are not known, and there is nothing I can do computationally to correct this algorithm.
Many algorithms used today are black box algorithms. We use them without knowing how the outputs are created. This can be worrisome.
Ontogenic Algorithms
Algorithms are ontogenic, meaning that they are in various states of development — not fixed in nature. Where the algorithm is at in the development process determines the functionality. This can lead to unexpected results.
Algorithmic Bias
Algorithmic bias can occur when an algorithm produces systematically prejudiced results due to assumptions made in the design process.
For example, a facial recognition system trained predominantly on light-skinned faces that performs poorly on darker skin tones. This type of bias stems directly from the lack of diversity in the training dataset.
In Summary…
As algorithms have become even more ubiquitous in our daily lives, it is useful to have an understanding of their definition, their origin, and how they assist day-to-day in solving the problems around us.
More and more, algorithms that we used to solve in our minds are now being solved for us. This provides us more ease in daily life, but there are some issues that accompany this ease.
Having a better understanding on how and why algorithms are designed can help us to avoid unintended side effects and outcomes.
Critical analysis and feedback ultimately leads to more robust algorithm design.
Thank you for reading.
RESOURCES
Kitchin, R. (2017) Thinking critically about and researching algorithms, Information, Communication & Society, 20:1, 14–29.
Kitchin, R., & Dodge, M. (2011). Code/space: Software and everyday life. Cambridge: MIT Press.
Miyazaki, S. (2012). Algorhythmics: Understanding micro-temporality in computational cultures. Computational Culture, Issue 2.