Question: Given the following recurrences. Use the recursion tree method to solve each of them. Represent the runtime in one of the asymptotic notations properly. Show

Given the following recurrences. Use the recursion tree method to solve each of them. Represent the runtime in one of the asymptotic notations properly. Show your work of the solving process.

1)

T(n) = O(1) for n = 1, 2

T(n) = 3T(n/3) + O(n) for n > 2 (assume n is an exact power of 3)

2)

T(n) = O(1) for n = 1, 2

T(n) = 3T(n/3) + O(1) for n > 2 (assume n is an exact power o f3)

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!