In 1998 two students, Larry Page and Sergey Brin, studying for PhDs in computer science at Stanford University, California founded a new tech company called Google. The company was based on an algorithm they had invented and incorporated into a new search engine—the Google browser. Less than two decades later Google is valued at well over $100 billion.

So what exactly is an algorithm and how can it be so incredibly valuable? Page and Brin’s algorithm was for ranking web pages; boring and tedious, perhaps, but incredibly useful if you want to sell advertising space on the internet. We tend to think of algorithms as repetitive procedures carried out step by step by computers until the end point of the calculation is reached. This is certainly true. Algorithms are simple-minded and especially suited to implementation in mechanical calculations, so computer programs are built around mathematical algorithms. But humans were employing algorithms long before computers were invented. At school we learn the ‘three Rs’, reading, writing and a handy set of algorithms known as arithmetic.

**An Astrolabe for Little Lewis**

Chaucer gives us a vibrant and authentic record of life in the late 14^{th} century. In 1391 Chaucer wrote a manual known as *A Treatise on the Astrolabe* for ten-year old Lewis who he addresses as ‘Lyte Lowys my sone’. Chaucer refers in passing to the *augrim* numbers on the astrolabe. These strange sounding numbers are none other than the every day numerals that we are introduced to in our early days at school. If we are being specific today we refer to them as Hindu-Arabic numerals to distinguish them from Roman numerals and other number systems. Roman numerals remained in common use throughout Europe for at least a century after Chaucer’s time. Today, they have little more than a decorative purpose, but they are still sometimes used in dates and inscriptions. Chaucer’s word augrim is actually a variant of the modern word algorithm. We can see why he used this term by trying some arithmetic using Roman numerals. What is V times XX or X times LXXVIII?

Our notation is so ingrained in the way we think that we seldom reflect on just how well it is suited to its task, but good notation is a critically important part of mathematics. In modern numerals the two sums look much simpler: 5 x 20 = 100 and 10 x 78 = 780. The characters ‘LXXVIII’ and ‘78’ represent exactly the same number. Taken at face value they have exactly the same meaning and have indistinguishable mathematical content. But, on the other hand, they exist in completely different contexts and the change in notation makes all the difference in the world. In Roman numerals the answers to the sums are C and DCCLXXX. Multiplication of Roman numerals is an arcane and mysterious art. Without converting into our familiar ‘augrim’ numerals and back again we would struggle to reach the correct answers. It is indisputable that the Hindu-Arabic numeral system is much better suited to performing arithmetical operations and this is why Chaucer knew them as augrim numbers.

**On the Art of Calculation with Hindu Numerals**

The word algorithm (or augrim) derives from al-Khwarizmi, the surname of the great 9^{th} century Persian mathematician Muhammad ibn Musa al-Khwarizmi whose books were translated into Latin in the 12^{th} century. Latin manuscripts are often referred to by their opening two words. The Latin translation of al-Khwarizmi’s book on the art of Hindu arithmetic was known as *Dixit algorizmi*, which simply means ‘and so said al-Khwarizmi’.

Prior to the adoption of Hindu-Arabic numerals the only practical way to perform arithmetic was to use a counting board. A series of lines were inscribed on the counting boards to indicate units, tens, hundreds and so on, and stones were positioned on the lines to represent numbers and then manipulated as they would be on an abacus. These stones or pebbles were known in Latin as calculi, and this is the origin of our words calculation and calculus. (It is also the origin of the chemical name calcium and it is why it is not only mathematicians who suffer from a build up of calculus on their teeth.) By Chaucer’s time these stones had become known as augrim stones. Tokens known as jetons, similar in purpose to gambling chips, were made for use on the counting boards. For several centuries there was a rivalry between those who preferred their accountancy performed on counting boards and those who preferred to perform their arithmetic on paper.

Given the clear advantages of Hindu-Arabic numerals, it is surprising how much time passed before they were universally adopted. This woodcut of Madame Arithmetica by Gregor Reisch illustrates the two methods of accountancy. Modern numerals were regarded with suspicion for many years. For instance, in 1299 the city of Florence issued a decree banning their use. This was partly because they could be altered, so a 0 might become a 6 or a 9 by the addition of a flourish. Even two centuries later in the late 15^{th} century the Mayor of Frankfurt ordered his officials not to use them.

**The Exchequer**

In the UK, the Ministry of Finance is known as the Treasury or the Exchequer and the Head of the Treasury is the Chancellor of the Exchequer. The Exchequer is named after the counting table that was used to perform calculations for taxes and goods in medieval times.

The *Dialogus de Scaccario* (Dialogue concerning the Exchequer) written in the late 12th century by Richard FitzNeal describes the operation of the Treasury. Calculations were performed on a large 10 foot by 5 foot table with a raised lip around its edges four fingers in height so that no counters would fall off. On the table was placed a black cloth overlaid with a chequer-pattern of green squares each about the size of a hand, with columns representing pounds, shillings and pence. The table resembled a chess board, known in French as échiquier, hence the name Exchequer for the government office of the Treasury. The Exchequer then came to refer to the twice yearly meetings at Easter and Michaelmas when government financial business was transacted.

With a bit of luck the modern Exchequer will be able to employ some sophisticated algorithms to calculate the tax liabilities of Google and then enforce the payment of a fair proportion of their profits to the UK Treasury.

Bonfire of the Tally Sticks

During the Middle Ages debts were recorded on tally sticks. The tally sticks were notched and then split lengthways, so the two parties could keep matching halves of the record. The example shown here records a debt owed to the rural dean of Preston Candover in Hampshire of a tithe of 20d each on 32 sheep, amounting to a total sum of £2 13s 4d.

Tally sticks were used by the Exchequer to record tax receipts for seven centuries from the time of King Henry I in around 1100AD until they were finally abolished in 1828. Six years later an order was issued to burn the vast quantities of tally sticks that had accumulated over the centuries. The stove in which the blaze was lit set the chimney on fire, leading rapidly to a conflagration that grew until most of the buildings of the Houses of Parliament were destroyed. The blaze over the Thames was captured by the greatest painter of the age Joseph Mallord William Turner.

The Houses of Parliament were rebuilt in a grand gothic style designed by architects Charles Barry and Augustus Pugin. They were not completed for several decades; the final touches being added in 1870, some years after the deaths of both leading architects.

**Further Information**

For more about numbers and Google see my recent post: The Googleplex.