Algorithm

/ˈæl.ɡə.rɪð.əm/ · Noun · Development

Definitions

  1. An algorithm is a finite, well-defined sequence of steps or rules that takes an input, performs computation, and produces an output. Algorithms are the foundation of all software: every program, from a search engine to a mobile app, relies on them to process data and make decisions. Common categories include sorting algorithms (quicksort, mergesort), searching algorithms (binary search), graph algorithms (Dijkstra's shortest path), and dynamic programming techniques. Algorithm design focuses on correctness, efficiency, and clarity. Performance is measured using Big O notation, which describes how an algorithm's time or space requirements grow as input size increases. Choosing the right algorithm can mean the difference between a program that finishes in milliseconds and one that takes hours. The study of algorithms is central to computer science education and technical interviews, where candidates are expected to analyze tradeoffs between approaches and optimize for real-world constraints.

    In plain English: A step-by-step recipe that a computer follows to solve a problem, like sorting a list or finding the shortest route on a map.

    Example: "The sorting algorithm we chose matters: quicksort averages O(n log n) but degrades to O(n²) on nearly-sorted data."

Etymology

~820 CE
Persian mathematician al-Khwarizmi writes 'Kitab al-Jabr,' whose Latinized name becomes 'algorithm.'
1936
Alan Turing and Alonzo Church formalize the concept of an algorithm through Turing machines and lambda calculus.
1960s
Donald Knuth's 'The Art of Computer Programming' systematically catalogs algorithms, establishing the field.
2010s
'Algorithm' enters everyday language through social media feeds, recommendation engines, and public debates about algorithmic bias.

Origin Story

The Word Named After a Persian Mathematician

The word 'algorithm' derives from the name of Muhammad ibn Musa al-Khwarizmi, a 9th-century Persian mathematician, astronomer, and scholar working in Baghdad's House of Wisdom. His treatise on arithmetic, when translated into Latin in the 12th century, introduced Hindu-Arabic numerals to Europe, and the Latin transliteration of his name, 'Algoritmi,' became the word for systematic calculation procedures. For centuries, 'algorithm' simply meant performing arithmetic with these numerals. The modern computing meaning, a step-by-step procedure for solving a problem or performing a computation, crystallized in the 20th century. Alan Turing's 1936 paper 'On Computable Numbers' formalized what an algorithm could and could not do, establishing the theoretical limits of computation. Donald Knuth's monumental series 'The Art of Computer Programming,' begun in 1962, established the rigorous analysis of algorithms as a core discipline. Knuth defined an algorithm as having finiteness, definiteness, input, output, and effectiveness. Today, algorithms govern nearly every aspect of digital life. Search algorithms determine what information you find, recommendation algorithms shape what you watch and buy, and routing algorithms direct your navigation. The word has even entered everyday language, often carrying undertones of opaque, powerful systems making decisions that affect human lives.

Coined by: Named after Muhammad ibn Musa al-Khwarizmi (9th century)

Context: Latin translation of al-Khwarizmi's works, 12th century; modern computing usage formalized in the 20th century

Fun fact: Al-Khwarizmi's other famous book, 'Al-Jabr,' gave us the word 'algebra.' One mathematician's name and one book title gave English two of mathematics' most fundamental terms.

Related Terms