Question: . ( 5 points ) Let T ( n ) be the running time of Jump. Give a recursive definition of T ( n )
points Let Tn be the running time of Jump. Give a recursive definition of Tn Solution: T a T b T c TnTn d points What is the height of the recursion tree for Tn assuming n is a power of Solution: logn points What is amount of work aka sum of the values in the nodes at level k of this tree? Solution: d k points What is the bigTheta running time of Jump? Briefly justify your answer. Solution: The number of leaves is log n n which is n The total number of nodes is proportional to the number of leaves. Since each node contains a constant amount of work, the running time is proportional to the number of nodes. So the running time is n
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
