From Euclid to AI · 2026 Edition

History of Algorithms
The Art of Computation

Algorithms are the invisible engines of civilisation – from the first recorded method in ancient Greece to the deep learning models that power today's AI. This timeline traces the breakthroughs that shaped logic, mathematics, and computing.

📜 The Evolution of Algorithms

A chronological journey through the most influential algorithms in history

~300 BCE

Euclid's Algorithm

The oldest known algorithm – a method for computing the greatest common divisor (GCD). It appears in Euclid's Elements and is still used in modern cryptography.

# Euclid's algorithm (Python)
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a
~240 BCE

Sieve of Eratosthenes

An efficient algorithm to find all prime numbers up to a given limit. It remains one of the most elegant and widely taught algorithms.

# Sieve of Eratosthenes
def sieve(n):
    primes = [True] * (n+1)
    primes[0] = primes[1] = False
    for i in range(2, int(n**0.5)+1):
        if primes[i]:
            for j in range(i*i, n+1, i):
                primes[j] = False
    return [i for i, p in enumerate(primes) if p]
~825 CE

Al-Khwarizmi's Arithmetic

The Persian mathematician introduced the decimal positional number system and the algorithms for addition, subtraction, multiplication, and division. The word "algorithm" derives from his name.

Legacy His work laid the foundation for modern algebra and algorithmic thinking.

~1202

Fibonacci's Liber Abaci

Introduced the Hindu–Arabic numeral system to Europe and described the famous Fibonacci sequence, which has recursive algorithmic properties.

# Recursive Fibonacci
def fib(n):
    if n <= 1: return n
    return fib(n-1) + fib(n-2)
~1669

Newton–Raphson Method

An iterative algorithm for finding successively better approximations to the roots of a real-valued function. It is foundational in numerical analysis.

1736

Eulerian Path – Seven Bridges of Königsberg

Leonhard Euler's solution to the Königsberg bridge problem laid the groundwork for graph theory and algorithmic graph traversal.

1805

Fast Fourier Transform (FFT)

Gauss developed the FFT, but it was later popularised by Cooley and Tukey. It revolutionised signal processing and digital communication.

1837

Babbage's Analytical Engine

Charles Babbage designed the first general-purpose computer, with algorithms stored on punched cards. Ada Lovelace wrote the first algorithm intended for implementation on a machine.

1945

Merge Sort – John von Neumann

The first recursive sorting algorithm. It uses divide-and-conquer to achieve O(n log n) time complexity, and remains a fundamental algorithm in computer science.

# Merge sort (conceptual)
def merge_sort(arr):
    if len(arr) <= 1: return arr
    mid = len(arr) // 2
    left = merge_sort(arr[:mid])
    right = merge_sort(arr[mid:])
    return merge(left, right)
1956

Dijkstra's Algorithm

Edsger Dijkstra's algorithm for finding the shortest path in a graph is the backbone of modern navigation systems.

1959

Quicksort – Tony Hoare

One of the most widely used sorting algorithms, with average-case O(n log n). It uses a pivot and partitioning, and is a classic example of randomised algorithms.

1972

RSA Cryptosystem

Rivest, Shamir, and Adleman invented the first public-key cryptography algorithm, enabling secure communication over insecure channels. Based on the difficulty of factoring large integers.

1986

Simulated Annealing

A probabilistic optimisation algorithm inspired by metallurgy. Used in many fields to find approximate solutions to complex problems.

1986

Backpropagation (popularised)

The algorithm that made deep learning possible – it efficiently computes gradients in neural networks. It enabled the AI revolution.

1994

Shor's Algorithm

A quantum algorithm that factors integers exponentially faster than classical algorithms, threatening RSA cryptography.

1996

Grover's Algorithm

Provides a quadratic speedup for unstructured search, one of the foundational quantum algorithms.

1997

Deep Blue – IBM

The first computer to defeat a reigning world chess champion (Garry Kasparov). It used a brute-force search algorithm with extensive pruning.

1998

PageRank – Google

Larry Page and Sergey Brin's algorithm transformed the web by ranking pages based on link structure – the heart of Google's early success.

2012

AlexNet – Convolutional Neural Networks

AlexNet won the ImageNet competition, kickstarting the deep learning revolution. Its algorithm – backpropagation with GPU acceleration – became the standard for image recognition.

2016

AlphaGo – DeepMind

The first AI to defeat a world champion in the board game Go. It combined Monte Carlo Tree Search with deep neural networks, demonstrating the power of reinforcement learning.

2017

Transformer Architecture

The "Attention Is All You Need" paper introduced the Transformer, which underpins GPT, BERT, and modern large language models.

2019

Quantum Supremacy – Google

Google's Sycamore processor performed a calculation in 200 seconds that would take the world's fastest supercomputer thousands of years. Quantum algorithms are rewriting the limits of computation.

2023

GPT-4 & Large Language Models

Transformer-based models achieved human-level performance on many reasoning tasks, demonstrating the power of scale and attention mechanisms.

2026

Future of Algorithms

Quantum algorithms, neuromorphic computing, and bio-inspired algorithms promise to solve problems that are intractable today. The history of algorithms is still being written.

Advertisement

🏛️ Ancient Algorithms

Before computers, algorithms were mathematical recipes

📏

Euclidean Algorithm (c. 300 BCE)

The oldest known algorithm – still used today in cryptography. It computes the GCD of two integers.

🔢

Sieve of Eratosthenes (c. 240 BCE)

A simple and efficient way to generate primes. Its core idea – marking multiples – appears in many modern algorithms.

🔄

Babylonian Method for Square Roots

An iterative algorithm to approximate square roots, essentially the Newton–Raphson method, used 4000 years ago.

📐

Pythagorean Theorem (c. 500 BCE)

While not an algorithm per se, the theorem inspired algorithmic methods for solving geometric problems, such as distance calculations.

These ancient algorithms were often expressed as step-by-step procedures for solving specific mathematical problems. They were the precursors to the formal algorithms we study today.

⛪ Medieval & Renaissance Algorithms

From Al-Khwarizmi to the birth of algebra

📖

Al-Khwarizmi (c. 825)

His book "Al-Jabr" gave algebra its name and introduced systematic methods for solving linear and quadratic equations. The term "algorithm" is a Latinisation of his name.

🧮

Fibonacci's Liber Abaci (1202)

Introduced the Hindu–Arabic numeral system to Europe and described the famous Fibonacci sequence, which has recursive algorithmic properties.

📜

Blaise Pascal's Mechanical Calculator (1642)

One of the first mechanical devices designed to perform arithmetic algorithms, paving the way for programmability.

🔭

Kepler's Laws of Planetary Motion (1609–1619)

While not an algorithm, Kepler's work involved iterative computations that were later formalised as numerical methods.

During the Middle Ages, algorithms were primarily used in commerce, astronomy, and mathematics. The Renaissance saw the birth of mechanical computation, setting the stage for the modern computer.

💻 The Modern Era (19th–20th Century)

Algorithms meet the machine

📟

Babbage's Analytical Engine (1837)

Charles Babbage designed the first general-purpose computer, with algorithms stored on punched cards. Ada Lovelace wrote the first algorithm intended for implementation on a machine.

🔐

Enigma & Turing (WWII)

Alan Turing's bombe machine and the algorithms that broke the Enigma code saved millions of lives and laid the foundations for computer science.

📊

Dijkstra's Algorithm (1956)

Edsger Dijkstra's algorithm for finding the shortest path in a graph is the backbone of modern navigation systems.

🧬

Genetic Algorithms (1970s)

John Holland's work on evolutionary computation introduced algorithms inspired by natural selection, used in optimisation and AI.

📈

Gradient Descent (1847, rediscovered in ML)

Originally introduced by Cauchy, gradient descent became the workhorse of machine learning for optimising model parameters.

🧠

Perceptron (1958)

Frank Rosenblatt's perceptron was the first algorithm for training neural networks, setting the stage for modern deep learning.

The 20th century saw a rapid acceleration in algorithm development, driven by the emergence of electronic computers and the need for efficient data processing.

🧠 AI & Quantum Algorithms (21st Century)

From machine learning to quantum supremacy

🤖

Backpropagation (1986, widespread use)

The algorithm that made deep learning possible – it efficiently computes gradients in neural networks. It enabled the AI revolution.

⚛️

Shor's Algorithm (1994)

A quantum algorithm that factors integers exponentially faster than classical algorithms, threatening RSA cryptography.

🔮

Grover's Algorithm (1996)

Provides a quadratic speedup for unstructured search, one of the foundational quantum algorithms.

🌐

PageRank (1998)

Larry Page and Sergey Brin's algorithm transformed the web by ranking pages based on link structure – the heart of Google's early success.

📈

Gradient Boosting (2000s)

Algorithms like XGBoost and LightGBM have become the gold standard for structured data competitions, powering many of today's predictive models.

🧠

Transformers & Attention (2017)

The "Attention Is All You Need" paper introduced the Transformer architecture, which underpins GPT, BERT, and modern large language models.

🧩

Reinforcement Learning (Deep Q-Networks, 2013)

DeepMind's DQN algorithm demonstrated that deep neural networks could learn to play Atari games from raw pixels, opening a new field of AI.

🧬

AlphaFold (2020)

DeepMind's AlphaFold algorithm solved the protein folding problem, a breakthrough in biology and drug discovery.

The Future

Quantum algorithms, neuromorphic computing, and bio-inspired algorithms promise to solve problems that are intractable today. The history of algorithms is still being written.

📊 Key Algorithms by Era

A quick reference to the most significant algorithms and their impact

AlgorithmYearDomainImpact
Euclid's Algorithm~300 BCENumber TheoryGCD, cryptography
Sieve of Eratosthenes~240 BCENumber TheoryPrime generation
Al-Khwarizmi's Algebra~825 CEMathematicsSystematic solving of equations
Newton–Raphson Method~1669Numerical AnalysisRoot finding
Eulerian Path (Seven Bridges)1736Graph TheoryGraph traversal
Gauss–Jordan Elimination~1810Linear AlgebraSolving linear systems
FFT (Cooley–Tukey)1965Signal ProcessingDigital signal processing
Quicksort1959SortingEfficient sorting
Dijkstra's Algorithm1956GraphShortest path
RSA1977CryptographyPublic-key encryption
Backpropagation1986Machine LearningNeural network training
PageRank1998WebSearch engine ranking
Transformer (Attention)2017NLPLLMs, GPT, BERT
Shor's Algorithm1994QuantumInteger factoring
AlphaFold2020BioinformaticsProtein folding prediction

🧩 Algorithm Design Paradigms

Classic strategies that have stood the test of time

⚡

Divide and Conquer

Break a problem into smaller subproblems, solve each recursively, and combine the results. Examples: Merge Sort, Quicksort, Binary Search.

📈

Dynamic Programming

Solve problems by breaking them into overlapping subproblems and storing intermediate results to avoid recomputation. Examples: Knapsack, Longest Common Subsequence, Fibonacci (memoized).

🎯

Greedy Algorithms

Make the locally optimal choice at each step in the hope of finding a global optimum. Examples: Dijkstra's algorithm, Huffman coding, Interval Scheduling.

🌿

Backtracking

Systematically search for solutions by trying possibilities and undoing them when they fail. Examples: N-Queens, Sudoku solver, Maze generation.

🧬

Evolutionary Algorithms

Inspired by natural selection, these algorithms evolve solutions over generations. Examples: Genetic Algorithms, Evolution Strategies.

⚛️

Quantum Algorithms

Leverage quantum mechanical effects to solve problems faster than classical computers. Examples: Shor's algorithm, Grover's algorithm.

💼 Classic Algorithmic Problems

Timeless challenges that have driven algorithm research

🗺️

Travelling Salesman Problem

Find the shortest possible route that visits each city once and returns to the origin. NP‑hard, with applications in logistics and DNA sequencing.

🎒

Knapsack Problem

Given a set of items with weights and values, determine the most valuable subset that fits in a knapsack of fixed capacity. Classic dynamic programming problem.

🧩

N-Queens Problem

Place N queens on an NxN chessboard so that no two queens threaten each other. A classic backtracking problem.

🌐

Graph Coloring

Assign colors to vertices of a graph such that adjacent vertices have different colors. Used in scheduling, register allocation, and map coloring.

🔗

Longest Common Subsequence

Given two sequences, find the longest subsequence common to both. Used in bioinformatics (DNA alignment) and version control (diff).

📦

Bin Packing

Pack objects of different sizes into a minimum number of bins of fixed capacity. Applications in shipping, cloud computing, and memory allocation.

📅 Algorithms in Everyday Life

You use algorithms dozens of times a day without realising it

🗺️

Navigation (GPS)

Dijkstra's algorithm and its variants calculate the shortest path between two points, considering traffic and road conditions.

📱

Social Media Feeds

Machine learning algorithms rank posts based on your interactions, ensuring you see the most relevant content.

🔐

Encryption & Security

RSA, AES, and other cryptographic algorithms protect your online transactions and private messages.

🎵

Music & Video Recommendations

Collaborative filtering and deep learning algorithms suggest songs and movies tailored to your taste.

📧

Spam Filtering

Naïve Bayes and other classification algorithms detect spam emails with high accuracy.

📸

Face Recognition

Convolutional neural networks (CNNs) power the face unlock on your phone and security systems.

The Algorithmic Mindset

Understanding algorithms helps you think systematically – breaking problems into steps, optimising for efficiency, and designing robust solutions. This skill is invaluable in tech, but also in business, law, and everyday decision-making.

🧠 Test Your Knowledge

How well do you know the history of algorithms?

Loading question...

There are 10 questions. Each correct answer scores 1 point.

📚 Further Reading

Dive deeper into the world of algorithms

📘

Introduction to Algorithms (CLRS)

The definitive textbook on algorithms, covering design, analysis, and implementation.

📗

The Art of Computer Programming (Knuth)

Donald Knuth's monumental work on the fundamental algorithms of computing.

📕

Algorithms to Live By

A fascinating exploration of how computer science algorithms can inform everyday decision-making.

🌐

Khan Academy – Algorithms

Free interactive courses covering classic algorithms and data structures.

🗣️ Learner Voices

No comments yet — your voice starts the conversation.

Advertisement