Algorithms: Recipes for success that transform the world

That’s Maths: We exploit algorithms every day without even knowing it

The impact of computing on society is ever increasing. Web-based commerce continues to grow and artificial intelligence now pervades our lives. To make wise choices, we need to understand how computers operate and how we can deploy them most constructively. Listen to any computer scientist and soon you will hear the word “algorithm”.

A computer program is an implementation of an algorithm, a set of rules that precisely describes a sequence of operations. In an algorithm, each step must be precise, with no vagueness or ambiguity. This mechanical characteristic means that it can be implemented on a computer and the results are dependable and reproducible.

What is an algorithm?

In plain language, an algorithm is a recipe. To make a cake, we need ingredients and instructions. In computer jargon, the ingredients are the inputs and the instructions are the computer program or algorithm. The output is a cake. Usually the inputs and outputs for a computer algorithm are in numerical form. Good algorithms start from a really clever idea, and the best of them have changed our lives.

The word algorithm itself comes from the Persian mathematician Muhammad ibn-Musa al-Khwarizmi, whose name was Latinised to Algorithmi. Al-Khwarizmi worked in the House of Wisdom in Baghdad around 820AD. Of course, the concept of an algorithm is much older. The Greek mathematician Eratosthenes devised an algorithm for finding prime numbers, and Euclid had another one, for finding the greatest common divisor of two numbers.

READ MORE

Web searches

We exploit algorithms every day without being aware of it. When we perform a web search or pay a bill online, we are running algorithms. Smart data compression algorithms enable us to download and store large files, accessing photographs, videos and online music efficiently. Often, the size of files can be reduced by 90 per cent or more without loss.

Search engines have profoundly changed our lives. There are billions of documents on the world wide web. Finding information in an ocean of data is akin to the needle in a haystack problem.

The PageRank search algorithm was revolutionary and had profound commercial consequences. This ranking algorithm provided rapid access to the most relevant information and was a major factor in enabling Google to outstrip competitors and gain market dominance.

Online security

Strong encryption is essential to ensure that information that is politically, financially or commercially sensitive cannot be accessed inappropriately. Access to secure websites (the address beginning with https instead of http) uses a secure protocol known as key exchange to ensure that information is encrypted and cannot be read by interlopers. Similar encryption algorithms enable digital signatures to guarantee the source of information.

Computers far out-perform humans on many tasks. A large file can be encrypted in seconds, a chore that might take a person months. Likewise, a search for a word in a large text is instantly achieved by the machine. Until recently, humans were far better at tasks such as pattern recognition: identifying faces, voices or other patterns. That is changing fast.

Automatic chess-playing machines were crude and plodding, and easily beaten. Now they are unbeatable, even by a grand master. Medical diagnosticians, language translators and aircraft pilots all require years of study and practical experience.

Algorithms for high-quality language translation, automatic driving and control systems are emerging that challenge our prowess in these tasks and in many more domains.

Peter Lynch is emeritus professor at UCD School of Mathematics & Statistics, University College Dublin – he blogs at thatsmaths.com