For each of the following functions, indicate the class T(g(n)) the function belongs to. Use the simplest g(n) possible in your answers. a.)n4-3n+2 b.)3n6-4n+70 c.)2n+n3 d.)logn+n2+nlogn Find the order of growth of the following sums. a.)i=1n(i2-2i+3)3 b.)i=1nj=1i1 Consider the following recursive algorithm. ALGORITHM Q(n) //Input: A positive integer n if n=1 return 2 else return Qn-1+4*n-2 a.)What value is returned when n = 4? b.)Set up a recurrence relation for the number of multiplications made by this algorithm and solve it. c.)What is the efficiency class of this algorithm, based on your answer in part c? Hypothesize a likely efficiency class of an algorithm based on the following empirical observations of its basic operation's count. Size100020003000400050006000Count1,0214,0039,01115,99224,79736,134
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here