# hundred fowls problem

The hundred fowls problem is a Chinese puzzle found in the sixth-century work of the mathematician Zhang Qiujian. It asks: If a rooster is worth five coins, a hen three coins, and three chicks together are worth one coin, how many roosters, hens, and chicks totaling 100 can be bought for 100 coins? It turns out that there are three different solutions. These can be found the long way, by trial and error, or by using algebra.

Call the number of roosters *R*, the number of hens *H*, and
the number of chicks *C*. The problem gives two constraints. First,
the total number of fowl must be 100, so *R* + *H* + *C* = 100. Second, the total cost of the fowl must be 100. The cost of roosters
is 5*R*, the cost of hens is 3*H*, and the cost of chicks
is (1/3)*C*, so 5*R* + 3*H* + (1/3)*C* = 100.
These two equations can be used to get rid one of the unknowns; then it's
a question of guess and check. Similar problems involving two constraints
and three unknowns are found in early European and Arabic mathematics from
about the 8th century AD on.