Math · 1906
Markov Chains
The math behind language models was born in a feud over free will, and was first tested on a Pushkin poem.
In early 1900s Russia, the mathematician Pavel Nekrasov argued that the law of large numbers required independent events, and drew a theological conclusion: since human actions follow statistical regularities, they must be independent acts of free will. Andrey Markov, a fierce rival, found the argument sloppy and set out to demolish it.
In 1906 Markov published his counterexample: chains of events where each outcome depends on the one before, yet long-run statistical regularities still emerge. Dependence, he showed, does not destroy predictability. The mathematical object he created, a system that hops between states with probabilities determined only by the current state, now bears his name.
In 1913 he gave the idea its first real-world test, and chose literature. Working by hand through the first 20,000 letters of Pushkin's verse novel Eugene Onegin, he tallied how often vowels followed consonants and vice versa, showing that text could be modeled as a probabilistic chain. It was arguably the first statistical language model.
The 'memoryless' property, where the future depends only on the present state, turned out to describe an astonishing range of systems: shuffled cards, queues, genetic drift, and the weather. Claude Shannon built on Markov's letter-counting in his 1948 founding paper of information theory, generating increasingly plausible pseudo-English from chains of letters and words.
Markov chains quietly power the modern internet. Google's PageRank models a web surfer hopping between pages as a Markov chain, and ranks pages by where the surfer spends time. Markov chain Monte Carlo methods made large-scale Bayesian inference feasible, and Markov decision processes underpin reinforcement learning.
Every large language model predicting the next token from context is playing a vastly scaled-up version of Markov's game with Pushkin. A century-old argument about free will became the foundation of machines that write.
From history to production
We turn these ideas into working systems
The same techniques, shipped into your stack with evals, observability, and measurable ROI.