 Indeterminate equations show up in many applications. The Indians solved them using a method known as kutaka, the pulverizer. This is first described by Aryabhata in the 5th century, but his explanation is almost impossible to follow. A better description comes from Brahma-Khubta in the 6th century, in his Brahma-Svuta-Siddhanta, the opening of the universe, where he notes, He who deduces the number of elapsed days from the residue of revolution, signs, degrees, minutes, or seconds declared at choice, is acquainted with the method of the pulverizer. Now you might wonder about this term residue of revolutions. And Brahma-Khubta's residues correspond to the remainders. For example, 45 days, if we divide 45 by 7, we get 6 remainder 3. And so we might say that 45 days is 3 more than some number of weeks. So Brahma-Khubta considers the following problem, find a number that leaves remainder 5 when divided by 12, and remainder 7 when divided by 31. To solve this, we'll set up a table. And we'll set up the table with the greater remainder on the right. So we have our remainders and our divisors. We have a greater remainder of 7 when our divisor is 31, and the other remainder, 5 when our divisor is 12. We'll put the remainder as 7 when divided by 31 on the right, and remainder 5 when divided by 12 on the left. So now we're going to divide the rightmost divisor, that's 31, by the adjacent divisor, 12, and that'll give us a new quotient, a new remainder, and a new divisor, and we'll want to record those, so we'll add a line for recording the quotient. So we see that 31 divided by 12 is 2 with the remainder 7. We'll record those, our divisor was 12, our quotient 2, and our remainder 7. It will also be convenient to record an alternating sequence of the differences in the original remainder, so the differences between the original remainders 5 and 7 gave us a difference of 2, so we'll start off our sum difference column with a plus 2. And now, at every stage after the first, the new dividend is the old divisor, and the new divisor is the old remainder, so our next step is going to be 12 divided by 7, and that gets us 1 with remainder 5, which we can record in the next column, and our sum difference is going to change signs to negative 2. Our next step, 7 divided by 5 gets us 1 with remainder 2, and our sum difference becomes a plus 2, then 5 divided by 2 gives us 2 with remainder 1, and our sum difference becomes minus 2, then 2 divided by 1 gives us 2 with remainder 0, and our sum difference is now plus 2, and because our remainder is 0, we can't go any further. Now it's useful to keep in mind here that we can actually stop anytime we can find a clever number, and that's a number that is multiplied by the remainder, then combined with the sum or difference, in this case add or subtract 2, and whatever that number is has to be divisible by the divisor, and for reasons that will become apparent, we'll call the quotient the clever remainder. For example, let's say we only did that first division, and suppose a voice whispered into our ear, try the number 10, and since we always listen to what the voices in our heads say, you should cut down on salt, and exercise more, and have a cookie. If we try 10, we see that 10 times the remainder, 7, plus the sum difference, 2 gives us 72, and 72 is divisible by the divisor 12, and the importance here is that if we can identify the clever number at any stage, we don't need to continue to the end of the divisions. But if we can't, no worries, remember the key requirement is that the number has to be divisible by the divisor, and when we get to the end of the table, the divisor is always going to be 1. So if we go to the end of the table, we can take 0 as a clever number, and this always works since our last divisor is going to be 1. In the clever remainder, we want to multiply the clever number by the remainder, then add the sumber difference, and that 0 times 0 plus 2, which gives us 2, and then we're going to divide by the divisor 2 divided by 1, and our first clever remainder is 2. Now we'll work our way backwards. To find the preceding clever number, we'll multiply the clever number by the quotient in its column, and add the clever remainder, 0 times 2 plus 2 gives us 2. To find the preceding clever remainder, we'll multiply the new clever number by the remainder in its column, and add the sumber difference, so that's going to be 2 times 1 minus 2, or 0, then we'll divide by the divisor, 0 divided by 2 gives us 0. A useful guide here is that every number in the column is going to be used exactly once. So once we've got our clever number, we use the remainder, and the sum difference, and the divisor. Let's go back a step, so to find the preceding clever number, we'll multiply our clever number 2 by the quotient in the column, also 2, and add the clever remainder, and notice that the clever number, the quotient, and the clever remainder are the only numbers in the column we haven't used, so we'll use them, and we can find the preceding clever remainder by multiplying our new clever number by the remainder in its column, and then adding the sumber difference, then divide by the divisor, and so our next clever remainder is 2, and again, we can mark off the numbers we've used. Once more on to the breach, to find the preceding clever number, we'll multiply our clever number 4 by the quotient in its column, 1, then add the clever remainder, which uses the last numbers in the column. We'll find the preceding clever remainder, we'll multiply the new clever number by the remainder in its column, and add the sumber difference, then divide by the divisor. We're almost there, to find the preceding clever number, we'll multiply the clever number by the quotient, and add the clever remainder. We'll multiply the new clever number by the remainder, and add the sumber difference, then divide, and finally we can solve by multiplying the last clever number, 10, by the divisor, 31, and adding the remainder, 7, and so our number 317 will be the number that has remainder 7 when divided by 31, and we can verify remainder 5 when divided by 12.