How do algorithms run my life?

Open navigator

1. Like magic

From internet shopping to the airport runway, algorithms are everywhere in modern life. They are behind the success of tech giants like Google, and have saved lives by matching kidney patients with donor organs. As if by magic these invisible, mathematical procedures give us fast, accurate answers to a range of complex problems.

At its simplest level an algorithm is a series of instructions, like a flowchart or a food recipe, which can be followed to solve a specific problem. The incredible variety of complicated tasks our computers can carry out is down to algorithms. As computers have become more central to our lives, so algorithms have become increasingly important.

So how do these silent step-by-step procedures, most often expressed in computer code, affect my life?

2. WATCH: Speedy shopping

One everyday task algorithms have transformed is online grocery shopping. Marcus du Sautoy meets Paul Clarke, Ocado's director of technology, in their warehouse where the daily movement of two million items are controlled by algorithms.

Clip from The Secret Rules of Modern Living: Algorithms (BBC Four).

3. Powering our daily lives

Searching

There are over a billion websites in the world, yet using search engines like Google and Bing gives us results in fractions of a second. This is only possible because of algorithms. They have transformed our lives by sorting through the vastness of the internet and giving us relevant, instantaneous results.

PageRank is one such algorithm. It works by giving each webpage a value based on how many other websites link to it, and on how well ranked those other sites are themselves. Good algorithms are worth millions to tech companies – the PageRank algorithm was important to Google's success. And it’s algorithms that work out the 'you may also enjoy' suggestions on sites like Amazon, Youtube and Netflix. They are closely guarded secrets as they are the drivers of these websites’ success and profitability.

Flying

Operating a big airport is made more efficient using algorithms. Making sure hundreds of planes, and thousands of passengers are in the right place at the right time, not to mention flight staff, fuel, meals and luggage, has become too complex for humans. But computers can handle the job using algorithms. They are also helping out in airport security using algorithmic face detection.

Making money

Talented mathematicians now work in the finance sector creating powerful algorithms. Traditionally, investment decisions were based on research and intuition, but now algorithms are driving them. In 'algorithmic trading', an algorithm is plugged directly into an electronic market and trading happens without any human intervention. In a changing and complex marketplace algorithms can predict where the most money can be made, faster and more accurately than any human being.

4. The future of algorithms

The future is bright for algorithms as their use expands to permeate every corner of our lives. But could they become so advanced they take over what we see as particularly human tasks?

Art of writing

Could algorithms make us all artists? They have been used to create music, writing and art which experts can’t differentiate from originals. Journalism algorithms have already been used to generate news stories.

Saving lives

The power of algorithms is already saving lives by matching kidney donors with recipients, but soon they could help neurosurgeons map brain tumours, making treatment more accurate and efficient.

The hard sell

We use face detection algorithms every day when we tag someone on our mobile phones, but now these algorithms are being developed for real-time, tailored marketing. The idea is, as we walk towards a billboard, specific advertisements are displayed. A camera and face detection algorithm allows a computer to accurately infer your race, age, gender or even your identity!

Algorithms are here to stay. We may be blissfully unaware of them, but as computers become more powerful and the underlying maths becomes more advanced, their influence on all our lives – from setting insurance premiums to controlling driverless cars – will be inescapable.

5. What problems can algorithms solve?

Algorithms cannot be used to solve every problem, click below to find out what problems remain unsolved.

Halting problem

Can an algorithm work out whether a computer program will finish at some point or run forever, causing the computer to freeze?

Answer

No

In 1936 computer scientist Alan Turing proved that this algorithm cannot exist. So there's no way to consistently predict if a computer will freeze.

Music composition

By breaking down music composition into a set of rules, can a computer use an algorithm to create music?

Answer

Yes

A study in 2010 showed that music students struggled to differentiate between genuine Chopin music and algorithm-generated music.

Travelling Salesman problem

If you give a computer a list of locations, is there an efficient algorithm to work out the shortest possible round trip that goes once through each location?

Answer

No

Approximate algorithms exist, but to be certain the computer has to calculate all possible routes. With many locations this becomes a very long calculation.