Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

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

Students also viewed these Databases questions