Question: Question 1 . Solve the following recurrences using ( a ) repeated substitution method; and ( b ) master theorem if applicable and if not

Question 1. Solve the following recurrences using (a) repeated substitution method; and (b) master theorem if applicable and if not say why.
1.T(1)=1, T(n)=2T(n2)+n2 logn 2.T(1)=C, T(n)=T(n1)+logn 3.T(1)=C, T(n)=2T(n2)+3n2
4.T (n)=3T ( n2)+ n
Question 2. Solve the following recurrences using recursion tree 1.T(n)= T(n)+ T(3n)+ cn
Question 3.
a) Design a brute-force algorithm for computing the value of a polynomial p(x)=anxn +an1xn1+...+a1x+a0
at a given point x0 and determine its worst-case efficiency class.
b) If the algorithm you designed is in \Theta (n2), design a linear algorithm for this problem.
c) Is it possible to design an algorithm with a better than linear efficiency for this problem?
Question 4. Given an unsorted array A[1..n]. Devise a divide-and-conquer based algorithm to find the second largest number. (a) Write the pseudo code, and (b) What is the complexity?
Question 5. Consider a list A[1..n] of size n containing real numbers in R. Consider for exam- ple, A ={10,3.5,17.2,2.35,15.45,9.1,1.25}. Devise a divide and conquer based algorithm (must be a single procedure) to compute the average
a) Briefly describe in no more than two lines the basic idea of your algorithm. b) Write the pseudo code of your devised algorithm.
c) Write the recurrence relation expressing the complexity of the algorithm

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!