Question

In: Computer Science

1 (10 pts) Give a big-θ bound for the solutions of the following recurrence relations. Show...

1 (10 pts) Give a big-θ bound for the solutions of the following recurrence relations. Show work.

(a) T(n) = 8T(n/2) + n^3 + 100n

(b) T(n) = 5T(n/4) + 3n

(c) T(n) = 7T(n/3) + 100n^2

(d) T(n) = 3T(n/3) + 1000√ n

(e) T(n) = T(n − 1) + n^2

Solutions

Expert Solution

a)


b)


c)


d)


e)
T(n)
= T(n-1) + n^2
= T(n-2) + (n-1)^2 + n^2
= T(n-3) + (n-2)^2 + (n-1)^2 + n^2
= T(1) + 2^2 + ... + (n-2)^2 + (n-1)^2 + n^2
= 1 + 2^2 + ... + (n-2)^2 + (n-1)^2 + n^2
formula for sum of squares of first n numbers is n(n+1)(2n+1)/6
ignore constant terms.
so, time complexity is ?(n^3)
Answer: ?(n^3)

Related Solutions

Give exact solutions for each of the recurrence relations. Find the equilibrium values. Are the equilibrium...
Give exact solutions for each of the recurrence relations. Find the equilibrium values. Are the equilibrium values stable? a. x(n+1) = 1.5x(n) x(0) = 20 b. x(n+1) = -0.75x(n) + 5 x(0) = 10 c. x(n+1) = 1.2x(n) - 5 x(0) = 2
Derive a Θ-bound on the solution to the following recurrence. using iterative recursion and check your...
Derive a Θ-bound on the solution to the following recurrence. using iterative recursion and check your answer with master theorem result T(n) = T (1/3 n) + log 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
Solve the following recurrence relations. a. x(n) = x(n − 1) + 3 for n >...
Solve the following recurrence relations. a. x(n) = x(n − 1) + 3 for n > 1, x(1) = 0 b. x(n) = 5x(n − 1) for n > 1, x(1) = 6 c. x(n) = x(n/5) + 1 for n > 1, x(1) = 1 (solve for n = 5k )
Problem 4 (2+2+2+2 marks). Analyze the following recurrence relations using the Master Theorem, and give a...
Problem 4 (2+2+2+2 marks). Analyze the following recurrence relations using the Master Theorem, and give a Θbound for each. (a) T(N) = 2T(N/4) + 1. (b) T(N) = 2T(N/4) + √ N. (c) T(N) = 2T(N/4) + N2 . (d) T(N) = 9T(N/3) + N.
1. Using domain and range transformations, solve the following recurrence relations: a) T(1) = 1, T(n)...
1. Using domain and range transformations, solve the following recurrence relations: a) T(1) = 1, T(n) = 2T(n/2) + 6n - 1 b) T(1) = 1, T(n) = 3T(n/2) + n^2 - n
Find the closed formula solution to each of the following recurrence relations with the given initial...
Find the closed formula solution to each of the following recurrence relations with the given initial conditions. Use an iterative approach and show your work! What is a_100? a) a_n=a_(n-1)+2,a_0=3 b) a_n=a_(n-1)+2n+3,a_0=4 c) a_n=2a_(n-1)-1,a_0=1 d) a_n=-a_(n-1),a_0=5
Find the closed formula solution to each of the following recurrence relations with the given initial...
Find the closed formula solution to each of the following recurrence relations with the given initial conditions. Use an iterative approach and show your work! What is a100 ? an=an-1+2, a0=3 an=an-1+2n+3, a0=4 an=2an-1-1, a0=1 an=-an-1, a0=5
For exercise 10, find all solutions exactly on the interval 0 ≤ θ < 2π. 10....
For exercise 10, find all solutions exactly on the interval 0 ≤ θ < 2π. 10. cot x + 1 = 0 For the following exercises, solve exactly on [0, 2π) 13. 2cos θ = √2 16. 2sin θ = − √3 19. 2cos(3θ) = −√2 22. 2cos (π/5 θ)= √3
6. Solve the following recurrence relations t(n) = t(n-1) + 3 for n>1 t(1) = 0...
6. Solve the following recurrence relations t(n) = t(n-1) + 3 for n>1 t(1) = 0 t(n) = t(n-1) + n   for n>1 t(1) = 1 t(n) = 3t(n/2) + n    for n>1, n is a power of 2 t(1) = ½ t(n) = 6t(n-1) – 9t(n-2)   for n>1 t(0) = 0 t(1) = 1
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT