Stories of algorithms: the “instructions” that change our lives

8 January 2019 | Written by Pietro Crovari

We increasingly hear about algorithms and their applications have now entered our lives

What do have in common the assembly of the bedside table bought at IKEA, the preparation of spaghetti carbonara and the artificial intelligence that regulates self-driving vehicles? There are some instructions to follow. Even the computer works for instructions. Each program we use, in fact, is a sequence of small steps that tell the program what to do and allow us to perform a series of actions: from a simple mathematical operation to allow us to go into space. Every time we use a computer or smartphone, we interact with some of these instructions and some are very fascinating and important in our lives.

This is the starting point for the Impactscool Magazine column “Stories of algorithms”.

Why are the instructions so convenient? If we think about it carefully, the instructions have three main advantages. First, they allow us to break down the problem we want to tackle, of any nature and complexity, in a series of simpler sub-problems requiring less effort. This process of decomposition can be done repeatedly, to generate a sequence of problems to be solved sufficiently simple and immediate. Secondly, the instructions create a common language between the owner of knowledge and anyone who wants to use it, which allows transmitting and passing on the process in question in a simple and effective way. Third, and perhaps most important, if a sequence of instructions is correctly formulated, allows the same result to be obtained each time they are correctly executed. What we call mathematical instructions are algorithms.

Algorithms are the foundation of information technology. We must always remember that the computer is a “stupid” machine. He can do only one thing, but he can do it very well: following the instructions. All the programs that we know, from the game on the smartphone to the control system of bank accounts, are nothing more than a series of more or less complex lines of instructions. The operation is always the same: an algorithm takes in Input of data from the outside, performs calculations, and releases a result as output. Inputs and outputs can be of any type, textual data, numbers, images, audio tracks, or any other imaginable data.
This is where computer scientists come into play. Their job is just this: having a problem to solve, inventing an algorithm to solve it, translating it into a programming language, a sequence of commands that computer has to understand. Fortunately, many different problems can be abstracted to more common generic problems, and for this reason the scientific community has concentrated efforts to find the simplest and most effective solution possible.
For every algorithm, the good programmer has to worry about two main aspects. On the one hand, it must be correct, that is it must always give predictable results, whatever the content of the input data, it must not produce an unexpected output, otherwise it creates a bug that can have disastrous consequences. On the other hand, it must be efficient, that is, it must perform the calculations in the fewest possible operations, and requesting the least possible number of resources. For example, if Google only took a few seconds to produce the result of a search it would be unusable. If the autopilot of a self-driving car had a reaction time in the order of seconds, the consequences would be fatal.

The algorithms are among us. Is studying and inventing new algorithms just a quirk of the scientific community? No, absolutely. Some algorithms are the main asset of multi-billion dollar companies, such as Google’s search algorithm or the code behind Facebook.
Behind many of the most famous algorithms are hidden very interesting stories, stories of power, intriguing paradoxes, and solutions so simple as to be disarming. This column wants to give life to these stories, proposing to tell what lies behind the algorithms that we use unconsciously every day. We will find out how they work, and why they work like that. We discover that behind seemingly simple operations hides a whole universe, while behind seemingly very complex problems there are actually simple and elegant solutions. We will discover that information technology is not just a series of codes, but also a true science of its own, fascinating and rich in history.

Pietro Crovari
Pietro Crovari

Pietro Crovari graduated in Computer Engineering in Genoa, where he continued with the Master's Degree. After 4 months at the Georgia Institute of Technology in Atlanta for Research Intern, he currently works as a Research Fellow at the Milan Polytechnic. He has worked for four years at the Genoa Science Festival where he fell in love with the world of Scientific Disclosure. He loves two things in life: his studies and the chance to spread his knowledge. Enthusiastic, incurable optimist, he faces every day with a smile and the desire to learn something new!

read more