Question: 6. The Tree Method Consider the following recurrence: if n 1 A(n) 4A(n/2) +n otherwise We want to find an exact closed form of this

 6. The Tree Method Consider the following recurrence: if n 1

6. The Tree Method Consider the following recurrence: if n 1 A(n) 4A(n/2) +n otherwise We want to find an exact closed form of this equation by using the tree method. (a) (2 points) Draw your recurrence tree (as shown in the class; see lecture 18, slide 19). (b) (1 point) What is the size of the input at level i (as in class, call the root level 0)? (c) (2 points) what is the number of nodes at level i? Note: let i0 indicate the level corresponding to the root node. So, wheni 0, your expression should be equal to 1 (d) (3 points) What is the total work at the i-th recursive level? Be sure to show your work for full credit. (e) (1 point) What is the last level of the tree? () (2 points) What is the work done in the base case? (g) (3 points) Combine your answers from previous parts to get an expression for the total work. Simplify the expression to a closed form. Be sure to show your work for full credit. (h) (1 point) From the closed form you computed above, give a tight-O bound. No need to prove it. (Hint: You may need to simplify the closed form.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!