[Algebra] Hundred Fowls Problem
By: Tao Steven Zheng (郑涛)
【Problem】
Zhang Qiujian Suanjing Chapter 3 Problem 38
Suppose roosters costs 5 coins each, hens 3 coins each and three chickens cost 1 coin. If 100 fowls are bought for 100 coins, how many roosters, hens and chickens are there?


【Solution】
Let represent the number of roosters, hens, chickens respectively. The problem is a system of two linear equations in three unknowns:
Multiply equation (2) by 3 to get
Subtract equation (1) from equation (2) to obtain
Hence,
Substitute into equation (1) to obtain
Therefore,
By the nature of the problem, the solutions for must be non-negative integers; hence,
must be divisible by 4. Substitute
into the above solution set to obtain
where .
Solution 1: 0 roosters, 25 hens, and 75 chickens. [1]
Solution 2: 4 roosters, 18 hens, and 78 chickens.
Solution 3: 8 roosters, 11 hens, and 81 chickens.
Solution 4: 12 roosters, 4 hens, and 84 chickens.
[1] Zhang Qiujian only gave positive integer solutions, so the first solution (0 roosters, 25 hens, and 75 chickens) was not included in the “Zhang Qiujian Suanjing”.