How many number of multiplication/addition operations are there in a multiplication of two numbers of equal length?

2.2k Views Asked by At

BACKGROUND:

Note: The following question arose in my mind when watching this lecture (watch at 5:30 minutes if you will).

Assumption: Just for the sake of this question, let's assume that the term "basic operation" means an addition or a multiplication operation between two single-digit numbers.

Now we have to calculate the number of basic operations involved in the multiplication of any two numbers, provided that both the numbers have the same length (i.e. the number of digits).

Let's say "n" represents the length of the numbers.

Let the numbers be 1234 and 5678. The following image shows the multiplication:

enter image description here

As you can see, each row (i.e. each partial product of the first number with a digit of the second number) involves 4 multiplication operations, and 4 addition operations (think of the carries). Depending on the number of carries (and thus depending on the original numbers), in the case of any two numbers, in each row, it could be at least 0 additions (no carry) and at most 4 additions (a carry from each digit-to-digit multiplication).

In other words, each row involves less-than-or-equal-to "2n" operations. As there are n rows, so the basic operations in all the rows are n(2n), or 2n2.


QUESTION:

Now comes that one final addition (shown in black pen in the image). From the video lecture

The final addition requires a comparable number of operations. Roughly, say, another at-most 2n2 operations.

The question is

  1. What is meant by "comparable" number of operations?

  2. How did they find this "at-most 2n2" operations?