A 13th-Century Enumeration Algorithm, Ignored for 700 Years

Get the Tech newsletter
Daily tech — startups, AI labs, chips, the launches that shape the next decade. Free.
- Abraham Aboulafia (1240–after 1291), a Kabbalist, prescribed a recursive algorithm for enumerating all n! permutations of an n-letter word in his work Or ha-Sekhel, built on a single repeated operation: rotate the first letter to the end at every scale.
- The procedure generates every permutation exactly once and returns to the start, with no added complexity as words grow longer — a structure a computer scientist would recognize as a recursive algorithm, per the author.
- For three letters, Aboulafia specifies two explicit rules: a mirror rule (the sequence must end on the reverse of where it began) and "hold the head" (keep the leading letter fixed until its block is exhausted).
- Until the 17th century, Aboulafia was the only person in any tradition to give a rule-based ordering of permutations — every other Kabbalist simply tabulated them — and the only later independent inventors of such a method were 17th-century English change-ringers, working in bell towers.
- Aboulafia's exact ordering coincides with a permutation algorithm published in 1984 by mathematician Shimon Zaks, which was built on a move that a young Bill Gates studied in his only scientific paper.
Why it matters: It redates a recursive permutation algorithm by about 700 years — tying the world's first rule-based method for traversing permutation space to a 1240s Kabbalist rather than to modern mathematics — and his ordering matches a 1984 Shimon Zaks algorithm linked to Bill Gates's earliest scientific work.



