 One of the oldest surviving algorithms is that a kashar ibn-laban lived around 1,000, about whom very little is known. Ibn-laban describes the computational procedures on a dustboard, essentially a portable sandbox where figures could be written, then erased as needed. So for addition, Ibn-laban describes the following procedure. The numbers are set down, aligning columns corresponding to the same orders of magnitude. The values in the columns are added, beginning with the highest order of magnitude, and as numbers are used, they are replaced. And it helps to ignore all digits to the right of the working column. So for example, Ibn-laban describes the addition of 839 to 5,625. So we'll set down our numbers. So we start on the left, and since 6 plus 8 is more than 10, we actually add 56 and 8 to make 64. Then 2 and 3 make 5. And again, since 5 plus 9 is more than 10, we'll actually add 55 and 9 to make 64. Subtraction can be performed in a similar way. However, Ibn-laban avoids this borrowing that we do, which by the way is a terrible word for it, because borrowed things are usually returned, and what we borrow in a subtraction is never given back. So using the same numbers, let's subtract 839 from 5,625. So to subtract 839 from 5,625, Ibn-laban notes that 8 can't be subtracted from 6, but it can be subtracted from 56, and so we get 56 minus 8 is 48. Again, 3 can't be subtracted from 2, but 82 minus 3 is 79. 9 can't be subtracted from 5, but 95 minus 9 is 86. For multiplication and division, Ibn-laban describes the following procedure. To multiply 243 by 325, first, set the last digit of one factor below the leading digit of the other factor, then multiply the leading digit of the upper factor by each of the digits in the lower factor, and once you've found this partial product, shift the lower factor. We begin by multiplying the leading digits of the upper number by each of the digits in the lower number. It helps to read all the digits above and left of the working number. So the leading digit of the top number is 3, so we'll multiply each digit of the lower number by 3. So 3 times 2 is 6, which we set down. 3 times 4 is 12, which is added to the 60 to make 72. 3 times 3 is 9, which is added to the 720 to make 729. Uh, question in the back? Isn't it 723? Ah, that's a good question. Now, here's the thing you have to be careful with. The problem with using the Dust Board, as Ibn-laban is describing, is that there's not a clear distinction between your partial results and the numbers you're working with. And in this case, the important thing here is that this 3 is actually part of one of the factors, and it's not part of the partial product. So in fact, our partial product at this point is a three digit number starting with 7, 2. So we do read it as 720. And if you're asking the question, well, why wouldn't they, and then providing some method of distinguishing between the factors and the partial product, then you're asking the question you should be asking for everything. How can this be improved? Because at some point, everything had to be invented. And if you're looking at this thinking of ways that this algorithm can be improved, good, because all human progress comes from somebody saying, this can be done better. But to continue with Ibn-laban's procedure, we multiply 3 by 3 to get 9 and add that to 720 to get 729. Then the lower factor is shifted. And we repeat the process. Since we've taken care of that first digit of the upper factor, our first digit is now 2. 2 times 2 is 4, which is added to the 72 to make 76. 2 times 4 is 8, which is added to 769 to make 777. 2 times 3 is 6, which is added to 7,770. Remember that 2 is part of our factor and not the product to make 7776 and shift. And the only digit left in our upper factor is the 5, so we multiply 5 by each of the digits in the lower factor. 5 times 2 is 10, which is added to 777 to make 787. 5 times 4 is 20, which is added to 7876 to make 7896. 5 times 3 is 15, which is added to make our final answer. Division is handled as the inverse of multiplication. And note that in the product of two numbers, the leading digit of the product will be above and left of the leading digit of one factor. So our setup will set the leading digit of the dividend above the leading digit of the divisor. So let's divide 5,625 by 243. Again, Ibn Le Bon really likes this number 5,625. So we guess the leading digit of the quotient 2. And again, it helps to read all the digits above and left of the working number. So when we were multiplying, this 2 would have been multiplied by each of the digits and added to the partial product. So now we'll multiply this 2 by each of the digits in the divisor and subtract it from our dividend. So 2 times 2 is 4, which we subtract from 5, leaving 1. 2 times 4 is 8, which we subtract from 16, leaving 8. 2 times 3 is 6, which we subtract from 82, leaving 76. And shift. Now we guess the next digit, 3. And again, 3 times 2 is 6, which we subtract from 7, leaving 1. 3 times 4 is 12, which we subtract from 16, leaving 4. 3 times 3 is 9, which we subtract from 45, leaving 36. And this gives us quotient 23, with remainder 36. In the division 5,625 by 243, we obtained a remainder of 36. While continuing past the whole number units might seem to be the obvious next step. This wasn't taken until the work of Abu al-Hasan al-Uqlidisi, who lived in Damascus in the 10th century. The only other thing we know about him comes from his eponym, al-Uqlidisi, the Euclidean scribe. This suggests he made his living by making copies of Euclid. And among other things, al-Uqlidisi solves the problem, increase 135 by its 10th, and the result by its 10th, and so on, 5 times. So to do this, he sets down 135, and marks what we call the unit's place. Then he sets another 135 below it, but shifted one place over. And adding will give 135 increase by a 10th. But we want to increase this by its 10th, so we'll set out a 1485 shifted one place over. Then add. Then lather, rinse, repeat to complete the increase.