100 fowls problem example in the book.

1.1k Views Asked by At

If a cock is worth 5 coins, a hen 3 coins, and three chicks together 1 coin, how many cocks, hens, and chicks, totaling 100, can be bought for 100 coins? In terms of equations, the problem would be written (if x equals the number of cocks, y the number of hens, z the number of chicks):

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

$x + y + z = 100$

Eliminating one of the unknowns, we are left with a linear Diophantine equation in the two other unknowns. Specifically, because the quantity $z = 100 − x − y$, we have $5x + 3y + \frac13(100 − x − y) = 100$, or

$7x + 4y = 100$
The example in the book states that the general solution is: $x = 4t, y = 25 − 7t$ so that $z = 75 + 3t$ with t as any integer.

I want to understand how did the author derive above equation to $x = 4t, y = 25 − 7t$ and $z = 75 + 3t$ because from my calculation $x$ becomes $ -100+4t$ and $y = 200-7t$