Hundred Fowls Problem

The Hundred Fowls Problem is a problem first discussed in the fifth century CE Chinese mathematics text Zhang Qiujian suanjing (The Mathematical Classic of Zhang Qiujian), a book of mathematical problems written by Zhang Qiujian. It is one of the best known examples of indeterminate problems in the early history of mathematics. The problem appears as the final problem in Zhang Qiujian suanjing (Problem 38 in Chapter 3). However, the problem and its variants have appeared in the  medieval mathematical literature of  India, Europe and the Arab world.

The name "Hundred Fowls Problem" is due to the Belgian historian Louis van Hee.

Problem statement
The Hundred Fowls Problem as presented in Zhang Qiujian suanjing can be translated as follows:


 * "Now one cock is worth 5 qian, one hen 3 qian and 3 chicks 1 qian. It is required to buy 100 fowls with 100 qian. In each case, find the number of cocks, hens and chicks bought."

Mathematical formulation
Let x be the number of cocks, y be the number of hens, and z be the number of chicks, then the problem is to find x, y and z satisfying the following equations:


 * x + y +z = 100
 * 5x + 3y + z/3 = 100

Obviously, only non-negative integer values are acceptable. Expressing y and z in terms of x we get


 * y = 25 &minus; (7/4)x
 * z = 75 + (3/4)x

Since x, y and z all must be integers, the expression for y suggests that x must be a multiple of 4. Hence the general solution of the system of equations can be expressed using an integer parameter t as follows:


 * x = 4t
 * y = 25 &minus; 7t
 * z = 75 + 3t

Since y should be a non-negative integer, the only possible values of t are 0, 1, 2 and 3. So the complete set of solutions is given by


 * (x,y,z) = (0,25,75), (4,18,78), (8,11,81), (12,4,84).

of which the last three have been given in Zhang Qiujian suanjing. However, no general method for solving such problems has been indicated, leading to a suspicion of whether the solutions have been obtained by trial and error.

The Hundred Fowls Problem found in Zhang Qiujian suanjing is a special case of the general problem of finding integer solutions of the following system of equations:


 * x + y + z = d
 * ax + by + cz = d

Any problem of this type is sometime referred to as "Hundred Fowls problem".

Variations
Some variants of the Hundred Fowls Problem have appeared in the mathematical literature of several cultures. In the following we present a few sample problems discussed in these cultures.

Indian mathematics
Mahavira's Ganita-sara-sangraha contains the following problem:


 * Pigeons are sold at the rate of 5 for 3, sarasa-birds at the rate of 7 for 5, swans at the rate of 9 for 7, and peacocks at the rate of 3 for 9 (panas). A certain man was told to bring 100 birds for 100 panas. What does he give for each of the various kinds of birds he buys?

The Bakshali manuscript gives the problem of solving the following equations:


 * x + y + z = 20
 * 3x + (3/2)y + (1/2)z = 20

Medieval Europe
The English mathematician Alcuin of York (8th century, c.735-19 May 804 AD) has stated seven problems similar to the Hundred Fowls Problem in his Propositiones ad acuendos iuvenes. Here is a typical problem:


 * If 100 bushels of corn be distributed among 100 people such that each man gets 3 bushels, each woman 2 bushels and each child half a bushel, then how many men, women and children were there?

Arabian mathematics
Abu Kamil (850 - 930 CE) considered non-negative integer solutions of the following equations:
 * x + y + z = 100
 * 3x + (/20)y+ (1/3)z = 100.