# Archimedes's cattle problem

(Redirected from Archimedes' cattle problem)

Archimedes's cattle problem (or the problema bovinum or problema Archimedis) is a problem in Diophantine analysis, the study of polynomial equations with integer solutions. Attributed to Archimedes, the problem involves computing the number of cattle in a herd of the sun god from a given set of restrictions. The problem was discovered by Gotthold Ephraim Lessing in a Greek manuscript containing a poem of forty-four lines, in the Herzog August Library in Wolfenbüttel, Germany in 1773.[1]

The problem remained unsolved for a number of years, due partly to the difficulty of computing the huge numbers involved in the solution. The general solution was found in 1880 by A. Amthor. Using logarithmic tables, he calculated the first digits of the smallest solution, showing that it is about ${\displaystyle 7.76\times 10^{206544}}$ cattle, far more than could fit in the observable universe.[2] The decimal form is too long for humans to calculate exactly, but multiple precision arithmetic packages on computers can write it out explicitly.

## History

In 1769, Gotthold Ephraim Lessing was appointed librarian of the Herzog August Library in Wolfenbüttel, Germany, which contained many Greek and Latin manuscripts.[3] A few years later, Lessing published translations of some of the manuscripts with commentaries. Among them was a Greek poem of forty-four lines, containing an arithmetical problem which asks the reader to find the number of cattle in the herd of the god of the sun. It is now generally credited to Archimedes.[4][5]

## Problem

The problem, from an abridgement of the German translations published by Georg Nesselmann in 1842, and by Krumbiegel in 1880, states:

Compute, O friend, the number of the cattle of the sun which once grazed upon the plains of Sicily, divided according to color into four herds, one milk-white, one black, one dappled and one yellow. The number of bulls is greater than the number of cows, and the relations between them are as follows:

White bulls ${\displaystyle =\left({\frac {1}{2}}+{\frac {1}{3}}\right)}$ black bulls + yellow bulls,
Black bulls ${\displaystyle =\left({\frac {1}{4}}+{\frac {1}{5}}\right)}$ dappled bulls + yellow bulls,
Dappled bulls ${\displaystyle =\left({\frac {1}{6}}+{\frac {1}{7}}\right)}$ white bulls + yellow bulls,
White cows ${\displaystyle =\left({\frac {1}{3}}+{\frac {1}{4}}\right)}$ black herd,
Black cows ${\displaystyle =\left({\frac {1}{4}}+{\frac {1}{5}}\right)}$ dappled herd,
Dappled cows ${\displaystyle =\left({\frac {1}{5}}+{\frac {1}{6}}\right)}$ yellow herd,
Yellow cows ${\displaystyle =\left({\frac {1}{6}}+{\frac {1}{7}}\right)}$ white herd.

If thou canst give, O friend, the number of each kind of bulls and cows, thou art no novice in numbers, yet can not be regarded as of high skill. Consider, however, the following additional relations between the bulls of the sun:

White bulls + black bulls = a square number,
Dappled bulls + yellow bulls = a triangular number.

If thou hast computed these also, O friend, and found the total number of cattle, then exult as a conqueror, for thou hast proved thyself most skilled in numbers.[6]

## Solution

The first part of the problem can be solved readily by setting up a system of equations. If the number of white, black, dappled, and yellow bulls are written as ${\displaystyle W,B,D,}$ and ${\displaystyle Y}$, and the number of white, black, dappled, and yellow cows are written as ${\displaystyle w,b,d,}$ and ${\displaystyle y}$, the problem is simply to find a solution to:

{\displaystyle {\begin{aligned}W&{}={\frac {5}{6}}B+Y\\B&{}={\frac {9}{20}}D+Y\\D&{}={\frac {13}{42}}W+Y\\w&{}={\frac {7}{12}}(B+b)\\b&{}={\frac {9}{20}}(D+d)\\d&{}={\frac {11}{30}}(Y+y)\\y&{}={\frac {13}{42}}(W+w)\end{aligned}}}

which is a system of seven equations with eight unknowns. It is indeterminate, and has infinitely many solutions. The least positive integers satisfying the seven equations are:

{\displaystyle {\begin{aligned}B&{}=7,460,514\\W&{}=10,366,482\\D&{}=7,358,060\\Y&{}=4,149,387\\b&{}=4,893,246\\w&{}=7,206,360\\d&{}=3,515,820\\y&{}=5,439,213\end{aligned}}}

which is a total of 50,389,082 cattle[6] and the other solutions are integral multiples of these. Note that the first four numbers are multiples of 4657, a value which will appear repeatedly below.

The general solution to the second part of the problem was first found by A. Amthor[7] in 1880. The following version of it was described by H. W. Lenstra,[2] based on Pell's equation: the solution given above for the first part of the problem should be multiplied by

${\displaystyle n={\frac {(w^{4658j}-w^{-4658j})^{2}}{(4657)(79072)}}\,}$

where

${\displaystyle w=300426607914281713365{\sqrt {609}}+84129507677858393258{\sqrt {7766}}}$

and j is any positive integer. Equivalently, squaring w results in,

${\displaystyle w^{2}=u+v{\sqrt {(609)(7766)}}\,}$

where {u, v} are the fundamental solutions of the Pell equation

${\displaystyle u^{2}-(609)(7766)v^{2}=1}$

The size of the smallest herd that could satisfy both the first and second parts of the problem is then given by j = 1, and is about ${\displaystyle 7.76\times 10^{206544}}$ (first solved by Amthor). Modern computers can easily print out all digits of the answer. This was first done at the University of Waterloo, in 1965 by Hugh C. Williams, R. A. German, and Charles Robert Zarnke. They used a combination of the IBM 7040 and IBM 1620 computers.[8]

## Pell equation

The constraints of the second part of the problem are straightforward and the actual Pell equation that needs to be solved can easily be given. First, it asks that B+W should be a square, or using the values given above,

${\displaystyle B+W=7,460,514k+10,366,482k=(2^{2})(3)(11)(29)(4657)k\,}$

thus one should set k = (3)(11)(29)(4657)q2 for some integer q. That solves the first condition. For the second, it requires that D+Y should be a triangular number,

${\displaystyle D+Y={\frac {t^{2}+t}{2}}}$

Solving for t,

${\displaystyle t={\frac {-1\pm {\sqrt {1+8(D+Y)}}}{2}}}$

Substituting the value of D+Y and k and finding a value of q2 such that the discriminant of this quadratic is a perfect square p2 entails solving the Pell equation,

${\displaystyle p^{2}-(4)(609)(7766)(4657^{2})q^{2}=1\,}$

Amthor's approach discussed in the previous section was essentially to find the smallest v such that it is integrally divisible by 2*4657. The fundamental solution of this equation has more than 100,000 digits.

## References

1. ^ Lessing, Gotthold Ephraim (1773). Zur Geschichte und Litteratur: aus den Schätzen der Herzoglichen Bibliothek zu Wolfenbüttel, Zweyter Beytrag [On History and Literature: from the treasures of the ducal library at Wolfenbüttel, second article] (in German and Greek). Braunschweig, (Germany): Fürstlicher Waysenhaus. pp. 421–425. From pp. 422–423: "Denn, wie gesagt, das Problem soll, wenn es nicht von dem Archimedes selbst abgefaßt worden, doch von ihm für werth erkannt seyn, daß er es den Eratosthenes geschicket hätte, um es den Meßkünstern zu Alexandria zur Auflösung vorzulegen. Dieses besagt die Aufschrift; … " (For, as said [above], the problem [Greek: ΠΡΟΒΛΗΜΑ] shall, if it had not been composed by Archimedes [Greek: Α'ΡΧΙΜΗΔΗΣ] himself, yet have been recognized by him [as so] worthy that he would have sent it to Eratosthenes [Greek: ΕΡΑΤΟΣΘΕΝΗΝ], in order to submit it to the surveyor at Alexandria for solution. The title says this; … ) See pages 423–424 (in Greek).
2. ^ a b Lenstra, H. W., Jr. (2002), "Solving the Pell Equation" (PDF), Notices of the American Mathematical Society, 49 (2): 182–192, MR 1875156.
3. ^ Rorres, Chris. "Archimedes' Cattle Problem (Statement)". Archived from the original on 24 January 2007. Retrieved 2007-01-24.
4. ^ Fraser, P.M. (1972). Ptolemaic Alexandria. Oxford University Press.
5. ^ Weil, A. (1972). Number Theory, an Approach Through History. Birkhäuser.
6. ^ a b Merriman, Mansfield (1905). "The Cattle Problem of Archimedes". Popular Science Monthly. 67: 660–665.
7. ^ B. Krumbiegel, A. Amthor, Das Problema Bovinum des Archimedes, Historisch-literarische Abteilung der Zeitschrift für Mathematik und Physik 25 (1880) 121–136, 153–171.
8. ^ Harold Alkema and Kenneth McLaughlin (2007). "Unbundling Computing at The University of Waterloo". University of Waterloo. Archived from the original on 4 April 2011. Retrieved April 5, 2011. (includes pictures)