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:
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:
Obviously, only non-negative integer values are acceptable. Expressing "y" and "z" in terms of "x" we get
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:
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
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:
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:
The Bakshali manuscript gives the problem of solving the following equations:
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:
Arabian mathematics.
Abu Kamil (850 - 930 CE) considered non-negative integer solutions of the following equations: