Answered step by step
Verified Expert Solution
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:
Tm Tm Tm cm T d
Stavros: I think Tm in Omlogm Lets use recursion tree method to show this. The longest path from the root to a leaf is log m after drawing the tree we can see the cost of
each level including the last one is less than or equal to cm So the total cost is cmlog m in Omlogm
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 log m
log m However, using the fact that the tree may have leaves based on its height
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 Tm is in omega mlogm and this implies that Tm cannot be in Omlogm
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 Tm and justify your answer only for the upper bound.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started