1

I am trying to multiple two big integer with Karatsuba algorithm. I known that O(n) is time complexity and T(n) is worst-case time complexity.

Can some one please explain why:

T(n) = 4T(n/2) + O(n) is O(n^2)

And

T(n) = 3T(n/2) + O(n) is O(n^1.59)

1 Answer 1

1
T(n) = 4T(n/2) + O(n)

According to the Master theorem:

T(n) is O(n^log_2(4)) = O(n^2)

and

T(n) = 3T(n/2) + O(n)

is

T(n) = O(log_2(3)) ~ O(n^1,5849)

so you can round it to 1.590.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. Its generic form case 1 of Master theorem.
@NhatDinh yes it is

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.