10,366,482 white bulls
7,460,514 black bulls
7,358,060 spotted bulls
4,149,387 brown bulls
7,206,360 white cows
4,893,246 black cows
3,515,820 spotted cows
5,439,213 brown cows
The first task is to convert all of that into equations. Using W, X, Y, Z, w, x, y, z for white bulls, black bulls, spotted bulls, brown bulls, white cows, black cows, spotted cows, and brown cows, respectively, we get these equations:
W = (5/6)X + Z
X = (9/20)Y + Z
Y = (13/42)W + Z
w = (7/12)(X+x)
x = (9/20)(Y+y)
y = (11/30)(Z+z)
z = (13/42)(W+w)
Combining the first three equations, we get:
W = (5/6)((9/20)Y+Z)+Z
= (5/6)((9/20)((13/42)W+Z)+Z)+Z
= (13/112)W + (3/8)Z + (5/6)Z + Z
= (13/112)W + (53/24)Z
so (99/14)W = (53/3)Z
and 297W = 742Z.
This is reduced to its smallest values, so W is divisible by 742 and Z is divisible by 297.
By equation #3, W is also divisible by 42. 2226 (3x742) is the smallest number divisible by both 742 and 42, so W is divisible by 2226. Let's try some W's:
W = 2226 4452 6677 8903 ...
X = 1602 3204 4806 6408 ...
Y = 1580 3160 4740 6320 ...
Z = 891 1782 2673 3564 ...
The second column is twice the first; the third is three times the first, etc. For each of these columns, we can plug in the values of W, X, Y, and Z into equations #4 through #7. So we have four equations with four unknowns, and we should be able to solve for w, x, y, and z. Choosing the first column, we get these four equations:
w = (7/12)(1602+x)
x = (9/20)(1580+y)
y = (11/30)(891+z)
z = (13/42)(2226+w)
Solving these four equations for z, we get:
w = 7206360 / 4657
x = 4893246 / 4657
y = 3515820 / 4657
z = 5439213 / 4657
after reducing z to its lowest terms.
So, for these four number to be positive integers, W, X, Y, and Z must be 4657 times the first column above.
Thus, W = 2226 × 4657 = 10366482. And the rest of the numbers follow.
W = 10,366,482
X = 7,460,514
Y = 7,358,060
Z = 4,149,387
w = 7,206,360
x = 4,893,246
y = 3,515,820
z = 5,439,213
