0

Could you please explain to me how to properly calculate the O(n) of the Karatsuba Algorithm?

I have read that it is equal to O(n^log_2(3)) but I still do not understand how to derive the value.

First of all, I am a bit confused that the input length is represented as n instead of n + m, but I guess it's just to cut short.

I understand that an operation is being executed for every digit, that's why it is n. But could you explain to me how is log_2(3) calculated and why is it O(n^log_2(3)) and not O(n log_n(3))?

AbcAeffchen
  • 14,400
  • 15
  • 47
  • 66
Pasha
  • 1,768
  • 6
  • 22
  • 43
  • Are you familiar with recurrences and the Master Theorem? – templatetypedef May 24 '20 at 19:16
  • Hi @templatetypedef. I am familiar with recurrence, but recurrence itself doesn't have anything in common with complexity. The same can be done with the help of Stack data structure. Is Master Theorem the same as Master Method? I f yes, I'll learn about it in the next lecture https://www.coursera.org/learn/algorithms-divide-conquer/home/week/2 – Pasha May 24 '20 at 19:21
  • Recurrences are often used to determine time complexities, and solving recurrences is a common strategy for getting these sorts of time bounds. I think that the master theorem and master method are synonyms for the same thing, and if you haven’t encountered the master method yet it may be worth waiting a bit before answering this question so that you can use that technique. – templatetypedef May 24 '20 at 19:24

0 Answers0