What Algorithms Do
Hello World

What Algorithms Do

Mathematics professor Hannah Fry – who also wrote The Mathematics of Love – provides a worthy, basic overview of algorithms and their interactions with people.

Step by step, computers evaluate your data. Step by step, organizations decide your fate. Together, those steps build algorithms, rational recipes that seem to promise a reasonable world. But that world will never see the light of day, according to Associate Professor in the Mathematics of Cities at University College London (UCL) Hannah Fry – who also wrote The Mathematics of Love and The Indisputable Existence of Santa Claus. Fry’s theme is that algorithms work great, up to a point. An effective algorithm, she argues, must welcome human input.

Step by Step

Algorithms guide the behavior of people and machines, for better or for worse.

Hello World is a reminder of a moment of dialogue between human and machine. Of an instant where the boundary between controller and controlled is virtually imperceptible.Hannah Fry

Any list of instructions on how to get something done, step by step, is an algorithm. Usually the steps are mathematical and a computer executes them.

Many algorithms use rules to make decisions. Machine learning algorithms don’t need explicit rules. Their training teaches them to associate certain inputs with certain outputs. After that, they can produce output by themselves.

Valuable Data

People who provide data to companies don’t give it away because they trust them. People expect something in return, and companies oblige, because personal data is their lifeblood.

In 1993, the British supermarket chain Tesco became one of the first companies to gather customer data in return for reward points. That data enabled the company to link sales results to customers’ names and addresses.

The next step involved using algorithms to suggest to people what they might buy. Specialized companies, such as Palantir, buy data and build profiles of consumers. Many countries lack regulations to protect people’s privacy. The General Data Protection Regulation (GDPR) in Europe, for example, regulates when companies may gather data and what they can do with it. But even when such laws are in place, implementation proves difficult. 

Consumers should always beware companies asking them for information.


Medical diagnosis often requires spotting a pattern in an image or in patient data. Algorithms recognize patterns tirelessly and quickly.

Visual recognition algorithms can’t contain rules about what things look like. Engineers/programmers feed them data, such as an image. Each time the algorithm learns a correct answer – for example, whether an image is of a dog – the algorithm adapts its settings to fit the answer. Then it can recognize the next image of a dog.

An algorithm seeking a medical problem, such as cancer cells in an image, needs to be sensitive and specific, so it doesn’t flag problems where none exist.

Humans judging medical images are generally specific, but insufficiently sensitive. Algorithms are vice versa. Thus, algorithms can look for suspect images and people then decide whether the suspicion is justified.

Fry asks: If an algorithm could give infallible medical advice, whose interests should it serve? The patient at hand, the insurers, society in general? The advice it gives will differ depending on its priority.


Fry tells how, in 2004, the defense research agency DARPA organized a race for autonomous cars that ended in failure for all 106 entries. One year later, five cars succeeded in driving the requisite 132 miles to the finish. Driving a car seems a straightforward task, but presents difficulties for a computer program, which must parse almost infinite variables.

The program must recognize roads, for example, even though roads vary widely. It must also recognize what is not a road. Obstacles can be dangerous or negligible, and sensors may contradict each other.

ALVINN’s neural network had used the grass as a key indicator of where to drive. As soon as the grass was gone, the machine had no idea what to do.Hannah Fry

Driving algorithms need detailed real-world knowledge, such as information about the typical behavior of other drivers or of children near a road. They must know when they can sensibly break the rules of the road.

As manufacturers make their cars increasingly autonomous, they provide drivers with increasing levels of assistance. Drivers can’t be expected to stay alert, Fry underscores, if they aren’t actually driving. Ideally, people would drive while algorithms look for problems, sound alarms and in extreme cases, intervene.


Tracking where crimes occur can help police prevent further crimes. For example, a successful burglary increases the chances that the same house, or nearby houses, will be hit again. Police want algorithms to predict crimes and some use “predictive policing,” through the proprietary PredPol algorithm.

Police can use predictions to warn people and to patrol intensively in places where crime is likely, though Fry warns this can be problematic. More crime reports in a certain neighborhood lead to more patrols, which stigmatizes the area.


Algorithms can create music and images. But how can programmers tell them to make something good? And if the algorithm succeeds, is its output art?

Trying to use numbers to latch on to the essence of artistic excellence is like clutching at smoke with your hands.Hannah Fry

Algorithms can predict people’s preferences, based on their past choices. Netflix, for example, uses this to suggest movies and tv shows to viewers. Other algorithms compose original music. These “genetic algorithms” are “bred” to produce new algorithms, which compete to make the most “beautiful” music, poems or paintings. Their products are not very innovative, but that’s sadly true of most human art, too. Algorithms make people reconsider what comprises art, and appreciate what it means to be human.

Abandoning algorithms is no solution. Scientists should create algorithms in a way that enables people to contest their design and address their errors. Algorithms only work well shoulder to shoulder with humans.

Descriptions and Prescriptions

Hannah Fry’s witty, somewhat dated overview of the universe of algorithms will best suit those with little knowledge of the subject seeking to understand how algorithms affect their lives. Fry provides broad, superficial coverage that reads like an extended magazine article for general interest readers. And that is her virtue; Fry offers an encyclopedia of algorithms’ intrusions into and interactions with human experience, and offers basic, workable solutions to the problems those interactions will likely bring in the future.

Share this Story
Show all Reviews