 # Recreational Problems in Medieval Mathematics - Men Buying a Horse

Author(s):
Victor J. Katz (University of the District of Columbia)

The first problem is that of men buying a horse (or perhaps some other animal). The basic problem outline is that three (or more) men want to buy a horse in common. The first says to the other two that if they give him some fixed fraction (say 1/3) of their money, then, with the money he already has, he can buy the horse. The second says to the first and third that if they give him some other fixed fraction (say 1/4) of their money, then, with the money he already has, he can buy the horse. And the third says to the first and second that, if they give him a still different fixed fraction (say 1/5) of their money, then, with the money he already has, he can buy the horse. The question then is how much each man has to begin with and how much the horse costs.

We can easily write down equations representing this problem: $x+r(y+z)=y+s(z+x)=z+t(x+y)=p,$ where $x, y,$ and $z$ represent the money held respectively by the three men, $p$ represents the price of the horse, and $r, s,$ and $t$ represent the given fractions. Of course, this is a modern representation; to solve this today, we would probably rewrite it as four equations in three unknowns and then use substitution to end up with the solution to each of the unknowns written in terms of a single parameter. But nowhere in the ancient or medieval civilizations involved does this kind of representation appear; rather, all discussions are carried out in words. However, there is a common thread to all of the solutions produced, namely, that this is an indeterminate problem with multiple solutions. Unlike today, however, these are not expressed in terms of a parameter. In fact, in most cases there is only one solution given. Sometimes, this results from choosing a value for one of the unknowns or for some combination of them, thus reducing this to a set of three equations in three unknowns, which possesses a single solution.

### Diophantus

The earliest appearance of this problem of which I am aware is in the work of Diophantus in the third century CE. Diophantus, however, does not discuss the problem in terms of men buying a horse, but simply as an abstract numerical problem, one of many such problems in his thirteen-book Arithmetica. And since this is a linear problem, it is one that he proposes in Book I. As he puts it in problem 24 of that book, we are:

To find three numbers such that, if each receives a given fraction of the sum of the other two, the results are all equal. [Heath, 1964, 139]

Here is his solution in the outline form given by Heath, where the given fractions he uses are 1/3, 1/4, and 1/5. Diophantus basically uses the relations to calculate the second and third amounts in terms of the first as well as determine the total amount in terms of the first.

Let the first receive 1/3 of second + third, the second 1/4 of third + first, and third 1/5 of first + second. Assume the first $= x$ and, for convenience sake, take for the sum of second and third a number of units divisible by 3, say 3. [Here is where Diophantus, as usual, converted his indeterminate problem to a determinate one.]

In modern notation, Diophantus noted that the sum of the three numbers is $x + 3,$ while all the results are equal to $x + 1.$ Since $y+{\tfrac{1}{4}}(z+x)=x+1,$ we have $4y + z + x = 4x + 4.$ So $3y + x + 3 = 4x + 4$ and $y=x+{\tfrac{1}{3}}.$ Similarly, $z=x+{\tfrac{1}{2}}.$ Therefore, $x+\left(x+{\tfrac{1}{3}}\right) +\left(x+{\tfrac{1}{2}}\right)=x+3$ and $x = 13/12.$ So, $y = 17/12$ and $z = 19/12.$ The single integral solution that Diophantus presents, then, is 13, 17, 19.

Our question here is why Diophantus included this problem. Of course, one could ask that question about many of Diophantus’s problems. We do not know what he was thinking here. Did he know the problem of men buying a horse? Or did the word problem come up later?

### Abu Bakr al-Karaji

The problem shows up again in the eleventh century in the work of Abū Bakr al-Karaji (c. 953-1029) in Baghdad. In problem 26 of section III of the al-Fakhri [Woepcke, 1853, 95-96], we see Diophantus’s problem repeated, except that the sum of all the three expressions is given as 20. By this time, Diophantus’s work had been translated into Arabic, but al-Karaji does not refer to him. In symbols, al-Karaji’s problem, now determinate, is:

$x+{\tfrac{1}{3}}(y+z)=20;\,\,\,\,y+{\tfrac{1}{4}}(x+z)=20;\,\,\,\,z+{\tfrac{1}{5}}(x+y)=20.$

Al-Karaji solves this via a relatively modern procedure, using the first and second equations to get $z$ in terms of $x,$ then the first and third equations to do this a second way, then solving for $x.$ He finds that $x=10{\tfrac{2}{5}},$ and then calculates that $y=13{\tfrac{3}{5}}$ and $z=15{\tfrac{1}{5}}.$

But he then repeats the problem by supposing that the sum of the three expressions is any number:

If the second member of the proposed equation is not given, one may assign to it any given number and proceed as above. One may also give a value to any unknown or put x + z = 4, because one needs to take a quarter of this sum, or equal to any other number.

In making the supposition that x + z = 4, a supposition similar to that of Diophantus, he solves it in a way similar to that of his Greek predecessor, in fact finding that x = 13/8, y = 17/8, and z = 19/8, or, in integers, x = 13, y = 17, z = 19.

Again, al-Karaji is presenting an abstract problem, one of numerous problems in his text, many of which are similar to those of Diophantus. We do not know whether he was aware of the word problem of the horse. The first time this word problem actually appears, as far as I know, is two centuries later in the Liber Abbaci of Leonardo of Pisa (c. 1170-1240), often called Fibonacci, with the exact same fractions. The solution, however, is much less “algebraic” than that of Diophantus or al-Karaji.

### Leonardo of Pisa

According to Leonardo:

There are three men having bezants who desire to buy a horse. And as none of them can buy it, the first proposes to take from the other two men 1/3 of their bezants. And the second proposes to take 1/4 of the bezants of the other two men. And similarly the third proposes to take 1/5 of the others, and thus each proposes to buy the horse. [Sigler, 2002, 357]

Leonardo presented a recipe for solving this, which could be used whatever fractions are given. But rather than give that, we will consider Fibonacci’s logic, since he explained the recipe in an earlier similar problem. If we let $s$ be the sum of $x, y,$ and $z,$ the problem results in the equations $s-p={\tfrac{2}{3}}(y+z) ={\tfrac{3}{4}}(x+z) ={\tfrac{4}{5}}(x+y).$

It follows that since the second and third keep 2/3 of their money, they give away 1/2 of what they keep; similarly, the first and third give up 1/3 of what they keep; and the first and second give 1/4 of what they keep. Since 12 is the least common multiple of the three denominators, Leonardo first assumes that what remains to any two men after they have given up part of their money is 12, i.e. s – p = 12. So, if the second and third keep 12, then they gave 6. Therefore, y + z = 18. Similarly, if the first and third keep 12, then they gave 4, so x + z = 16. And if the first and second keep 12, then they gave 3, so x + y = 15. Therefore, adding these three equations together, we get 2s = 49. But 2 does not divide 49 and we would like integral answers, so we double all the numbers and find that s = 49. Since now we are assuming that s – p = 24, we find that p = 25. Then, since the first takes from the second and third one half of what they keep, and they keep 24, it follows that the first takes 12 to reach the price of 25, so x = 13. By similar arguments, y = 17 and z = 19.

### Jordanus de Nemore

We see a similar problem in De Numeris Datis, the algebra work of Jordanus de Nemore, sometime later in the thirteenth century, this time with four numbers [Hughes, 1981, 154-155]. But again, since Jordanus was writing a theoretical book, he did not present the problem in terms of buying horses, but simply as an abstract numerical problem. He presented a numerical example and then a general abstract justification using many letters as he usually did. Unfortunately, his methodology is quite unclear, both in the abstract formulation and in the example, although it seems that he is using a form of false position. Figure 1. An annotated image of the anatomy and pathology of a horse from Kitab al-baytara (Book on Veterinary Medicine), a 15th century work. The manuscript in which this image appears was copied in Egypt in 1766. For more information, see the article, "Anatomy of the Horse in the 15th Century," by Rania Elsayed, in MuslimHeritage.com, in which this image appears. (Source: The manuscript is held by the Bibliothèque nationale de France in Paris in its Manuscrits orientaux as Arabe 2817.)

Moving to North Africa, we find the horse problem in the algebraic work of Aḥmad ibn al-Bannā (1256-1321), around 1300 [Berggren, 2016, 419-420]. In his problem, instead of a horse, there was just an “animal”. And since the problem was presented in a book on algebra, ibn al-Bannā solved it using unknowns. In fact, he used two unknowns explicitly, calling the first a “thing” and the second a “dinar”, while he assumed that the third person has a particular number of dirhams. Diophantus and al-Karaji had, in effect, used only one unknown and expressed the other values in terms of that one. Ibn al-Bannā, however, found two separate expressions for the price in terms of the “thing”, then equated them to find the “thing”.

According to ibn al-Bannā:

Three men want to buy an animal together. If the first says to the second and third, “If one takes half of what you have and adds it to what I have, I will have the price of the animal,” and if the second says to the first and the third, “If one takes a third of what you have and adds it to what I have, I will have the price of the animal,” and if the third says to the first and the second, “If one takes a fourth of what you have and adds it to what I have, I will have the price of the animal,” how much does each have?

[In what follows, I will “translate” each of ibn al-Bannā’s statements into a modern algebraic expression. We start by assuming that the amount the first has is $x,$ the amount the second has is $y,$ and that the third has 3.]

You take, then, the half of what the second and third have, you add it to what the first has and you will have that the price of the animal is a thing plus half a dinar plus a dirham and a half.

$\left[x+{\tfrac{1}{2}}(y+3)= x+{\tfrac{y}{2}}+1{\tfrac{1}{2}}=p.\right]$

Then you take a third of what the first and third have and add it to the second. The price of the animal is then a dinar plus one-third of a thing plus a dirham.

$\left[p={\tfrac{x}{3}}+1+y.\right]$

So this is equal to the thing plus a half dinar plus a dirham and a half, the first [expression for the] price.

$\left[{\tfrac{x}{3}}+1+y= x+{\tfrac{y}{2}}+1{\tfrac{1}{2}}.\right]$

You simplify and you have: a half dinar is equal to two-thirds of a thing plus a half dirham.

$\left[{\tfrac{y}{2}}={\tfrac{2}{3}}x+{\tfrac{1}{2}}.\right]$

So the dinar is equal to a thing and a third of a thing plus one dirham.

$\left[y=1{\tfrac{1}{3}}x+1.\right]$

So the price of the animal is equal to a thing and two-thirds of the thing plus two dirhams.

$\left[p=1{\tfrac{2}{3}}x+2.\right]$

Then you take the fourth of what the first and the second have and you add it to what the third has. This will be three dirhams and a fourth of a dirham and three-sixths plus a half of a sixth of a thing, and this is the price of the animal.

$\left[{\tfrac{1}{4}}(x+y)+3={\tfrac{1}{4}}\left(x+1{\tfrac{1}{3}}x+1\right)+3={3\tfrac{1}{4}}+\left({\tfrac{1}{2}}+{\tfrac{1}{12}}\right)x=p.\right]$

It is equal to a thing and two-thirds of a thing plus two dirhams, and this is the first price.

$\left[1{\tfrac{2}{3}}x+2={3\tfrac{1}{4}}+\left({\tfrac{1}{2}}+{\tfrac{1}{12}}\right)x.\right]$

You simplify and you come to the third type [of equation]. The thing will be equal to a dirham and two-thirteenths of a dirham, and this is what the first has.

$\left[{\tfrac{5}{4}}={\tfrac{13}{12}}x\implies x={\tfrac{15}{13}}=1{\tfrac{2}{13}}.\right]$

What the second has is equal to two dirhams and seven-thirteenths of a dirham,

$\left[y={\tfrac{4}{3}}x+1={\tfrac{20}{13}}+1=2{\tfrac{7}{13}},\right]$

and that of the third is three dirhams. The price of the animal is three dirhams plus twelve-thirteenths of a dirham.

$\left[p=1{\tfrac{2}{3}}x+2=\left(1{\tfrac{2}{3}}\right)\left(1{\tfrac{2}{13}}\right)+2=3{\tfrac{12}{13}}.\right]$

If you wish to get rid of the fractions, multiply the price of the animal and what each one has by any number whatever having a thirteenth and you will have whole number [solutions]. This problem … is indeterminate. Think about it and take it as a model.

### Levi ben Gershon

Now we move across the Mediterranean to southern France a few years later. In 1321, Levi ben Gershon (1288-1344) produced the Ma‘ase Ḥoshev (The Art of the Calculator), probably the most substantial mathematics work written in Hebrew during the Middle Ages. The book had three parts, a first, theoretical part dealing with various arithmetic results, including the basic combinatorial theorems, all proved with Euclidean rigor. The second part had more practical results, and the third part was a selection of problems. We first look at proposition 53 from the theoretical part, a proposition that is the same as the one of Diophantus. Levi, however, did not derive a single solution like Diophantus but instead gave a general solution.

To find three numbers such that the first, increased by a given part of the sum of the other two, equals the second, increased by another, also given, smaller part of the sum of the other two, and equals the third, increased by a given third part of the sum of both others that is smaller than the other two parts. [Wagner, 2016, 259]

In symbols, the problem is to find three numbers $h, t, k$ such that

$h+{\tfrac{1}{a}}(t+k)=t+{\tfrac{1}{b}}(h+k)=k+{\tfrac{1}{c}}(h+t),$

where $a<b<c.$ Levi, using Hebrew letters for the unknowns and various combinations of them, states the solution in the form we would write as

$h=(a-2)bc+c+b-a,\,\,t=h+2(b-a)(c-1),\,\,k=t+2(c-b)(a-1).$

However, he did not give any derivation of this result. He just gave a detailed proof that this is correct. [One can derive this algebraically from the three equations with a bit of work. And what I mean by “using Hebrew letters for the unknowns and various combinations” is that, beginning with a letter representing a, he gives another letter to represent a – 2; similarly, with letters to represent b and c, he lets an additional letter represent bc, and so on.]

Levi certainly understood that this problem was indeterminate. For in the problem section of his book, he presented a problem that uses this result, but requires a definite answer.

Problem 21. The first number plus a given part of the sum of the second and third numbers equals the second number plus some other given part of the sum of the first and third numbers. It also equals the third number plus another given part of the sum of the first and the second numbers. One of the numbers is given. What are the rest of the numbers? [Simonson, 2000, 403]

Levi gave an example and expected the reader to be able to substitute the numbers into the formula and then apply proportions:

The first with a fourth of the rest equals the second with a sixth of the rest. This also equals the third with a ninth of the rest. …. The second number is 20. We want to know, what are the rest of the numbers?

Substituting into the formula with a = 4, b = 6, and c = 9 gives the first number as 119, the second as 151, and the third as 169. But since the second number should be 20 rather than 151, we use the ratio 20:151 to calculate the first and third numbers. Thus, the first number is $15{\tfrac{115}{151}}$ and the third is $22{\tfrac{58}{151}}.$ As Levi notes, “you can check this if you wish.”

### Elijah Mizrahi

Perhaps 200 years after Levi, Elijah Mizrahi (1455-1525) wrote an arithmetic book in Constantinople.  Among the problems he presented was the problem of three men buying a fish (I guess that Jews in Constantinople then did not buy horses). But unlike Fibonacci and others, Mizrahi named the men. And he also specifically asked for the ratio among their moneys, rather than a particular answer.

Reuven, Simon and Levi went to the fish market and found a fish.
Reuven said to his friends: If I gave all my money, and each of you gave half of yours, we could buy the fish.
Simon answered and said: If I gave all my money, and each of you gave a third of yours, we could buy the fish.
Levi answered and said: If I gave all my money, and each of you gave a quarter of yours, we could buy the fish.
What is the ratio between their money, that is, the ratio of each to each? [Wagner, 2016, 252-253]

Here, if $a$ is the money of Reuven, $b$ is Simon's money, $c$ is Levi's money, and $d$ is the price of the fish, we can write three equations for this problem:

$a+{\tfrac{1}{2}}b+{\tfrac{1}{2}}c=d,\,\,b+{\tfrac{1}{3}}a+{\tfrac{1}{3}}c=d,\,\,c+{\tfrac{1}{4}}a+{\tfrac{1}{4}}b=d.$

We say that the statements of Reuven and Simon determine that half of Simon's money equals two thirds of Reuven's and one sixth of Levi's. Therefore, Simon's entire money equals one and a third of Reuven's and a third of Levi's. That is because all of Reuven's money together with half of the others', as Reuven says, equals all of Simon's money together with a third of the others', as Simon says. Therefore, what Simon added to Reuven's statement – a half of his [Simon's] money – equals what he removed from Reuven's total – two thirds of Reuven's – and to what he removed from half of Levi's money – one sixth of Levi's.

[In symbolic notation, $a+{\tfrac{1}{2}}b+{\tfrac{1}{2}}c=b+{\tfrac{1}{3}}a+{\tfrac{1}{3}}c,$ so ${\tfrac{2}{3}}a+{\tfrac{1}{6}}c$ equals ${\tfrac{1}{2}}b.$ We rescale by two and obtain: $b=1{\tfrac{1}{3}}a+{\tfrac{1}{3}}c.$]

In the same way, according to Reuven's and Levi's statements, it is determined that half of Levi's money equals three quarters of Reuven's and one quarter of Simon's. Therefore, in the same ratio, a third of Levi's money equals half of Reuven's and a sixth of Simon's.

[By comparing the first and third identities, we get: ${\tfrac{1}{2}}c ={\tfrac{3}{4}}a+{\tfrac{1}{4}}b.$ Rescaling the last identity by two thirds we get: ${\tfrac{1}{3}}c ={\tfrac{1}{2}}a+{\tfrac{1}{6}}b.$]

We already know that Simon's money equals one and a third of Reuven's and a third of Levi's. Therefore, Simon's money equals one and five sixths of Reuven's and one sixth of Simon's own. We remove one sixth of Simon's which is common [to both sides], and remain with five sixths of Simon's money being equal to one and five sixths of Reuven's. According to the same ratio, all of Simon's money equals twice Reuven's and its fifth.

[By substitution, $b={1\tfrac{1}{3}}a+{\tfrac{1}{3}}c =1{\tfrac{1}{3}}a+\left({\tfrac{1}{2}}a+ {\tfrac{1}{6}}b\right).$ Rearranging we obtain: ${\tfrac{5}{6}}b =1{\tfrac{5}{6}}a,$ or $b=2{\tfrac{1}{5}}a$.]

Therefore, it is determined that if Reuven had five, Simon would have eleven. We already saw that half of Levi's money equals three quarters of Reuven's and one quarter of Simon's. This ratio determines that all of Levi's money will be one and a half of Reuven's and half of Simon's. So it is determined that if Reuven had five and Simon had eleven, as we have already seen, Levi would have thirteen. This determines the price of the fish to be seventeen.

### Summary: Men Buying a Horse

In summary, the procedures for solving this problem vary quite a bit in detail, although they generally have the same goal of eliminating some unknowns so as to have a linear relationship between two of them. One can then figure out the ratios of the answers and, if one wishes, give integral answers to the problem. But since no two solution procedures are exactly alike, there is no evidence that the various authors simply copied from one another. But did they read each other’s work? That is unfortunately a very difficult question to answer.

Victor J. Katz (University of the District of Columbia), "Recreational Problems in Medieval Mathematics - Men Buying a Horse," Convergence (December 2017)

## Dummy View - NOT TO BE DELETED

• • • • • 