10. Give a 8( solution to each of the following divide-and-conquer recurrences. (a) T(n) = 1T(1/2)...
Give asymptotic upper bounds (in terms of O) for T(n) in each of the following recurrences. Assume that T(n) is constant for n < 2. Make your bounds as tight as posible. a) T(n)=T(H) +1; b) T(n) = T(n-1) + 1/n;
Give asymptotic upper and lower bounds for T(n)in each of the following recurrences. Assume that T(n)is constant forn≤10. Make your bounds as tight as possible, and justify your answers. 1.T(n)=3T(n/5) +lg^2(n) 2.T(n)=T(n^.5)+Θ(lglgn) 3.T(n)=T(n/2+n^.5)+√6046 4.T(n) =T(n/5)+T(4n/5) +Θ(n)
Give the asymptotic bounds for T(n) in each of the following recurrences. Make your bounds as tight as possible and justify your answers. Assume the base cases T(0)=1 and/or T(1) = 1. 1. T(n) = T(n-1) + 2n 2. T(n) = T(n-2) = 3
Suppose that, in a divide-and-conquer algorithm, we always divide an instance of size n of a problem into 5 sub-instances of size n/3, and the dividing and combining steps take a time in Θ(n n). Write a recurrence equation for the running time T (n) , and solve the equation for T (n) 2. Suppose that, in a divide-and-conquer algorithm, we always divide an instance of size n of a problem into 5 sub-instances of size n/3, and the dividing...
A divide-and-conquer algorithm solves a problem by dividing the input (of size n>1, T(1) =0) into two inputs half as big using n/2-1 steps. The algorithm does n steps to combine the solutions to get a solution for the original input. Write a recurrence equation for the algorithm and solve it.
A divide-and-conquer algorithm solves a problem by dividing the input (of size n>1, T(1) =0) into two inputs half as big using n/2-1 steps. The algorithm does n steps to combine the solutions to get a solution for the original input. Write a recurrence equation for the algorithm and solve it.
Solve the following recurrences. You only need to derive the asymptotic solution (in 0) 2. T(n) = 3T(1) + TRT, T(1) = 1. Solve the following recurrences. You only need to derive the asymptotic solution (in 0) 2. T(n) = 3T(1) + TRT, T(1) = 1.
Give asymptotic upper and lower bounds for T(n) in each of the following recurrences. Assume that T(n) is constant for n ≤ 3. Make your bounds as tight as possible, and justify your answers. 5.a T(n) = 2T(n/3) + n lg n 5.b T(n) = 7T(n/2) + n3 5.c T(n) = 3T(n/5) + lg2 n
1. [12 marks] For each of the following recurrences, use the “master theorem” and give the solution using big-O notation. Explain your reasoning. If the “master theorem” does not apply to a recurrence, show your reasoning, but you need not give a solution. (a) T(n) = 3T(n/2) + n lg n; (b) T(n) = 9T(3/3) + (n? / 1g n); (c) T(n) = T([n/41) +T([n/4])+ Vn; (d) T(n) = 4T([n/7])+ n.
4. (20 points) For each of the following recurrences, give an expression for the runtime T(n) if the recurrence can be solved with the Master Theorem. Otherwise, explain why the Master Theorem does not apply. Justify your answer (1) T(n) = 3n T(n) + n3 (2) T(n)-STC)VIOn* (3 Tn)T)+ n logn (4) T(n) T(n-1) + 2rn (5) T(n) 16TG)+n2