RoskildeUniversity When is the algorithm concept pertinent – and when not? Thoughts about algorithms and paradigmatic examples, and about algorithmic and non-algorithmic mathematical cultures

Until some decades ago, it was customary to discuss much pre-Modern mathematics as “algebra”, without agreement between workers about what was to be understood by that word. Then this view came under heavy ﬁre, often with no more precision. Now it has instead become customary to classify pre-Modern practical arithmetic as “algorithmic mathematics”. In so far as any computation in several steps can be claimed to follow an underlying algorithm (just as it can be explained from an “underlying theorem”, for instance from proportion theory), this is certainly justiﬁed. Traditionally, however, historians as well as the sources would speak of a rule . The paper ﬁrst goes through some of the formative appeals to the algebraic interpretation – Eisenlohr, Zeuthen, Neugebauer – as well as some of the better argued attacks on it (Rodet, Mahoney). Next it asks for the reasons to introduce the algorithmic interpretation, and discusses the adequacy or inadequacy of some uses. Finally, it investigates in which sense various pre-modern mathematical cultures can be characterized globally as “algorithmic”, concluding that this characterization ﬁts ancient Chinese and Sanskrit mathematics but neither early second-millennium Mediterranean practical arithmetic (including Fibonacci and the Italian abbacus tradition), nor the Old Babylonian corpus.

For Karine hard-working scholar who always finds time for friendship

Algebra -a parallel and perhaps illuminative case
There is an old tradition for connecting algebra with geometry -beginning with al-Khwa ¯rizmı ¯, author of the very first extant presentation of the discipline which at least etymologically developed into the algebra of Early Modern and ultimately modern times.Neither this beginning nor the later repetitions of the process at mathematically higher levels can be objected to -one of the ways mathematics grows is by producing bridges or mergers. 1 A different matter is the application of algebra as a historiographic tool for interpreting other types of mathematics.This is a much younger occurrencefamous early instances are August Eisenlohr's and Moritz Cantor's approach to the problem solutions of the Rhind Mathematical Papyrus, and Hans Georg Zeuthen's notion of a Euclidean-Apollonian "geometric algebra".
Eisenlohr does not speak about "algebra", but he does refer [1877: 5 and  passim] to some of the Rhind Papyrus problems as "equations". 2He also speaks of the h as the "unknown magnitude in first-degree equations", and renders the corresponding problems as symbolic first-degree equations -for instance +x = 19 (pp.60f).In the same vein he refers to a "common denominator" (p. x 7 8 and passim).In short, Eisenlohr uses the mathematics he knows, and which he supposes his readers to know (rather simple school mathematics) as an explanatory tool, without pursuing the question whether this corresponds to the conceptualizations of the Middle Kingdom writer.Though slightly more cautious ("we shall write [these problems] as equations"), Moritz Cantor follows Eisenlohr on both accounts in volume I of his Vorlesungen [1880: 33].What Eisenlohr had not claimed explicitly was however read as if it had been by Léon Rodet, who published an article on "The purported algebra problems in the manual of the Egyptian calculator" in [1881].Basing himself on a large quantity of parallel examples in Arabic, Sanskrit, Hebrew and Persian as well as philological reading of the papyrus, he argued that the method applied by the Egyptian calculator was the simple false position 3 and the related trick to 1 At most, those who distinguish "pure" not from "applied" but from "impure" in the realm of mathematics can object -as do Michael Fried and Sabetai Unguru [2001: 24].
2 Gleichungen.Here, as generally if no translator is identified, the translation is mine. 3Rodet points out that Cantor had recognized on p. 36 the use of this method in another add fractions by taking them of an adequate bloc extractif. 4Rodet reproaches "the two learned professors from Heidelberg" to let "a writer from the eighteenth century BCE [...] think and act too much as we think and act today". 5euthen's appeal to the notion of algebra was quite different.As a mathematician and a geometer centrally involved in advanced research he understood algebra not simply as the technique of equations but, on one hand, as a way to deal with "general magnitudes, rational as well as irrational", on the other "using means different from ordinary language in order to make its procedures manifest [anschaulich] and inculcate them in memory".In this sense, he characterized Elements II.1-10 as a "geometric algebra", saying that "in Euclid's times it had developed so far that is could manage the same tasks as our algebra, as long as this does not go beyond expressions of the second degree, an area which it also, as it will turn out, filled out in its application to the conic sections.This application corresponds to the application of our algebra in analytic geometry" [Zeuthen 1886: 7, Zeuthen's emphasis]. 6Analogous function is also what Zeuthen speaks about in the preface (p.IX), where ancient geometry is claimed "not to have been developed for its own sake only but also to have served as a general theory of magnitudes, similarly to what algebra does today".
On page 12 Zeuthen states that Elements II, propositions 1-10 can be written problem of the papyrus.
as follows: 1. a(b+c+d+...) = ab+ac+ad+... , 2. (a+b) 2 = (a+b)a+(a+b)b , . . .but this is merely a symbolic shorthand, the discussion afterwards returns to geometry.All in all, it would be difficult to object to what a careful reading finds in the text, as long as one accepts Zeuthen's analytical aim -even though one might of course claim that he should rather have been interested in vegetarian cooking, in athletics or in ancient ways of thought without trying to elucidate them by means of structural parallels.
Yet, as experience teaches, readers are not always careful, and many of Zeuthen's twentieth-century readers have got from his pages that Euclid was really making second-degree algebra. 7One example, to judge from the almost identical formulas probably borrowing directly from Zeuthen, is Morris Kline  [1972: 65].According to Kline, The first ten propositions of Book II [of the Elements] deal geometrically with the following equivalent algebraic propositions.Stated in our notation some of these are: 1. a(b+c+d+... ) = ab+ac+ad+... ; 2. (a+b)a+(a+b)b = (a+b) 2 ; . . .Nothing here goes directly against Zeuthen's caution, nor is it however repeated.Primarily, according to Kline, Euclid's text deals with algebraic propositions, the geometric explanation (which is given) comes afterwards, and is followed again by symbolic algebraic calculations.
Of particular consequence was Otto Neugebauer's adoption of Zeuthen's notion.His monumental three-volume Mathematische Keilschrift-Texte [MKT] from 1935-1937 uses algebraic symbolism abundantly, but does this in order to explain why procedures are correct, not as explanation nor a fortiori as purported interpretation of underlying patterns of thought.It also speaks a dozen times of certain methods as algebraic, or arithmetisch-algebraisch -apparently mainly to contrast them with geometric methods.Similarly to Cantor, and different than Zeuthen, Neugebauer seems not to feel it necessary to explain the word except negatively and by reference to the appearance of purely "formal" manipulations (if sides are added to areas, it cannot be geometry but must be algebraic -vol.II, p. 64).
But MKT was meant to be only a presentation of sources with the necessary explanations, not to draw general consequences (III, p. 79).We might look at Neugebauer's other writings from the epoch -in particular two articles containing "Studies in the History of Ancient Algebra" [1932; 1936].In the former (p. 1) we read that he considers even problems that deal with geometric objects as "algebraic" if only they appear to be based on formal operations with magnitudes.In the latter (p.246), we see that the criterion for this is the addition of inhomogeneous expressions (lengths and areas, workers and days).Moreover, he returns to an idea he had presented in [1934: 68-72]: that ideograms in the mathematical texts could function as mathematical symbols. 8s we see, Neugebauer's reasons to find algebra in the Babylonian texts differed from those of Eisenlohr-Cantor as well as those of Zeuthen; though he is not explicit in this respect, he is probably inspired by recent developments of the field -which will not astonish, he was after all an offspring of the Göttingen environment.But he does not seem to notice that he has changed Zeuthen's understanding -in [1936: 249] he gives him credit for "the fundamental insight that in particular Elements II and VI deal with geometric presentations f properly algebraic problems".
Nor did those general historians of mathematics which an generation later drew on Neugebauer notice that they, on their part, changed the understanding back to that of Eisenlohr when reading his symbolic equations as if they had been paraphrases of the Babylonian texts themselves.9 Apart from Rodet, the first to assail the algebraic interpretations was probably Michael Mahoney [1971], in an essay review of the reprint of [Neugebauer  1934]. 10Mahoney did not object to the idea which Neugebauer had formulated and van der Waerden later developed, namely, that Babylonian numerical "algebra" had inspired (or even somehow been translated into) Greek geometric algebra.Nor was he opposed to seeing the Babylonian approach as "algebraic", even though he would not consider it a genuine "algebra" -that term he would prefer to reserve for the mature type which was "a creation of the seventeenth century -AD" (p.375); the algebraic approach, more or less developed, he saw (p.372) as characterized by use of "a symbolism for the purpose of abstracting the structure of a mathematical problem from its non-essential content"; further, by search for "relationships (usually combinatory operations) that characterize or define that structure or link it to other structures"; finally, by being "a mathematics of formal structures, [...] totally abstract and free of any ontological commitments".11He pointed out that according to Neugebauer's own description the ideographic "symbols" which Neugebauer had found in Babylonian texts "left off right at the point that most clearly characterizes a symbolic algebra" (p.374).
Mahoney praised Neugebauer for pointing out "the continuing existence before, during and after the Greeks of two alternative approaches to mathematics: namely, the algebraic and the geometrical" (p.372), and argued that Greek 10 Formally, priority goes to Árpád Szabó, whose Beginnings of Greek mathematics [1978]  first appeared in German in 1969.However, a criticism based on badly understood secondary reports is hardly to be taken seriously.According to Szabó [1978: 30]  It was Zeuthen who noticed that there are some interesting geometric propositions in Books II and VI of the Elements which would normally be written out as algebraic formulae.From this he concluded that they dealt with "algebraic propositions in geometric clothing", or as he put it -with geometric algebra.Actually, what is "quoted" comes from [Neugebauer 1936] -not p. 45, as one should believe from Szabó's note 20 -the closest we get to a reference -but from p. 49.It has nothing to do with Zeuthen's own work.(The original German passage in [Szabó 1969]  does not pretend to contain quotations, but since Szabó tells on p. 10 to have supervised the work of translation as it progressed, he can probably be held accountable.) One wonders how Szabó can claim (p.30) that Zeuthen "could not furnish satisfactory answers to such questions as whether the early Greeks actually had an algebraic theory" in a book he has never opened.Zeuthen [1886: 2] states unambiguously that the Greeks did not know algebra (... Algebra, welche die Griechen nicht kannten).
geometry could not be characterized as algebraic.Just as Neugebauer (and everybody else) he had forgotten Zeuthen's actual arguments and explications.
Since this is only a prolegomenon, there is no reason to continue the discussion of how algebra was used to characterize or analyze kinds of early mathematics that were not already unquestionably algebraic.It should already be clear that every worker tended to refer to the kind of algebra with which he was familiar -school manipulation of equations, analytic geometry, or adequately interpreted post-Noether algebra.It is no less obvious that even when one worker explained which aspects of the algebraic natural family12 were taken into account, these explanations were not read by others, neither by those who believed to borrow nor from those who objected or rejected (Mahoney being a partial exception, but even he understood Zeuthen through Neugebauer).
Read through the spectacles of the individual worker, his use of the notion of algebra seems acceptable, even though concentration on this aspect may have barred the attention to other facets of the matter -vide the Eisenlohr-Rodet dispute.None the less, since the reading becomes awkward at best when the spectacles of somebody else are applied, one can ask to which extent the tool is useful.Even if we leave out of the question considerations of objectivity (whose meaning is even more unclear than usually when tools and not results are concerned), reasonable intersubjectivity should be a minimal claim.

Algorithms
In recent decades, it has gone out of fashion to speak of algebra in connection with mathematical techniques and theories that are not indisputably connected to the algebraic family -since few have taken the pain to come to grips with the precise interpretations they criticize, "fashion" must be the word.Instead of Mahoney's "two alternative approaches to mathematics: namely, the algebraic and the geometrical", we have got the demonstrative and the algorithmic kinds.Can this be regarded as more fruitful?
At least, the word "algorithm" is much less ambiguous.From the early thirteenth century until the mid-nineteenth, "algorism" (with the Renaissance hypercorrection "algorithm") meant computation with Hindu-Arabic numerals.This it obviously the etymology, but also another instance of the rule that "etymology is the lore of what words no longer mean".The earliest instance of the modern usage or something close to it which I have been able to trace is [Littré 1873: I, 106 The second sense is not too far from Tannery's characterization of Elements II in 1882 as an "algorithme géométrique" (reprint [Tannery 1912: 257]).Neither, of course, have anything to do with the sense in which the word is used by modern mathematicians, informatics professionals and historians of mathematics.But the first, "calculational procedure", clearly has -and it antedates the appearance of electronic computers (programmable or not) by many decades. 13t corresponds to the definition given in a recent textbook [Cormen 2009: 5]: Informally, an algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output.An algorithm is thus a sequence of computational steps that transform the input into the output.
We can also view an algorithm as a tool for solving a well-specified computational problem.The statement of the problem specifies in general terms the desired input/output relationship.The algorithm describes a specific computational procedure for achieving that input/output relationship.
The first to apply the concept to historical material was probably Donald Knuth  in [1972].Using Neugebauer's translations he looked at some Babylonian computations and concluded (p.672), not least because the texts multiply with a factor even when this factor happens to be 1, that they were not just ad hoc calculations but meant as paradigmatic examples of rules (nobody had probably thought otherwise).In his words, they were (thus did not exemplify, represent or instantiate) "general procedures for solving a whole class of problems".He concluded that "the Babylonian procedures are genuine algorithms".
On the other hand he found (p.674) only "straight-line" calculations, without any branching or decision-making involved.In order to construct algorithms that are really nontrivial from a 13 In contrast, the only pre-1950 example offered by the Oxford English Dictionary (Second Edition on CD-ROM, 2009) is a reference to "Euclid's algorithm" from 1938.This concept also appears, as "Kettenbruchalgorithmus", in [Tropfke 1902: I. 65], whereas p. 123 of the same work refers, in agreement with Littré's second interpretation, to "the algorithm of differential and integral calculus", and p. 143 has "algorithm of determinants"."Kettenbruchalgorithmus" is further found in [Cantor 1880: 229, 273]; on p. 612, Cantor explains the modern reference of the word to be "any recurrent calculational procedure that has become a rule".computer scientist's point of view, we need to have some operations that affect the flow of control and in order to find such non-trivial algorithms he had to interpret texts containing repeated interest calculations as if they had contained WHILE ... DO ... instructions.They do not, they are just as linear as the other examples -which indeed is the reason that Knuth can conflate the single example with the algorithm -one unbranched path through a branching flow chart can never be the same as the flow chart itself.14For Knuth, the algorithmic reading was no alternative to the interpretation through algebra, which for him was a given fact.As he saw it, the Babylonian mathematicians were [...] adept at solving many types of algebraic equations.But they did not have an algebraic notation that is quite as transparent as ours; they represented each formula by a step-by-step list of rules for its evaluation, i.e. by an algorithm for computing that formula.In effect, they worked with a "machine language" representation of formulas instead of a symbolic language.
Since then, however, Knuth's article has become the standard reference for the algorithmic reading, stripped of algebra.
The reason for the broad adoption of the algorithmic reading is likely to have little to do with Knuth's work, which has just served as global justification and, precisely, as a standard reference which is cited but not used substantially nor apparently read for the details of the argument (as once Zeuthen).We should rather look to an attitude (more precisely, opposition to that attitude) reflected in this quotation from [Kline 1972: 14]: [The Babylonians] did solve by correct systematic procedures rather complicated equations involving unknowns.However, they gave verbal instructions only on the steps to be made and offered no justification of the steps.Almost surely, the arithmetic and algebraic processes and the geometrical rules were the end result of physical evidence, trial and error, and insight.That the methods worked was sufficient justification to the Babylonians for their continued use.The concept of proof, the notion of a logical structure based on principles warranting acceptance on one ground or another, and the consideration of such questions as under what conditions solutions to problems can exist, are not found in Babylonian mathematics.
Behind this we find dichotomy once more: no longer between geometric and algebraic approach, but between mathematics built on demonstration 15 and mathematics consisting of "rules" based on "physical evidence, trial and error, and insight" and accepted because they work.
This should not in itself be a reason to speak of algorithms instead of rules.As Neugebauer had already pointed out long before Kline wrote [MKT I, 438], views like his are an obvious nonsense, which nobody would set forth who had taken the trouble to work through the full material of Babylonian mathematics.Indeed, this not only shows us that the examples of the single tablet from our series texts are often ordered with the most rigorous technical (sachlich) order [...], which is only made possible by real insight in the mathematical relationships; we also possess a wealth of other texts which prove through explicit calculation that, for instance, the particular biquadratic equations -which are also plentiful in the series textswere solved absolutely correctly.
Whoever is familiar with early mathematical texts of the types teaching by means of paradigmatic examples will also know that many of them regularly explain the reason that something works -not from some axiomatic system but with reference to things the user can be supposed to understand. 16n spite of this, a main reason for adopting the description in terms of algorithms can be seen in this passage from [Acerbi & Vitrac 2014: 31]: In general, the algorithmic approach to mathematics, found in all ancient civilizations (Mesopotamia, Egypt, India, China, Greece) was misunderstood for long, assimilated to an empirical and scarcely rational approach, while instead it belongs to the prehistory of algebra.
15 "Logical structure" is of course a mere buzzword, if any mathematics produced before Russell and Whitehead is to count -Euclid does not build on Aristotelian logic, even though Aristotle's Second Analytic is inspired by geometers' striving for axiomatization.Whether Kline wants to imply axiomatics is unclear, "principles warranting acceptance on one ground or the other" could be meant more loosely.Also unclear is what he means by "insight" -I would guess at some kind of intuitive direct understanding. 16And, reversely: how many of those who use their computer or smartphone to extract a square root understand the algorithm that is used down to the level of machine code?Probably nobody, because of the division of labour between those who create operating systems and those who use them to develop applications.And how many understand it at least at the level of mathematics?Some, of course, but still very few.If anybody, modern users of algorithms are satisfied if they work.Use of present-day algorithms is no more reasoned than blindly complying with rules.This looks more like magic than as an argument.We are not told why "algorithms" should be less empirical or more rational than "rules" (or "rules" more empirical and less rational than "algorithms") -and nowhere in the book is it explained why algorithms should belong "to the prehistory of algebra", which appears to be meant as explanation (mal comprise ... alors que ...).Since practically all the "algorithms" that can be extracted from the problem solutions produced by the mathematical cultures in question (not all the calculation prescriptions, on which below) are "straight-line", as Knuth complained, the gain by speaking of them as "algorithms" instead of "rules" as the sources do themselves (ne ¯pešum, me ¯thodos, regula, etc.) seems to be that it sounds modern, and therefore presumably rational (because we believe to be rational, so help us God!).In short, instead of argument we get political correctness. 17o this, it is true, comes another classical condition for scholarship -that is, patronage (nowadays called "funding").It is certainly easier to find pecuniary support for a project about "algorithms" than for one about "rules".But this condition for our work we may leave aside discreetly.
"Correctness" as well as patronage, so to speak, concern the "context of discovery", even though this context for the "discovery" of algorithms in early texts may not quite be of the kind Hans Reichenbach [1938: 6f] was thinking of when he introduced that concept.It can certainly not be assimilated to that inductive experience which takes up a large part of his deliberations.Irrespective of the reasons for choosing the tool it may still be useful.As I shall argue in what follows, it sometimes is.
Firstly, of course, there are genuine algorithms, those which via their appearance in the algorismus genre gave original fame to the word, and their analogues elsewhere.Karine Chemla has written much about Chinese division and root extraction algorithms, and shown how analysis of their algorithmic structure elucidates the underlying thought -I shall restrict myself to references to her [1987] and [1991].But even though Sacrobosco does not write in a particular "quasi-language designed for the description and use of procedures" (cf.[Chemla 1987: 301]), we also find indubitable non-trivial algorithms in his early thirteenth-century Latin Algorismus vulgaris.Already in the initial teaching 17 Euphemisms and their kind, however, have great power; anybody trying to use "gay" as a synonym for "merry" or "queer" in the sense of "strange" will learn that from the reactions of the audience.In consequence, I shall mostly speak of "algorisms" and not of "rules" in what follows -though only when genuine rules and not mere calculations or examples are concerned.of the addition of two numbers [ed.Curtze 1897: 3], for instance, we find a branching depending on whether the sum of digits is a digitus (<10); an articulus (= 10); or a numerus compositus (> 10).
However, even in such cases one may be led astray by thoughtless application of the algorithm concept.In a recent analysis of al-Ka ¯šı ¯'s and Stevin's extraction of square roots [Aydin & Nuh 2015], the authors find that Stevin's procedure is flawed.What they actually see is that Stevin's paradigmatic example when understood as a straight-line algorithm does not work on al-Ka ¯šı ¯'s example √331781.The reason is simple, and easily guessed by everybody who has worked on the algorithm in school: In the first step, √33 is approximated from below as 5, with remainder 8.In the next step, if the paradigm is followed to the letter, 817 at first has to be divided by 5×20, with result 8.However, the real divisor should then be 108, and 8×108 = 864, larger than 817.Therefore, 8 has to be replaced by 7 (and 8×108 by 7×107 = 749, smaller than 817).Stevin would probably have given the same or a very similar explanation if one of his examples had presented him with this problem.Al-Ka ¯šı ¯instead asks for experimentation to find a number B such that (20×5+B)×B approaches 817 as closely as possible from below.Even unspecified experimentation is hardly to be considered algorithmic in the strict sense, and there is no reason to believe that Stevin would not be aware that his procedure had to be varied adequately to fit cases where mechanical application turned out to be problematic.So, instead of concluding "that Stevin's technique contains some flaws", as the authors do in their abstract, we might claim that the flaws belong with the modern algorithmic reading.
In an essay review of the second edition of Jean-Luc Chabert et al (eds), Histoire d'algorithmes.Du caillou à la puce, Maarten Bullynck [forthcoming] touches at the possibility that the algorithmic reading of early mathematics might give rise to "the same anachronistic misreadings as reading it with algebraic glasses" but surmises that most researchers have used a procedural reading "as an analytical, nearly linguistic tool that helps to foreground particular aspects of old texts, not as a goal per se".Here, "procedural" and "algorithmic" appear to be used synonymously, even though early procedures (like that of Stevin) were probably meant to be more flexible than allowed for by the modern strict meaning of "algorithm" (which is exactly what makes the algorithm concept relevant for electronic computers, and which corresponds to what Bullynck quotes Wu Wenjun for with approval in note 2, namely "mechanized" mathematics). 18n any case, I am afraid Bullynck is too optimistic -the term has become pervasive even in such historiography as does not analyze procedures.
But he has some good examples, and not only such as Chemla's investigations of indubitable algorithms.
One is Jim Ritter's development of a scheme for showing the structure of numerical procedures unambiguously -extracting, so to speak, the algorithm of which the paradigmatic example could be an instantiation; see, for example, [Ritter 2004]. 19For simple calculations, this can be achieved by expression in algebraic letter symbolism; 20 but when matters get complex algebraic formulas easily become ambiguous witnesses of procedural structure.For comparison of calculations, Ritter's schemes are therefore clearly to be preferred.Applying this formalism, he can thus show that the Old Babylonian procedure used for solving (what expressed as algebra becomes) a normalized mixed second-degree problem functions as a sub-routine in the solution of a more complicated problem.Actually, this is not quite true, Ritter's intention to approach the model of present-day algorithms makes him gloss over the circumstance that the Babylonian calculator knows that a doubling outside the embedded procedure and a halving within it will cancel each other.For this reason he omits both steps, while Ritter takes care to use only part of the simple calculation for his subroutine.This does not affect the utility of the scheme, which indeed reveals what goes on if read carefully.But Ritter's article is also of interest in the present context for two other reasons.Firstly, in the discussion of precisely this couple of texts he observes in note 13 (p.198) that the actual meaning of the Akkadian technical term wası ¯tum is a subject of debate into which I do not enter here since it has no bearing on its functional use, the only one pertinent in this particular context. of course part of an educational context in which a procedure is learned through repeated exercise, but where a procedure also becomes more flexible in the hands of a pupil who proceeds through more difficult, intricate or compounded problems.This is true; the meaning of the word is essential for understanding the underlying mode of thought and representation -that the texts deal with cut-andpaste manipulations of squares and rectangles and not with purely numerical operations as once believed by Neugebauer and Thureau-Dangin (and taken over by Knuth).So, Ritter's schemes are explicitly not meant to reveal anything about how the Babylonians understood their mathematics, neither "from the inside" (which was the nature of the operations it performed, and what were they assumed to do, apart from producing numbers?)nor "from the outside" (metamathematically, so to speak21 ).In this respect, Ritter's formalism is a parallel to the equations used by Eisenlohr (quite useful for anybody wanting to get a first understanding of what goes on in the Rhind Papyrus), and objections like those of Rodet to Eisenlohr could be repeated (once again, of course, missing the intention of that which is criticiized).
Secondly, Ritter has some observations about what he wants to express by the word "algorithm".In note 8 (p.197, but to p. 180) he states that By algorithmic I do not mean "merely empirical" or "recipe-style" collections of isolated solutions, a characterization that was once the standard interpretation before the work of Neugebauer, and remains so in a large number of popularizations and on p. 186 he refers to yet another level of the algorithm, more general than that of the calculational techniques or that of the arithmetical operations, the level of method of solution, the choice of strategy of resolution.
That is clearly a non-standard understanding of the word, and goes beyond what can be expressed in Ritter's (or any) schemes; it appears to conflate what is expressed through the schemes and the higher-order analysis which the modern worker may read out of the schemes.In this way it can certainly be maintained that the whole Babylonian and Egyptian endeavour is "algorithmic" -but only on the condition that the non-standard definition is accepted.The parallel offered by Zeuthen's readers demonstrates the dangers inherent in reliance on such particular concepts.
The usefulness of the schemes themselves was demonstrated by Annette Imhausen.She used them to provide a "thick" description (in Clifford Geertz's sense) integrating the form, the substance and the techniques of Egyptian mathematical problem texts [Imhausen 2003: 11f, 191].She points out explicitly that this is only one aspect of the history of Egyptian mathematics, whose embedding in socio-cultural, in particular in administrative context is still waiting, and abstains from general claims about Egyptian mathematics being "algorithmic".

Algorithmic cultures
Above the level determined by the analysis of simple calculations, the notion of algorithms might help us get a fine-grained picture of mathematical culture types, instead of conflating all those mathematical cultures that teach how to obtain a numerical result by means of examples or abstract rules (Mesopotamia, Egypt, India, China, [the pseudo-Heronic corpus from] Greece, according to Acerbi and Vitrac). 22 already referred to the ancient Chinese genuine algorithms for numerical calculation. 23But a look at the Nine Chapters as a whole [ed.trans.Chemla &  Guo 2004] shows a general structure where an abstract rule is set out first, as a counting rod algorithm; afterwards follow concrete examples, which may vary the numerical parameters and the concrete topic but possess the same mathematical structure. 24For example, chapter III (starting p. 282) is stated to deal with distribution weighted according to rank, which is indeed the topic of the first example; but then the topic is varied -the second problem deals with payment according to consumption, the third with customs paid according to possession.Since these are supposed to follow the same computational scheme, it seems justified to speak of a genuinely algorithmic organization (obviously following a straight-line algorithm, which we might as well call a "rule" or "procedure", perhaps corresponding better to Chinese shu).The fourth, however, 22 And, by the way: Why should only these types be algorithmic?Apart from producing a figure and not a number, proposition 1 of Elements I, the construction of an equilateral triangle, is a perfect algorithm.The prescription is followed by a proof, it is true.We may consider that a "comment" field -comments in computer algorithms often serve to explain why steps are pertinent; alternatively, we might see it as belonging at Ritter's more general level. 23My treatment of the Chinese and Indian material is utterly succinct and built exclusively on translations and secondary literature.This is all I need for establishing the contrast.A precise characterization of these two clearly distinct types of algorithmic culture would ask for a very different approach and would be beyond my competence, linguistic (obviously) and otherwise.
expands the mathematics beyond the initial algorithm.A woman is told to weave each day twice as much as the day before, and to have woven in 5 days for 5 chi.Here, the weights are immediately given as 1, 2, 4, 8 and 16, respectively; that is, only that part of the calculation that fits inside the algorithm is specified, what falls outside the algorithmic part is just stated.We may conclude, at least tentatively, that the stylistic ideal is algorithmic or centred on procedures, even when the actual task goes beyond the algorithmic framework.The commentaries (most famously that of Liu Hui) also explain why algorithms work, but by being commentaries to the algorithms they confirm the central position of these.
The background to the emergence of the Sanskrit style which we know from A ¯ryabhata onward is different,25 and in the A ¯ryabatı ¯ya from c. 500 we find versified rules or statements of facts ("theorems", though not supported by demonstrations) that often do not have the character of algorithms even in a wide sense -for instance [trans.Keller 2006: 33-42]: Half of the even circumference multiplied by the semi-diameter, only, is the area of a circle.That multiplied by its own root is the volume of the circular solid without remainder.
The two sides, multiplied by the height 〈and〉 divided by their sum are the "two lines on their own fallings".When the height is multiplied by half the sum of both widths, one will know the area.
For all fields, when one has acquired the two sides, the area is their product.
Such compact statements called for explanatory and expanding commentaries, and these would often include numerical examples.The style in the mathematical chapter 12 of Brahmagupta's sixth-century Bra ¯hmasphutasiddha ¯nta [ed.trans.If we count lines, numerical examples and commentaries explaining why rules work outweigh the statement of the rules themselves by far.None the less it seems legitimate to argue that also this mature Sanskrit type of mathematics is algorithmic, having rules as the centre around which examples and commentaries are organized, and which provides their raison d'être. 26ne might object that the categorization as "algorithmic" refers to the ideology of mathematics in the cultures concerned and does not describe the materiality of their mathematics -ideology being understood as an inextricable mixture of the descriptive and the prescriptive, of "is" and "ought to".However, to the extent the prescriptive aspect is obeyed or reacted to (and to some extent it always is), ideology also contributes to the shaping of practice, and hence to the historical process.
Returning for a moment to first-millennium China under this perspectie we may observe that the commentaries often speak about constructing new procedures, not only about using procedures flexibly in non-standard situations [Siu & Volkov 1999: 94].This is hence their conceptualization of mathematical innovation, which by necessity influenced which kind of creativity was pursued.As Siu and Volkov argue, this could also have been a task during examinationsalternatively, candidates may have been asked to apply the rules to new situations. 27So, the examples are really illustrative examples, subordinated to the rules/procedures/algorithms; they are not free-standing paradigmatic calculations meant to be emulated with as much creativity as might be required by the situation (normally, of course, none).

Paradigm-centred mathematical cultures
Comparison will show that not all types of mathematics aiming at "finding the right number" are algorithmic in this sense.
Let us first look at a type where at least one abstractly formulated rule played a central role: Late medieval Italian mathematics, its broader Mediterranean inspiration and its various European Renaissance offsprings.Merchants were certainly just as keen as Chinese officials to find the right number, and we do 26 "Sanskrit mathematics" should not be confounded with "Indian mathematics".We have much indubitable indirect evidence for the existence of mathematical activity outside this "great tradition" but no direct evidence -see the recapitulation in [Høyrup 2012b:  146-148]. 27Not as easy as those with good mathematical training tend to believe: I remember how difficult it was for many of my engineering students to perform integrations when the independent variable was time (t) and not x -and how astonished I was as a young teacher.They learned, and I learned too.They, to transfer, I, what not to consider obvious.find in the "abbacus books" reflecting the mathematical training of their sons one rule formulated abstractly: the "rule of three things".This is how the rule is stated in Jacopo da Firenze's Tractatus algorismi, written in 1307 [ed., trans.Høyrup 2007: 236f, error corrected]: 28 If some computation should be given to us in which three things were proposed then we should always multiply the thing that we want to know against the one which is not similar, and divide in the third thing, that is, in the other that remains.
Very similar formulations can be found in other abbacus books; as it turns out, the reference to the similar and the non-similar points back, via the language of Islamic vernacular calculators, to Indian vernacular practices [Høyrup 2012b].
As do other abbacus books, Jacopo gives a number of concrete examples after the abstract rule.Other topics he treats through paradigmatic examples alonebut time and again, after the statement of a problem and before the ensuing numerical calculations, the phrase "and this is its rule" is inserted.The rule of three as just quoted, on the other hand, is not even spoken of as a rule (regola).This is no idiosyncrasy: even though regula or regola turn up often, its meaning is anything except, precisely, the abstract rule.It may, as in Jacopo, refer to a paradigmatic exemplification from which a rule could be extracted; or it may refer to something much broader.In Jacopo's Tractatus [ed.Høyrup 2007:  236], for instance, the exposition of the arithmetic of fractions (addition, subtraction, multiplication, comparison, taking a fraction of another fraction) is followed by the statement that "we have said enough about fractions, because the similar computations with fractions all are done in one and the same way and by one and the same rule" (then follows the rule of three, presented however as "some computations").
The word is at times meant just as broadly in Fibonacci's Liber abbaci.In chapter 12, a regula recta, "direct rule", is made appeal to and applied repeatedly; it is told to be used by the Arabs and to be very useful [ed.Boncompagni 1857:  191].This "rule" consists in naming some unknown and searched-for magnitude res, "a thing"; to write down the statement in terms of this thing; and then reduce the expression -that is, simply in applying (first-degree) rhetorical algebra.
But Fibonacci is no more consistent in his usage than Jacopo.A rule may also refer to a paradigmatic example; for instance, a problem on p. 177 is said to be similar to "the rules of the tree", because the method of a single false position is introduced by a number of examples involving a tree; on p. 179, the "rule of the eggs" stands for a specific variant of the single false position which was introduced in two examples about buying and selling eggs.
A third representative of the broad Mediterranean tradition is the Liber augmenti et diminutionis composed by some Abraham29 and translated into Latin in the twelfth century [ed.Libri 1838: I, 304-376]. 30It solves a sequence of problems by means of three methods: the single false position; the double false position; and first-degree rhetorical algebra with unknown res.The third of these is identical with Fibonacci's regula recta, but here it is simply called regula.The other two carry no name at all. 31 The only mathematical area where abstract rules are used systematically (and sometimes spoken of as such 32 ) is algebra.These are the standard procedures for solving the six "cases" (equation types) of the first and second degree, for instance "possession and roots equal to number", with the rule You halve the [number of] roots, multiply it by itself, add it to the number, take the [square] root, and subtract the half of the roots which you multiplied by itself.
In the abbacus books from Jacopo onward, similar rules (not always correct) are also stated for higher-degree cases.
In the abbacus tradition, algebra only served to display mastery of algebra.33It is thus not strange that the presentation of abstract rules was taken over as tradition -there was no living practice to challenge inherited habits.The tradition had been borrowed, visibly from al-Khwa ¯rizmı ¯, but behind him from some earlier practice.Al-Khwa ¯rizmı ¯tells so himself -he informs the reader that he is presenting what was noble and subtle in an existing technique and about what he "has found " [ed.trans.Rashed 2007: 94-96]).We do not know where this earlier technique was practised, but a good yet vague guess is somewhere in Central Asia (al-Khwa ¯rizmı ¯'s own Khwarezm?) with some kind of connections to India -cf.[Høyrup 2001: 124; Høyrup 2007: 103].In any case, algebra is no witness of the character of Mediterranean medieval mathematics.Its use of abstract rules was a discipline-specific characteristic with no set-off in the wider world of mathematics; it does not tell us that this wider world was "algorithmic" or centred on abstract rules.
We cannot use the same argument about the rule of three; admittedly, it was also an import, and indubitably from Indian vernacular mathematics.But the rule of three was something a merchant calculator had to use again and again and again; it was certainly part of living mathematical culture.
Living culture, however, is subject to wear, tear and unplanned gradual change; it does not conserve something for aeons just because it is inherited tradition.This consideration, on the other hand, explains why precisely the rule of three was transmitted and taught as a rule in a context where everything else was taught through paradigmatic examples: the rule of three was used so often that it was worth the while to learn it abstractly, even though it is counter-intuitive (the intermediate product has no concrete interpretation).Operations you perform sufficiently often are remembered in spite of failing understanding, and the computational advantages of the rule of three (fewer difficult small fractions, or no rounding errors that are multiplied) outweigh the pedagogical disadvantages. 34As soon as teaching went beyond the rule of three, however, it was invariably based on paradigmatic examples -often spoken of as "rules", but almost as often of a character that would not allow direct extraction of an algorithm.
We may draw the conclusion that the Mediterranean mathematical culture of the earlier second millennium was not algorithmic but centred on paradigmatic examples.That, of course, can be correlated with the teaching situation: Italian merchants' sons were taught for at most two years in the abbacus school; ibn Sı ¯na ¯(not Mediterranean, but belonging to Islamic culture), as he tells, learned his "Hindu arithmetic" (probably more than the mere numerals and numerical operations) with the local green-grocer [Gutas 1988: 24] -a situation quite different from the seven to nine years spent by bright and hard-working students of the Tang College of Mathematics to learn by heart the words of the Mathematical Classics [Siu & Volkov 1999: 90f].In the abbacus school, and its analogues, the best that could be achieved was to make pupils understand as much as each of them could grasp, and use that as creatively as each one was able to and needed afterwards (as far as some were concerned, also in further vocational training -future bank clerks at least had to learn more, and differently).
Some observations may be added about Babylonian -more precisely, Old Babylonian -mathematics.The second half of the Old Babylonian period (1800 to 1600 BCE according to the "middle chronology") is the period from which we know a large number of texts containing mathematical problems with prescriptions for solving them (for instance, the two problems on which Ritter builds his argument, and also most of Knuth's examples).In general, these are paradigmatic examples submitted to variation, sometimes only of numerical parameters, sometimes also of the general conditions.There are very few examples of abstract rules -but there is one, and a hint of another one, and they are interesting.
The hint is in the text Db 2 -146, in which the sides of a rectangle are found from the diagonal and the area.In the final verification, the diagonal is found from the resulting sides by means of the "Pythagorean rule" [ed.trans.Høyrup  2002a: 258f].The calculation starts by asking for the square on the length, without indicating its value.This is unique in the corpus, and suggests that the writer quotes an abstract formulation of the rule.Now, this text can be dated to c. 1775 BCE, a period where (so it appears) a number of riddles were adopted into the confusion and apply the direct rule when the inverse rule should have been employed [Høyrup 2007: 80, 88].
scribal school from a profession of lay (i.e., non-scribal) surveyors trained orally in an apprenticeship-system.In an oral system, the master may set out a rule abstractly while pointing to a drawing to make clear what he means; in an educational system carried by writing, it is safer to identify by other means, and the authors of the Old Babylonian mathematical texts used the numerical values for that purpose (sometimes even betraying the value of a magnitude that is asked for, but taking care not to use this knowledge in the procedure).The full-fledged example is problem #1 in the text AO 6770 [ed.Høyrup  2002a: 179f].This text is probably some 25 years younger, but it is written in a different area, in which the adoption of lay problems and procedures took place precisely at this later moment. 35The text is so opaque that historians have struggled with its meaning since it was first published in the 1930s (and, not least, struggled with each other).It appears that the Old Babylonian scholars or students had to struggle too; in any case, teachers must have concluded that rules in abstract formulation were inefficient, and decided to concentrate their efforts on the production of paradigmatic problems.So, the Old Babylonian mathematics teachers, at least at the sophisticated level, refused to develop an algorithmic culture.
What about simple numerical arithmetic, the kind which is indubitably algorithmic even in the Algorismus vulgaris?Let us look at a simple multiplication, 10 50 × 10 50 (the number system was a floating-point place value system with base 60, so 10 50 may mean 10+ 50 / 60 , 10 60+50, etc.).We know that students would write one number below the other on a tablet, and then the result afterwards.The intermediate computations must have been performed on a different support -a reckoning board, some kind of abacus, where students inserted the partial products and performed the additions.Some of the partial products could be taken from tables that had been learned by heart.Every student would know that 10 × 10 = 1 40.Some might also know that 50 × 50 = 41 40.Multiplication tables containing this value exist indeed -but they are rare, and most students would probably have had to find that product as 25 × (1 40). 36f multiplication should be trained as a true algorithm, all users would have to be able to perform the same steps.If they were not -as it seems -then the prescription would have to be much more open, leaving the final choices to the 35 For these chronologies, see [Høyrup 2012a]. 36Indeed, the use of some kind of abacus follows precisely from an error in a mathematical text, where the intermediate product 25×1 has been inserted twice -see [Høyrup 2002b].reckoner.Even simple arithmetic is thus likely to have been trained on something like paradigmatic examples, and not as genuine algorithms.
Even at this level the Old Babylonian mathematical culture thus appears to have been built around paradigmatic teaching, not algorithms. 37he situation in the environment of late first-millennium BCE mathematical astronomy may have been different.Astronomical procedure texts were formulated as abstract branching algorithms -see an example in [Brack-Bernsen & Hunger  2008: 7].The rare mathematical problem texts produced in the same environment, however, state no abstract rules but only offer paradigmatic examples, even though they represent no direct continuation of the Old Babylonian school textssee the text editions in [Friberg, Hunger & al-Rawi 1990] and [Friberg 1997].
I shall not go into details with Pharaonic and ancient Greek practical mathematics; but I will suggest that even they are instances of paradigm-based rather than algorithmic mathematical culture.
Colebrooke 1817: 277-324] is similar, and also invited commentaries including numerical examples; his algebraic chapter 18 [ed.trans.Colebrooke 1817: 325-376], on the other hand, contains rules as well as examples.Over time, this became a general style.Rules (or statements of facts that easily translate into rules) are followed by illustrative numerical examples; this is what we find in Maha ¯vı ¯ra's ninth-century Ganita-Sa ¯ra-Sangraha [ed.trans.Ra ṅga ¯ca ¯rya 1912], in Bha ¯skara II's Lı ¯la ¯vatı ¯from the twelfth century [ed.trans.Colebrooke 1817], and in the Bakhsha ¯lı ¯manuscript [ed.trans.Hayashi 1995].