Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Stavros and Jessica are discussing about runtime of an algorithm which is given by the following recurrence relation: T ( m ) = T (

Stavros and Jessica are discussing about runtime of an algorithm which is given by the following recurrence relation:
T(m)= T(m)+ T(2m)+ c2m, T(1)= d.33
Stavros: I think T(m) in O(mlogm). Lets use recursion tree method to show this. The longest path from the root to a leaf is log3 m. after drawing the tree we can see the cost of
2
each level (including the last one) is less than or equal to c2m. So, the total cost is c2mlog3 m in O(mlogm).
2
1
2.
3.
Jessica: I believe T (m) in \omega (m log m). Actually based on your argument, T (m) is exponen-
tial in terms of m. I agree with the upper bound on the height of the recursion tree which is log3 m
log3 m. However, using the fact that the tree may have 22 leaves (based on its height)2
and the cost of a leaf being the constant d, we can see that the cost of leaves is exponential in m. That is why T(m) is in \omega (mlogm) and this implies that T(m) cannot be in O(mlogm).
Explain in details, what is correct and what is wrong in the above discussion. More precisely, provide details on which part of their argument is correct and which part is not. Moreover, provide a tight bound for T(m) and justify your answer only for the upper bound.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions