You are on page 1of 9

On a Mathematical Problem in al-Khaini's

Book of the Balance of Wisdom


M AR l A M R O Z H AN S K A Y A
Institute for the History of Science and Technology
USSR Academy of Science
Staropanski Per. 1/5
103012 MOSCOWK-12, USSR

SECTION 1
BU'L-FATH 'Abd al-RahmPn al-Mansiir al-KlGzini was an eminent scholar
A who lived in the first half of the 12th century.' He worked at Marw at
the court of Sultan Sanjar and wrote in Arabic rather than in Persian. The
compass of his scientific interests was extremely wide: it included astronomy
and design of astronomical instruments, mechanics and mathematics. A few
of his extant writings are a tract on astronomical instruments,z a monumental
astronomical handbook with tables (zij) called al-Zq ~ l - S a n j a f ia, ~work evi-
dently compiled under considerable influence of al-Birtini's Zij called al-
Qiiniin al-Mas'iidi, and finally, the work which concerns us here, Kitiib
Mizcn al-hikma, The book of the balance of wisdom.
In the middle of the 19th century the Russian orientalist Khanikov discov-
ered a manuscript of this work in Iran, and published part of it with an Eng-
lish translation and commentary.* German translations of some of the frag-
ments from Khanikov's edition have also been published.5 Three manuscripts
of al-KhPzini's treatise are now known: the "Khanikov manuscript" depos-
ited at the Leningrad Saltykov-SchedrinPublic Library (Khanikov Collection,
item no. 17) and two other manuscripts discovered in India (in Bombay and
Hyderabad).The 1941Hyderabad edition of the Balance ofwisdom6was based
on these two manuscripts preserved in India. Finally, a Russian translation
of the complete text of the work based on all three manuscripts, together with
a commentary, was published in Moscow in 1983.'
The Balance of wisdom is a comprehensive explication of the problems
of theoretical and practical statics discussed by contemporary scientists. It
is composed just as modern scholarly monographs are: the author first reviewed
everything done in this branch of science by earlier scholars, both Greek and
Muslim, and then he presented his own findings. Al-KhPzini's book thus
represents an entire stage in the history of statics: it enables its students to
assess the achievements of the scholars in the medieval East who dealt with
these problems.
427
428 ANNALS NEW YORK ACADEMY OF SCIENCES

A characteristic trait of the Balance of wisdom is the use of mathematical


methods for solving numerous mechanical problems. I shall consider one such
problem on the selection of a minimal number of weights for weighing a cer-
tain load, in other words, the so-called "problem of weighing," well known
in the history of mathematics. Al-Khgzini devotes the first chapter of Maqiifa
6 of his treatise to this problem.

SECTION 2

Al-Khazini begins by explaining what he calls the "universally adopted


method of selecting weights to weigh any arbitrary load. He says: 'At present,
people follow the natural sequence of the orders of numbers," that is, the dec-
imal system. Three numbers are chosen from each order: from the order of
units, 1, 2, and 5; from the order of tens, 10, 20, and 50; from the order of
hundreds, 100, 200, and 500 (Arabic text (al-Khazini 1941), 109).
Thus, the standard set consisted of nine weights whose total added up to
888 units. Such a selection of weights, however, leads to some inconvenience.
Placing all the weights only on one scale, it was indeed possible to weigh a
+
load of, say, three units (since 3 = 1 2), but not those of four or nine units
(since4 = 2 + + +
2 = 1 1 2 a n d 9 = 1 1 i- 2+ + 5 =2 + + 2 5).
By using only one generally adopted set of weights and placing all the weights
only on one scale, it was possible to weigh and, for that matter, only in one
+
single manner, any loads from 1to 888 (for example, 6 = 5 1,8 = 5 i-
+
2 1,etc.), with only the following exceptions: those of 4 and 9 units among
the first ten, 14 and 19 among the second ten, 24 and 29 among the third ten,
. . . , 104 and 109,114 and 119, . . . , 204 and 209, . . . etc. To weigh these
exceptional loads it was necessary to possess two universally adopted sets,
i.e., 18 weights totalling 888 X 2 = 1,776 units. It was of course possible
to distribute the weights on both scales of the balance. In this instance, one
batch of weights was sufficient, but the procedure was no longer unique since
one and the same load could have been weighed in many ways. For example,
a load of 3 dirhams (1dirham = 4.23 grams) could be weighed in four ways,
viz.:
1 + 2 = 5 - 2 = 10 - 5 - 2 = 20 - 10 - 5 - 2.
To summarize, according to al-KhHzini two essential faults were inherent
in the standard set of weights. If weights were placed only on one scale of
the balance, two sets would be needed to weigh any load from 1to 888; if,
however, the weights could have been placed on either scale, the manner of
weighing would not be unique. What was needed to eliminate these deficien-
ROZHANSKAYA: AL-KHBZINi'S BOOK OF THE BALANCE OF WISDOM 429

cies, al-Khiizini declared, was an entirely different principle for selecting the
weights.
He explains:
If we want to choose the weights in accordance with the natural order of numbers,
and to place them on one scale without opposinp them by weights on the other
scale, it is necessary to select [them]in accordance with duplication. Let US choose
the first [weight] equal to 1 [unit], the second [one equal to] 2, the third [one
equal to] 4 . . . [He continues the enumeration to the tenth one equal to 512.1
The quantity of weights will exceed by unity their quantity in a standard set.
If, however, we want to use a lesser [quantity of weights] this is achieved by
means of opposing. [In this instance,] we choose the weights beginning with
unity. We then multiply it [the unity] by three and continue in the same way.
The first weight is equal to one 1i.e. to unity of weight], the second [one is equal
to] 3, the third [one is equal to] 9 . . . [He continues the enumeration to the
seventh one equal to 729.1 The quantity of these weights is less by two than
that in a universally adopted set [text, 1091.
Thus, for the first case, when the weights are placed only on one scale of
the balance, al-Khiizini suggests choosing not the standard set but rather a
batch of ten weights selected so as to form a geometric progression with first
term one and common ratio two. The quantity of weights would be one more
than in the universal set, but, on the other hand, the batch enables one to
weigh up any load up to P = 1,023 (this being the sum of the first ten terms
of this progression).
In the second instance, when the weights are distributed on both scales
of the balance, the set consists only of seven weights (two less than in the
standard batch) chosen so as to constitute a geometric progression with first
term one and common ration three. The seven weights are then sufficient to
weigh any load up to P = 1,093 units.
In both cases the problem is thus reduced to finding the least quantity of
weights sufficient to weigh any integer load less than or equal to 1,093units.
The mathematical meaning of the problem is quite transparent. Represent,
in the first instance, load P as
P = ao i- alpl i- azpz aspg,:gaipi < 1,023
+ . . . i-
where
pi = 1, 2, 22, ..,, 29 and ai = 0 or 1.
Then al-Khzzini's solution is tantamount to expressing numbers P in the bi-
nary number system. In the second case
P = a. + alpl + azpz + . . . + a6Pbr
i-6
& aipi < 1,097
430 ANNALS NEW YORK ACADEMY OF SCIENCES

where
pi = 1, 3, 32, . . . , 36 and ai = -I, 0, or I.
Here the solution is equivalent to representing numbers P in the ternary s ~ s t e m . ~
It is possible to consider both these instances as particular cases of repre-
senting integers n by an algebraic sum of different powers of a certain integer,
i.e. of expressing natural number n by a sum of m (m < n) natural numbers.
(In al-Khiizini’s first case m = 10; in his second case, m = 7.)
Let us return, however, to al-Khazini’s objections to the generally adopted
set of weights and his own criteria for choosing a set. Exactly this point charac-
terizes the standard of rigor in formulating the problem. Al-Khiizini de-
mands that only one set of weights be used, and, consequently, that in weighing
any integral load up to and including a given value, not a single weight be
used more than once.
In present day terminology, this problem might be formulated as follows:
to find such a subset M* of a set M of natural numbers that any element n
in M could be expanded in a sum of m (m < n) elements belonging to M*.
Besides, subset M* must consist of a minimal number of noncoincident ele-
ments. This is a problem well known in number theory.
Al-Khazini remarks: ”If the demand formulated above is not met, this
would (become) quite another problem belonging to another branch of
mathematics” (text, 110). It may be assumed that by mentioning “another
problem” al-Khiizini was probably thinking about finding the number of
ways to weigh a certain load by means of a given set of weights, or about
determining the number of expansions of a given integer into a sum of lesser
integral numbers. His reference to “anotherbranch of mathematics”may mean
that he had in mind methods peculiar to the solution of linear indeterminate
equations such as had been applied by Indian mathematicians in the 5th and
6th centuries and by Muslim mathematicians in the 9th and 10th centuries.10

SECTION 3

The problem of weighing obviously originated in the East in remote antiq-


uity. Its sources are traceable in Indian civilization. During excavations at
Mohenjo-daro and Harappa, archaeologists have discovered a large quantity
of weights of various denominations. They testify that the system of weights
was then based on duplication. The small weights found there were of 1,2,
4, . . . , 64 units.ll
It is still unknown whether Sumerian and Babylonian mathematicians in-
cluded the problem of weighing, or problems similar thereto, within the
compass of their inquiries. A comprehensive study of the immense metrolog-
ROZHANSKAYA: AL-KHXZINI‘S
BOOK OF THE BALANCE OF WISDOM 431

ical data discovered during excavations would indeed help to answer this ques-
tion, the more so as archaeological findings convincingly testify in favor of
sufficiently close ties having existed between the Indian and the Sumerian civili-
zations.12
The sources of the problem of weighing can also be traced in the method
of multiplying integers in Egyptian mathematics. The relevant trick consisted
in expanding one of the factors into a sum of terms of the type 2k, where
k are odd integers.13 Here too, the study of metrological evidence would pro-
vide additional information.
Plato, when describing the system of the world in his Timaeus (35c-36a),
represented integers by sums of powers of numbers 2 and 3. He characterized
the relations between orbits of the seven celestial bodies (the Moon, the Sun,
and the five planets then known) by numbers 1,2,3,4,8,9, and 27, the terms
of two geometric progressions, 1, 2, 22, 23, and 1, 3, 32,33.1*
This fact can be regarded as evidence in favor of Plato’s cosmological con-
ceptions being based upon Pythagorean sources. And of course the great in-
fluence of Egyptian and Greek mathematics on the making of this science
in the medieval East is generally known. Finally, I note that a table which
included powers of numbers 2 and 3 is contained in a medieval Chinese math-
ematical treatise. l5
Obviously, the problem of weighing was widely disseminated over the me-
dieval Near and Middle East and al-Khiizini was not the first author to in-
clude it in his work. According to our present knowledge, the first mention
of this problem dates back to the second half of the 11th century. The Iranian
scholar Muhammad ibn Ayyiib al-Tabari formulated it among many others
in his Persian treatise MiftZih al-mu‘ZimalZit, Key to (commercial] deals.16The
set of weights in his version of the problem contained ten pieces, namely those
of 1,3, 3 2 , . . , , 3 9 units. Thus, the batch enabled one to weigh all loads up
to and including 1,000 units. The second source now known to mention the
problem of weighing is the Balance of wisdom itself.
Leonardo Pisano (Leonard of Pisa) (1180-1240) in his Liber abaci appears
to have been the first to consider the problem in Western Eur0pe.1~He formu-
lated it as follows: Determine four weights capable of measuring any load
up to and including 40 units supposing that the weights could be placed either
on one or on both scales of the balance. Leonardo’s answer was: 1,3, 9, and
27. This is al-Khiizini’s second case, with m = 4. Leonardo, however, gener-
alized the problem, thus making the next step in its solution. In addition he
considered the case when the load might weigh more than 40 units. Then,
he observed, it is possible to include a fifth weight of 81 = 3 4 units so that
the new set would become capable of weighing loads up to and including 121
units, etc. ad infinitum. Thus Leonardo actually formulated and solved al-
Khazini’s second instance for any n.18
432 ANNALS NEW YORK ACADEMY OF SCIENCES

The problem of weighing is contained in Chapter 12 of the Liber abaci along


with other problems, such as the summation of arithmetic and geometric and
recurrent (Fibonacci) series. Some of these definitely originated in the East,
such as the traditional problem on the summation of different powers of 7,
one version of which had existed in ancient Egypt.
According to one point of view, the Egyptian problem might have found
its way (directly or via antique sources) into Arabic mathematical literature
and thence into the Liber abaci.19 At any rate, konardo‘s sources could have
hardly included the Balance of wisdom since it was unknown in medieval
Europe.
Leonardo’s contemporary, Jordanus Nemorarius, wrote a treatise called
Demonstratio Jordani de algorismo.20 It was devoted to the substantiation of
mathematical operations on integers. The contribution included a theorem
tantamount to the inequality
9 + 9 . 10 + 9 * 102 + ... + 9.10 n-1< 10”’
which could be interpreted as a version of the problem of weighing, or as
representing a given integer in the decimal number system.
N. Chuquet (15th century) and L. Pacioli (14451-15141) considered the same
version as konardo, but with m = 5. In the 16th century, N. Tartaglia
(1499-1557), M. Stifel (14861-15671) and Gemma Frisius (in 1540)treated both
cases of the problem, taking m = 6.21Other authors followed suit and in
1612 Bachet de Meziriac (1581-1638) was the first to publish a printed work
on the problem and it is now called after him.22 Bachet formulated his problem
in this way:
Estant proposCe telle quantifb qu’on voudra pesant un nombre de livres depuis
1 iusques a 40 inclusivement (sans toutefois adrnettre les fractions) on dernande
cornbien de pois pour les rnoins il faudroit employer li cet effect. [It is required
to weigh all integral loads from 1to 40 livres. What would be the least quantity
of weights necessary for the operation, and how should they be chosen?]
In the 18th century Euler offered a rigorous solution to the problem. He
considered it as a particular case of partitioning numbers into sums (partitio
nurnerorum), i.e. of expressing natural numbers n as sums of m (m < n) nat-
ural numbers.23He expressly devoted a series of memoirs to this more general
problem. His investigations are known to have been started from a problem
proposed to him in 1740 by the Berlin mathematician Philippe Naude
(1684-1745). The problem was this: In how many ways can an integer be ex-
pressed as a sum of two, three, four, and more numbers? Euler gave its ana-
lytical solution the same year. Essentially, this is a more general case of al-
KhZzini’s “other problem.” Euler adduced both the problem of weighing and
the ”other problem” as examples.
ROZHANSKAYA: AL-KHAZINi'S BOOK OF THE BALANCE OF WISDOM 433

Before Euler, however, not a single author amongst those I have mentioned
above formulated the problem with the same degree of rigor as al-Khiizini
did in the 12th century.

ACKNOWLEDGMENT
This paper was translated into English by Dr. O.B. Sheynin.

NOTES

1. On al-Khazini, see the article by R. E. Hall in DSB.


2. On this, see Sayili.
3. O n this, see Kennedy, 129, no. 27.
4. See Khanikov.
5. Wiedemann and Ibel.
6. Listed as al-Khazini 1941.
7. See al-Khlzini 1983.
8. I find it remarkable that al-Khlzini uses here the term al-rnuqibala. Mathematicians in the
medieval East used the same term to denote an algebraic operation of transferring terms con-
taining the unknown onto one side of the equation and free terms onto the other side.
9. This method of presenting numbers in the ternary system differs from the modern method
only insofar as numbers - 1 , O and 1, were used rather than 0,1 and 2. Simple transformations
are sufficient to reduce one representation into the other and vice vena. Of course, this remark
does not mean that al-Khazini really wanted to record numbers in the ternary system. Indeed,
the mathematical equivalence of two specific problems does not in any way imply their histor-
ical identity.
10. On this, see, for example, Youschkevitsch, 143-47 and 221-23.
11. It is worth mentioning that ancient builders of these settlements have used bricks with the
ratios of their dimensions being 1:2:4 or 1:3:9. See in addition Volodarsky, 13.
12. Knorozov, 4-15.
13. Vygodsky, 59-60.
14. Rozhansky, 257
15. Berezkina, 25.
16. Tropfke, 125, 635.
17. Leonardo, 297-98.
18. It is, however, possible that al-Khlzini knew the solution even for a larger number of
terms. In this instance he simply compares his set with the standard batch used for weighing
loads up to and including 888 units. Maybe for this reason he cut off both his series.
Leonardo might have become acquainted with the problem of weighing either during his travels
in the East or while studying mathematical literature written in Arabic. He is known to have
transacted commercial deals in the East where he acquired knowledge of the working principle
of balances and of the practice of weighing.
19. Vygodsky, 59-65.
20. See Enestrom and Matvievskaya.
21. See Knobloch for details.
22. See Bachet.
23. See Euler.
434 ANNALS NEW YORK ACADEMY OF SCIENCES

BIBLIOGRAPHY

Berezkina, E. I.
1980 Mathematika drevnego Kitaya (= Mathematics in ancient China). Moscow:
Nauka.
DSB
Dictionary of scientific biography, 14 vols. and 2 supp. vols., New York: Charles
Scribner's Sons, 1970-80.
Enestrom, G.
1906-7 Uber die Demonstratio Iordani de algorismo. Biblioteca mathematica, F. 3,7:
24-37.
Euler, L.
1748 lntroductio in analysin infinitorum, especially Cap. 16: De partitione
numerorum, 313-38.Lausanne: M.M. Bousquet.
Ibel, Th.
1908 Die Waage im Attertum und Mittefalter, Inaug. Diss. Univ., Erlangen.
Kennedy, E. S.
1956 A survey of Islamic astronomical tables. Transactions of the American
Philosophical Society, N.S. 46:2: 123-77.
Khanikoff, N.
(Khanikov)
1859 Analysis and extracts of Kit& miziin al-kikrna (Book of the balance of
wisdom), written by al-KhPzini in the twelfth century. Journal o f the Amer-
ican Oriental Society, 6: 1-128.
al-KhPzini, 'Abd al-Rahman
KitZb Miz'iin al-kikma (= The book of the batance of wisdom). Hyderabad:
Osmania Oriental Publications Bureau, 1941.
Kniga vessov mudrosti (= The book of the balance ofwisdom), In Nauchnoye
nasleaktvo (= Scientific heritage), vol. 6:lz istoriyiphysiko - mathematicheskih
nauk na srednevekovom Vostoke (= Essays on the history of the physical and
mathematical sciences in the medieual East), 15-140.Moscow: Nauka, 1983.
Knobloch, E.
1973 Zur Uberlieferung des Bachetischen Gewichtsproblems. Sudhofs Archiv, 57:2:
142-51.
Knorozov, Y. V.
1975 Klassifikatsiya proto-indiyskih nadpissey (= Classification of proto-Indian in-
scriptions), In Soobscheniya ob isuchenii proto - indiyskih textov (= Report
on the study of Proto-Indian texts), 4-15. Moscow: Nauka.
Leonard0 Pisano
1857 Scritti maternatico del secolo decimo term. Rome: Publicati da Baldassare Bon-
compagni, vol. 1 (Liber abaci).
Matvievskaya, G. I?
1971 Razvitiye ucheniya o chisle v Europe do XVIl veka (= Development of the
doctrine of number in Europe up to the 77th century). Tashkent: Fan.
Rozhansky, I. D.
1979 Razvitiye estestvoznaniya v epoku antichnosti (= Development o f natural science
during antiquity). Moscow: Nauka.
Sayili, A.
1956 Al-KhHzin7s treatise on astronomical instruments. Ankara hiversitesi Dil ve
Tarih - Cografya Faciiltesi Dergesi, 14: 15-19.
ROZHANSKAYA: AL-KHAZINf 'S BOOK OF THE BALANCE OF WISDOM 435

Tropfke, J.
1980 Geschichte der Elementarmathematik, Bd. 1, Arithmetik und Algebra. 4. Aufl.
Berlin-New York: Walter de Gruyter.
Volodarsky, A. I.
1977 Ocherkipo istoriisrednevekovoy indiyskoy mathematiki (= Essays on the his-
tory of medieval Indian mathematics). Moscow: Nauka.
Vygodsky, M. Y.
n.d. Arithmetika i algebra v drevnem mire (= Arithmetic and algebra in the ancient
world), Moscow.
Wiedemann, E.
1970 Aufsutze zur arabischen Wissenschaftsgeschichte,2 vols. Hildesheim and New
York: G. Olms. Vol. I, especially 'mer die Bestimmung der spezifischen
Gewichte," I, 240-57; 'fJber die Bestimmung der Zusammensetzung von der
Legierungen,"vol. II,57-68, and 'Qber die Verbreitung der Bestimmungen der
spezifischen Gewichte nach al-BErtini," vol. 11, 1-4.
Youschkevitch, A. P.
1961 Istoria mathematiki v sredniye veka (= History of mathematics in the Middle
Ages). Moscow: Physmatgis.

You might also like