Algorhithm and Analysis assignment 2

1. If T(n)=9T(n/3)+n, then by master method T(n)=

 B.Θ(n^2)

 

2. If T(n)=T(2n/3)+1, then by master method T(n)=

 A. Θ(nlogn)

 

3.If T(n)=2T(n/2)+ Θ(n), then by master method T(n)=

 D.Θ(nlogn)

4.Consider the polynomial p(x) = a0 + a1x + a2x2 +a3x3, where ai≠ 0, for all i. The minimum number of multiplications needed to evaluate p on an input x is:

 A. 3

5. Naive matrix multiplication of two N×N matrices has running time

 C. Θ(N^3)

6.Strassen’s method has running time (for multiplying two n×n matrices)

 D. None of the above

7.Divide and conquer consists of

 B. Divide,Conquer and Combine

 

8.If T(n) = T(n/4) + T(n/2) +n2 , then using recursion tree method

 B. T(n)=Θ(n^2)

9.Recurrence relation for binary search

 T(n)=T(n/2)+Θ(1)

10. Strassen’s algorithm needs____ many multiplications to multiply two 2×2 matrices

 C. 7