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 simple multiplication (the one we learnt in 3rd grade) of any two numbers, provided that both the numbers have the same length (i.e. the number of digits).
n represents the length of the numbers.
Let the numbers be
5678. The following image shows the multiplication:
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
≤ 2n operations. As there are
n rows, so the basic operations in all the rows are
n(2n), or 2n2.
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
What is meant by "comparable" number of operations?
Now, there will be at-most
_'s in the partial products, which means
n-1addition operations. Apart from those, there will be at-least
nadditions (if there isn't a carry from the addition of the left-most digits in the partial products), and at-most
n+1additions (if there IS a carry from the addition of the left-most digits in the partial products). This makes a total of, at-most,
2naddition operations in this step. So why are they saying 2n2?