Question

What is an algorithm, in the computing sense?

Vault Verified
Curated Intelligence
Definitive Source
Answer

An algorithm is a finite sequence of unambiguous steps for solving a problem or completing a task. That is the entire definition, and it is considerably more mundane than popular usage implies.

What it requires:

Definiteness — each step unambiguous.

Finiteness — it terminates.

Input and output — takes something, produces something.

Effectiveness — each step is basic enough to be carried out.

A recipe is a reasonable analogy, and so is long division, a knitting pattern, or the procedure for finding a name in a phone book. None involves computers. Algorithms predate them by millennia — Euclid's method for finding the greatest common divisor is around 2,300 years old, and the word derives from al-Khwarizmi, the ninth-century Persian mathematician.

Classic examples in computing: sorting a list, searching for a value, finding the shortest route through a network, compressing a file, encrypting a message.

How algorithms are compared: by correctness — does it always produce the right answer — and by complexity, how time and memory requirements grow with input size. Two algorithms solving the same problem can differ enormously in efficiency.

Why the popular usage differs. "The algorithm" in everyday speech means something specific and different: the ranking and recommendation systems of social media and search platforms. In that usage it carries connotations of opacity, unaccountability and manipulation.

That usage is not wrong — those are algorithms — but it is one narrow application, and it has coloured the word to the point where "algorithmic" reads as sinister. A sorting routine is an algorithm and nobody finds it threatening.

The more useful distinction for the modern debate is between:

Explicitly written algorithms, where a person specified every rule and can explain why an output occurred.

Machine-learned models, where behaviour was derived from data and frequently cannot be explained step by step — which is where the accountability concerns genuinely arise.

Heuristics are related: rules that usually work without guaranteeing the best answer.

Related Questions