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/3)+ T(2m/3)+ c^2m, T(1)= d
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/2 m. after drawing the tree we can see the cost of
each level (including the last one) is less than or equal to c^2m. So, the total cost is c^2mlog3/2m in O(mlogm).
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/2 m
However, using the fact that the tree may have 2^log3/2 m 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 to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

More Books

Students also viewed these Databases questions