# A 9th century Indian variation of the “100 birds” problem

“*With the help of the accomplished holy sages, who are worthy to be worshipped by the lords of the world, and of their disciples and disciples’ disciples, who constitute the well-known jointed series of preceptors, I glean from the great ocean of the knowledge of numbers a little of its essence, in the manner in which gems are picked up from the sea, gold is from the stony rock and the pearl from the oyster shell; and give out, according to the power of my intelligence, the Sarasangraha, a small work on arithmetic, which is however not small in value.*”

After an introductory salutation to Mahavira the god, the 24^{th} omniscient teaching god of the Jains, his namesake Mahavira the teacher (9^{th} century) introduces the reader to his work, the “Ganitasarasangraha” (“Compendium of the Essence of Mathematics), a versified Sanskrit collection of mathematical methods and problems organized in nine chapters. “*What is the good in saying much in vain?*” he asks, in justifying the purpose of his work, “*whatever there is in all the three worlds, which are possessed of moving and non-moving things – all that indeed cannot exist as apart from measurement*”. His word problems, as modern as those found in modern textbooks, often stray away from the mundane and the absolutely necessary and relevant into the magic world of the Indian peninsula, with brightly colored parakeets, exotic flowers and fruit, elephants and offerings to the gods. In paragraph 17 of chapter IV, for example, Mahavira is setting up a problem on fractions starting:

“*One night, in a month of the spring season, a certain young lady … was lovingly happy along with her husband on … the floor of the big mansion, white like the moon, and situated in a pleasure-garden with trees bent down with the load of the bunches of flowers and fruits, and resonant with the sweet sounds of parrots, cuckoos and bees which were all intoxicated with the honey obtained from the flowers therein. Then on a love quarrel arising between the husband and the wife, that lady’s necklace made up of pearls became sundered and fell on the floor. One third of that necklace of pearls reached the maid-servant there; 1/6 fell on the bed…*”

One of his gems, from the “*great ocean of the knowledge of numbers” *is a variation of the emblematic “100 birds” problem, a mathematical puzzle initially traced in Zhang Quijian’s (or, spelled differently, Chang Ch’iu Chien) “Mathematical Manual” (a Chinese mathematical text, dating probably from the 5th century) and which thereafter appeared in various mathematical texts in Asia and Europe for more than a millennium. Occasionally it can still be found in modern textbooks and books of recreational Mathematics. The problem refers to the purchase of a certain number of birds of various kinds for a certain amount of money and how the money should be distributed for buying each of these kinds. It is related to Diophantine equations, i.e. polynomial equations for which only integer solutions are sought, numerous examples of which (though quite more challenging than the ones related to the “100 birds” problem) had first been studied systematically by the Greek mathematician Diophantus (3^{rd} century) in his work “Arithmetica”, a text which even today remains modern and challenging. Beyond the distinctive involvement of birds, what makes the “100 birds” problem emblematic is not its mathematical nature but rather its wide geographical dispersion (from Europe and the shores of the Mediterranean sea to China, the Indian peninsula and even Japan) within a time span exceeding a millenium, indicating an exchange of mathematical ideas between peoples. Paragraph 152 of chapter VI of Ganitasarasangraha reads:

“*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. Someone was told to bring 100 birds for 100 panas for the amusement of the King’s son, and was sent to do so. What does he give for each of the kinds of bird that he buys?*”

In modern terms, the problem can be reduced to a system of two Diophantine equations with four unknowns and possesses an infinite number of solutions. However, given the conditions of the problem, only few of them are accepted (as the number of each kind of birds must be positive and the total number of birds must be constant and equal to 100). In his book Mahavira does not make any mention of the fact that the solution is not unique, does not discuss the problem of the number of solutions and, without any attempt to explain or prove, he briefly sketches a rule for arriving to one of the answers, involving the selection of some multipliers. However, not all selections of multipliers produce integer answers and there is no mention of how to make a suitable selection, which renders his rule ambiguous. It can be proved that Mahavira’s “100 birds” problem possesses 16 solutions which are discussed here.