INDETERMINATE EQUATIONS OF FIRST DEGREE 169 The successiv moduli used in getting the above series of equations are ay, by, as, b3, - -+, the a’s and b’s alternating. The process gone thru in forming this series of numbers is the Euclidean method for finding the greatest common factor of a, and by, which is also used in finding the / and m of the method of § 405. 419. Problem. A farmer bought 100 cows, sheep, and pigs for $100. He paid $10 for each cow, $3 for each sheep, and $.50 for each pig. How many of each kind did he buy? Let x = the number of cows y — ‘l (X l Sheep Z s [ (il ‘ol pigs Then x+y+2=100 10x 4+ 3y 4+ 2/2 = 100 Here we have two equations with three unknowns. The problem is therfor apparently indeterminate. Multiplying the second equation by 2, we get 20x 4+ 6y 4+ 2 = 200 From this equation subtracting the first, we get 19x 4+ 5y = 100 From this equation we find x = 5z and y = 20 — 19%. Using these values the first equation gives us z = 80 + 14#. The general solution of the equations is (57, 20 — 197, 80 + 14n) But evidently for the given problem x, y, and 2z must be positiv. For x to be positiv # must be positiv; for y to be positiv n must be less than 2. Hence » must be 1. This value makes 2 positiv also. Thus the only solution of the problem is got by putting n = 1. This gives as the answer 5 cows, 1 sheep, and 94 pigs.