💡Hairdressers and algorithms
In the process of writing any book, many ideas and stories fall by the wayside. Not because they aren’t insightful or emotive but because the thesis veers from its original course. A favoured tale may become a detour.
And so, I wanted to share with members of Exponential View one of the cuts from my book Exponential (The Exponential Age in the US and Canada). It is a tale about one of the first computing machines built, and helps us think about the nature of many of the AI systems of today.
This is a fantastic story that has currency in today’s contemporary debates, even if I couldn’t squeeze it into the book. I hope you enjoy it.
The coiffeurs of revolutionary France
The French Revolution was in full swing. Two years after the mob had stormed the Bastille, carrying out the head of governor Bernard René Jourdan on a pike, the rulers of the nascent Republic needed to finance the state. And to pay for that public machinery, the government coffers needed filling. But tax reform had been a key pillar of the French Revolution. Out went the tax exemptions from the nobility and clergy and much of the punishing monetary load on commoners. The former revolutionaries, now governors, introduced less regressive taxes levied on the wealthy owners of land.
Of course, to raise such cadastral taxes would demand detailed knowledge of who owned what parcels of property across the Republic. Compiling an accurate database of estates for the Land Register was an arduous task that fell to the Republic’s renowned chief engineer, Gaspard Clair François Marie Riche de Prony. (Although, rumour has it that De Prony took on this Sisyphean mandate so that he could stay in Paris. Otherwise, he may have been forced to take up the role of Chief Engineer to Perpignan, in the outlying region of the Oriental Pyrenees.)
Figuring out the taxable area of each estate from geographic surveys would require a lot of geometry and, in particular, trigonometry. Fortunately, de Prony was an accomplished statistician, with a fondness for trigonometry.
In the days before electronic calculators, trigonometric calculations would be completed using mathematical tables of ‘logarithms’. A logarithm is a mathematical function that describes the number of times you need to multiply a number to get a given number. How many twos multiply to get 16? The answer is four (two times two times two times two) so the logarithm to base two of 16, in this case, is four.
There is a particular set of logarithms called natural logarithms which were relevant for De Prony. In the case of natural logarithms, the question you are asking is how many times do you need to multiply the mathematical constant, e (which is approximately 2.718281828...) to get a particular number.
Logarithms do speed up trigonometric calculations but calculating those natural logarithms was difficult. The full set of logarithmic tables De Prony needed was too large and complex for a single person, however talented, to complete.
Divide and conquer
De Prony was also a student of the Scottish economist, Adam Smith. Some years earlier, Smith had published The Wealth of Nations. The Scot had detailed his ideas of organizing work and breaking hard problems into simpler, more basic, steps: the division of labour.
De Prony was inspired. How could he take this incalculably large task and turn it into many smaller tasks? Post-revolutionary France did not have enough well-trained mathematicians to calculate a full set of logarithmic tables in the short time available. Could he break this massive body of tasks into simpler and simpler tasks that less skilled human calculators could manage?
Finding the logarithm for any given number required several steps to be performed precisely in sequence. Some of the steps were simple, some more complex. The whole kaboodle, a set of sets that when carried out together calculates a more sophisticated function is also known as an algorithm. De Prony was using an algorithm to calculate logarithms. An algorithm is simply a set of instructions designed to perform a task.
This process of division of labour had helped De Prony slice the huge task (build a full set of logarithmic tables) into smaller and smaller ones (the simple algorithm to calculate each log value). Now he would need to find the specialist workers, akin to Adam Smith’s wire straighteners and tip grinders, to undertake each of those well-defined tasks.
De Prony found a ready supply of such meticulous workers, people who could be trusted with precision and accuracy, yet lacked the full rigour of mathematical training. They were the hairdressers to the aristocracy, renowned for producing bouffant, extravagant hairdos. The pouffes, which they ornamentally coiffed, were now out of fashion, and “the abandonment of powder for hair and face, had plunged [the hairdressers] into misery.” De Prony seized on this unemployed cohort and the “artists were converted into elementary arithmeticians executing only additions and subtractions.”
But it was enough.
The hairdressers were given these simple steps, just adding and subtracting. These would create intermediate outputs, which would, in turn, be collected and despatched to the few trained mathematicians available. These mathematicians would perform more complex functions on the aggregates and pass them up to a final compilation step which would serve up the requisite logarithm. De Prony even put in simple checks – what computer scientists would today call ‘checksums’ – for his calculators to perform to make sure there were no mistakes made.
Ultimately, the entire system created the “Tables de Prony”, an oeuvre too difficult for all but the best mathematicians, and too large for the available number of such talents. The whole group acted like a single unit, a machine to produce logarithmic tables. It was a kind of “artificial intelligence”, a designed and constructed system that could process information usefully. De Prony’s work would go on to inspire Charles Babbage’s Difference Engine, sometimes thought of as the first mechanical computer.
De Prony didn’t have access to digital, or even mechanical computers. But his system of organisation, this machine made of humans and guided by an algorithm, encapsulated many of the aspects of the defining technology of the Exponential Age, artificial intelligence. At its essence, it was an artificial machine that accelerates the transformation of information and allows us to apply that transformed information more productively.
An engineered system needs a very clear objective, which can be articulated unambiguously and whose performance can be checked. (In this case, the algorithms were proven mathematically and there were built-in checks to ensure lower-orders of calculations were completed effectively.)
These types of systems need some form of reductionism and design on the part of the builder. Specifically, many of the well-established methods for calculating log tables involved multiplication or, worse, division. De Prony designed approaches using the simpler algebraic operations of addition and subtraction.
De Prony calculated the log tables to as many as 29 decimal places. It is questionable as to why he did that. Was it grandstanding? Was it to make the task larger than it seemed so that he could delay his posting to the hinterlands of France?
An artificial machine like this is not magic, it is a designed system built-in with the limitations of its design. In this case, this machine was very narrow, really only very good at calculating logs accurately. Something to bear in mind when we think about ‘AI’ systems today.
I loved this story and how it helps us think about modularity, reduction, and computing machines. It also reminds us that technologies are designed systems, tied to the ambition, capabilities and location of the creators. It’s also just a great story. Unfortunately, it didn’t make the cut into my final edit.
My book is available now. For those who have ordered it already, logistics willing, it will be with you soon.
Margaret Bradley, ‘Gaspard-Clair-François-Marie Riche de Prony (1755-1839), Constructeur de ponts’, Bulletin de la Sabix. Société des amis de la Bibliothèque et de l’Histoire de l’École polytechnique, 48, 2011, 5–13. The value e is also used in a particular exponential function, y=e^x, which is used in understanding compounded growth. It is an important tool in the analysis of exponential growth.
Adam Smith, The Wealth of Nations: An Inquiry into the Nature and Causes of the Wealth of Nations, Wordsworth Classics of World Literature (Ware, Hertfordshire: Wordsworth, 2012), pp. 9–21.
The History of Mathematical Tables: From Sumer to Spreadsheets, ed. by Martin Campbell-Kelly, Mary Croarken, and Raymond Flood (Oxford ; New York: OUP Oxford, 2003), pp. 108–111.
I. Grattan-Guinness, ‘Work for the Hairdressers: The Production of de Prony’s Logarithmic and Trigonometric Tables’, IEEE Annals of the History of Computing, 12.3 (1990), 177–85.