Tuesday, July 18, 2023

Peasant Multiplication

Have you ever heard of what Peasant Multiplication is?


SPOILER: It has something to do with multiplication...



Peasant Multiplication (A.K.A. Russian peasant Multiplication) is a method of multiplying two numbers that was rediscovered in Russia during the 19th century, and was popularly used among uneducated peasants for daily practicality.


It is similar to Egyptian multiplication.


However, its foundational concepts developed in the work of late German mathematician Gottfried Wilhelm Leibniz (1600s). 

Today, we know this as converting ordinary base 10 multiplication into base 2 (binary) multiplication. This is essential to computing because it makes the task easier for the computer to process!



How does it work?


Let’s try an example together! Here’s something we all know:

What is 40 x 10?


That's right, it's 400.

Now let’s see how we can get this answer using Peasant Multiplication!


Step 1 - FORMAT


Arrange the 2 numbers on the top of a T-table. 



*Note: For multiplying more than two numbers (say three numbers), you would create a T-table to find the product of two numbers first, then create another T-table with the product you got and the third number to get your final answer.*


Step 2 - DECIDE


It doesn’t matter which number you pick to halve, just make sure you double the other. 

(I’ll show you this works either way afterwards...)


Step 3 - COMMIT!


After you decide, you must continue doing that operation for the rest of that column. 

We continue this process, each time halving or doubling the previous number in its column to get the next until we get stuck with an odd number. 


Step 4 - KEEP IT EVEN!


When this happens, we just write the even number (the number in the doubling column) of that row next to the table and save for later. 



Step 5 - CONTINUE!


When we continue the process, we divide the odd number by 2 just like before but  only write the quotient  and dispose the remainder. 

5 ÷ 2 = 2.5 or 2R1; only write the quotient, (2)


Step 6 - FINAL STOP!


Eventually we will get a quotient of 1 on the halving side. Since 1 is also an odd number, we simply write even number next to it.


Step 7 - ADD


It works the other way too!!



Tip: it’s actually much faster when you choose to halve the already smaller number.



Why does it work? 


We can see that as we went down each column simultaneously, as long as the previous number in the halving column is even, the row that follows it would have the same product as the original question.



In other words, the multiplication of the two numbers in that row would yield the same exact product. Example, 40 x 10 = 400 = 80 x 5.

When a number in the halving column is odd, the product of the row that follows is less than the product because we got rid of the remainder.

Example, 40 x 10 = 400 = 160 x 2 + N,  where “N” represents the missing value to make the equation true. 


To find N we use simple algebra:

40 x 100 = 400 = 320 + 80, N = 80. Notice how we already wrote out the 80.

And so we now know that the rest of the rows’ products (regardless of the odd/even nature of halving column) would be lacking at least 80 to equal 400. 

The next time an odd number appears in the halving column, its corresponding even number would be added the the product of the next row. 




Works if we halve the 40 side too...


40 in binary is 101000.


(1 x 320) + (0 x 160) + (1 x 80) + (0 x 40) + (0 x 20) + (0 x 10)


Again, this is just (1 x 320) + (1 x 80) = 400.


Thank you for reading; I hoped you learned something new. I’m open to questions if you have any! 😊




No comments:

The Importance of Remainders!

 Can you answer this? 🤔 4L & 9L How? Fill the 9L bottle. Fill the 4L bottle using the water you filled in the 9L bottle. By doing t...