Algorithm
An algorithm is a finite, precisely defined sequence of steps for solving a problem or carrying out a computation.
An algorithm is a recipe exact enough for a machine to follow. The US National Institute of Standards and Technology's dictionary of algorithms defines it simply as a computable set of steps to achieve a desired result. Each step must be unambiguous, and the procedure must finish. A classic example is Euclid's algorithm, described in the Elements around 300 BC, for finding the greatest common divisor of two numbers: repeatedly replace the larger number with the remainder after dividing it by the smaller, and stop when the remainder is zero.
The word comes from a person. Around 825 AD the Persian scholar Muhammad ibn Musa al-Khwarizmi wrote on arithmetic with Hindu-Arabic numerals. Latin translations in the 12th century rendered his name as Algoritmi, giving the medieval word algorism for calculation with those numerals. The modern English spelling, influenced by the Greek word for number, appears by 1596.
Mathematicians made the idea precise in the 1930s while working on David Hilbert's question of whether every mathematical statement could be decided mechanically. Alonzo Church's lambda calculus in 1936 and Alan Turing's machines of 1936 and 1937 gave formal models of what an effective procedure is, and they remain the foundation of computer science.
In machine learning it helps to separate the algorithm from the model. The training algorithm, such as gradient descent, is a procedure written by people. The model is what that procedure produces from data: a set of learned parameters. Every step of the algorithm is known, yet the behaviour of the trained model was never written down by anyone, which is why phrases such as the algorithm decided can hide where a decision actually came from.
In everyday speech, the algorithm usually means the recommendation system that ranks posts on a social network or videos on a streaming service. Such systems are mostly machine learning models that rank items by predicted engagement or other signals, and there is no single correct recommendation, only choices about what to optimise for. When a story blames or credits an algorithm, the useful questions are which system, trained on what data, aiming at which goal, and who chose that goal.
It is a set of clear, step-by-step instructions that solves a problem and then stops. A recipe, a method for long division and the steps a sat-nav uses to find a route are all algorithms. Computers run algorithms written as programs. An algorithm is a procedure that people write, such as a method for training a neural network. A model is the product of running a training algorithm on data, made of learned parameters that nobody set by hand. The algorithm is fully specified; the model's behaviour has to be discovered by testing it. It comes from the name of the Persian scholar al-Khwarizmi, who wrote on Hindu-Arabic arithmetic around 825 AD. Latin translations of his work rendered his name as Algoritmi, which became algorism and later algorithm in English. It refers to the recommendation system that decides which posts, videos or adverts each user sees and in what order. There is no single correct ranking, so what users see reflects the goals the platform has chosen to optimise for.Common questions
What is an algorithm in simple terms?
What is the difference between an algorithm and an AI model?
Where does the word algorithm come from?
What does the algorithm mean on social media?
Search for "what is an algorithm", "Euclidean algorithm" or "algorithm vs machine learning model" for clear explanations. Computer science textbooks, university course notes and references such as NIST's Dictionary of Algorithms and Data Structures are dependable. For stories about social media algorithms, look for platform transparency reports and independent research rather than descriptions written by the platforms' marketing teams.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.