What’s an algorithm? Definition and examples

An algorithm is a predefined procedure that solves problems or tasks step by step. While algorithms are found in almost all areas of everyday life, they are vital to computer science and software programs. Well-known examples include the Google algorithm that determines the ranking of search results, and the newsfeed algorithms of Facebook or Instagram.

A brief definition of algorithms

Algorithms are predefined, finite sequences of actions used to solve problems. In other words, they’re used to perform specific tasks using fixed sequences of steps or by converting input values into output values. The steps are predetermined and executed in a sequence. Algorithms are independent of a specific language and therefore work with and without machines. But algorithms aren’t just found in mathematics and computer science. They can be found all around us, from the lights in road traffic to an elevator calling function.

6 properties an algorithm needs to have

While algorithms used to be arbitrarily defined, today it’s possible to identify an algorithm according to six properties:


Each step in the sequence of actions of an algorithm must be effective and unambiguous. This means that each instruction must make sense and be appropriate for the application in order to obtain a result or output value.


Actions and individual steps must be executable and logical.


The goal of an algorithm is to convert input data into output data. This is only possible if the process is finite. Algorithms must take on a finite form, e.g. by a limited number of characters or a limited memory.


The executable, logical and finite individual steps must lead to an output in a finite time frame. The sequence should be goal-directed and not end in an endless loop without result.


The same inputs under the same conditions must lead to the same outputs. Only then can algorithms guarantee an application and problem solution to work reliably.


In the step sequence of the algorithm, there’s always just a single way to solve the problem. Subsequent steps are thus clearly defined by the intermediate results and aren’t random.

What’s the importance of algorithms?

Algorithms used to play a central role in the 19th and 20th century, especially in mathematics and logic where they were popular topics of debate. Today, algorithms can be found in almost every area of daily life. Usually, however, we’re unaware of the algorithms that make certain applications possible, such as the assembly line at the checkout, our navigation devices or the ranking mechanism of a search engine like Google.

In computer science, algorithms form a central foundation for programming. Anyone looking to learn programming quickly realizes that almost every program uses algorithms to perform a task. To put it simply, every program is an algorithm.

However, not every algorithm is a program, because algorithms are independent of Internet programming languages. They can also be formulated in “natural” language, represented in mathematical formulas, or executed non-mechanically. The origin of the term harks back to the 8th century, deriving from the Khorezmian polymath and mathematician al-Chwarizmi, abbreviated from Abu Jah’far Muhammad ibn Musa al-Chwārizmī.

Applications for algorithms

Algorithms are neither limited to languages and methods nor to specific areas of application. Since their utility lies in problem solving, they represent a specific course of action and procedure that works with different variables and sequences of steps. This could include route calculation for navigation devices, recommendation engines in online stores, real-time advertising for intelligent, real-time online advertising, translator-apps and computer simulations.

Particularly, within big data and artificial intelligence (AI) algorithms continue to gain in importance. The digitalization and presence of smart technologies such as smartphones, smartwatches and AI in cars and the smart home means that data is rapidly increasing.

This requires computers and servers which have the necessary corresponding computing power, but also algorithms to organize, evaluate, process or apply data volumes. Sensors in automated vehicles are an example of this. They trigger vehicle actions based on recorded data. Mathematical computer algorithms also play a decisive role in the creation of climate simulations.

Search engines and pathfinding in computer science would also not be possible without algorithms. So-called crawlers are used to search, analyze and index web content. Crawlers catalog and index data based on a search engine algorithm. In turn, the ranking and findability of search results depends on optimal cataloging. The search engine algorithm therefore serves as an orientation for efficient search engine optimization.

Examples of algorithms

New algorithms and practical applications are added daily. The following examples illustrate some existing algorithms in practice.

Google algorithm

Google takes a fraction of a second to display search results when you enter search terms or queries into the search bar. This is made possible by Google’s search engine algorithm that lists results according to relevance, keywords, linking structure, readability of the content and security. However, the exact algorithm and its detailed workings remain a secret.

Cooking recipes

Simple cooking recipes embody the basic principle of an algorithm. The ingredients can be understood as inputs that lead to the result in a specific and fixed sequence of actions. Cooking sites that make it possible to calculate the amount of ingredients based on servings and number of people use algorithms.

Body Mass Index

The body fat percentage of a person can be calculated using the body mass index. Here, the body weight is set in relation to the body height. The inputs are a person’s weight and height, and the output is the BMI. The BMI indicates whether a person is of normal weight, underweight, overweight or obese.


The so-called application-specific integrated circuit can be understood as an algorithm built into the hardware. These are non-variable circuits in hardware that perform a specific function. An example of this is a graphics processor.

Data mining

The search, collection, analysis, cataloging and indexing of data is also called data mining. Algorithms, AI and machine learning are used here.

Mining algorithms of cryptocurrencies

In cryptomining, transactions with cryptocurrencies are documented, verified and posted in the blockchain. As part of the process, crypto miners solve transaction-related algorithms similar to number puzzles. Solving the puzzles verifies transactions.

Neuronal networks

A neural network is an area of deep learning. Deep learning algorithms are used to simulate and reproduce the functions of the human brain. These can be used for various functions such as language assistance, translation, protection against cyberattacks or text generation.

We use cookies on our website to provide you with the best possible user experience. By continuing to use our website or services, you agree to their use. More Information.