Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The purpose of this question is to analyze, using the recursion tree method, an algorithm whose time complexity T(n) satisfies the following recurrence: T(1) =

image text in transcribed

The purpose of this question is to analyze, using the recursion tree method, an algorithm whose time complexity T(n) satisfies the following recurrence: T(1) = c1, and if n > 1 then T(n) = 6T(n/3) + c2n^2 where c1 and c2 are constants. We assume that n = 3^q for some integer q

1. Derive an exact expression (i.e., not in asymptotic notation), as a function of n, for the height of the recursion tree (recall that the height of a tree is the largest number of parent-to-child links one goes through from the root to the deepest leaf).

2. Write down an expression for the work associated with level i of the recursion tree (e.g., for level 0, which is the root, it is c2n^2 ).

3. Derive the asymptotic growth rate of the solution for T(n) (i.e., its rate of growth as a function of n using asymptotic notation, not its exact value).

Question 2. (15 points) The purpose of this question is to analyze, using the recursion tree method, an algorithm whose time complexity T(n) satisfies the following recurrence: T(1) = ci, and if n > 1 then T(n) = 6T(n/3) + cand where ci and ca are constants. We assume that n = 39 for some integer q. 1. Derive an exact expression (i.e., not in asymptotic notation), as a function of n, for the height of the recursion tree (recall that the height of a tree is the largest number of parent-to-child links one goes through from the root to the deepest leaf). 2. Write down an expression for the work associated with level i of the recursion tree (e.g., for level 0, which is the root, it is c2n). 3. Derive the "asymptotic growth rate" of the solution for T(n) i.e., its rate of growth as a function of n using @ asymptotic notation, not its exact value)

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

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

Recommended Textbook for

More Books

Students also viewed these Databases questions