Question

In: Computer Science

Give upper and lower bounds for T(n) in the following recurrence: T(n) = 3T(n/4) + n

Give upper and lower bounds for T(n) in the following recurrence: T(n) = 3T(n/4) + n

Solutions

Expert Solution

Solution:

Given,

=>T(n) = 3T(n/4) + n

Explanation:

=>T(n) = 3T(n/4) + n

=>T(n) = 3T(n/4) + (n)...(1)

Master's theorem,

=>T(n) = aT(n/b) + (n^k*(logn)^p)...(2)

Where a 1, b > 1, k 0 and p is any real number.

Compare (1) and (2)

=>a = 3, b = 4, k = 1 and p = 0

Finding b^k:

=>b^k = 4^1

=>b^k = 4

=>a < b^k hence third case of Master's theorem.

=>T(n) = (n^k*(logn)^p)

=>T(n) = (n^1*(logn)^0)

=>T(n) = (n)

=>Using definition of big-theta, upper bound = O(n) and lower bound = (n)

I have explained each and every part with the help of statemetns attached to the answer above.


Related Solutions

Give asymptotic upper and lower bounds for T(n). Assume that T(n) is constant for n <=...
Give asymptotic upper and lower bounds for T(n). Assume that T(n) is constant for n <= 2. Make your bounds as tight as possible, and justify your answers. T(n) = T(n-2) + n^2
Solve the recurrence equation. T(n) = 3T (n/3) + Cn T(1) = C
Solve the recurrence equation. T(n) = 3T (n/3) + Cn T(1) = C
Prove the upper and lower bound of T(n) = T(n/3) + T(2n/3) + O(n)
Prove the upper and lower bound of T(n) = T(n/3) + T(2n/3) + O(n)
Solve the following recurrence relations: (find an asymptotic upper bound O(?) for each one) a. T(n)...
Solve the following recurrence relations: (find an asymptotic upper bound O(?) for each one) a. T(n) = T(2n/3)+T(n/3) + n^2 b. T(n) = √nT(√n) + n c. T(n) = T(n-1)+T(n/2) + n The base case is that constant size problems can be solved in constant time (O(1)). You can use the induction, substitution or recursion tree method
Use a recursion tree to determine a good asymptotic upper bound on the recurrence T(n) =...
Use a recursion tree to determine a good asymptotic upper bound on the recurrence T(n) = 2T(n/3) + 2n. Use the substitution method to verify your answer
Give asymptotic tight bounds for T(n) in each of the following recurrences using recursion tree. a....
Give asymptotic tight bounds for T(n) in each of the following recurrences using recursion tree. a. T(n) = 2T(n − 1) + 1 b. T(n) = t(n − 1) + n c. T(n) = 2T (n/4) + √n
- Solve the following recurrence relation : T(n) = T(αn) + T((1 − α)n) + n
- Solve the following recurrence relation : T(n) = T(αn) + T((1 − α)n) + n
Using the backward substitution method, solve the following recurrence relations: a.T(n)= T(n−1)+3forn>1 ,T(1)=0 b.T(n)=3T(n−1) forn>1 ,T(1)=7...
Using the backward substitution method, solve the following recurrence relations: a.T(n)= T(n−1)+3forn>1 ,T(1)=0 b.T(n)=3T(n−1) forn>1 ,T(1)=7 c.T(n)= T(n−1)+n for n>0 ,T(0)=0 d.T(n)= T(n/2)+n for n>1 ,T(1)=1(solve for n=2k) e.T(n)= T(n/3)+1forn>1 ,T(1)=1(solve for n=3k)
What is the recurrence relation for T(n) = (n-1)T(n-1) + n?
What is the recurrence relation for T(n) = (n-1)T(n-1) + n?
Show for the following recurrence that T(n) = T(n/3) + n*log(n) is O(n*log(n)) (not using the...
Show for the following recurrence that T(n) = T(n/3) + n*log(n) is O(n*log(n)) (not using the Master theorem please)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT