Question 21
When n = 22k for some k ≥ 0, the recurrence relation
T(n) = √(2) T(n/2) + √n, T(1) = 1
evaluates to :
Question 22
Question 23
Function F (n, m: integer): integer; begin If (n<=0) or (m<=0) then F:=1 else F:= F(n-1,m) + F(n, m-1); end;Use the recurrence relation to answer the following question. Assume that n, m are positive integers. Write only the answers without any explanation. a. What is the value of F(n,2)? b. What is the value of (n,m)? c. How many recursive calls are made to the function F, including the original call, when evaluating F(n,m).
Question 24
The recurrence relation
T(1) = 2 T(n) = 3T(n/4)+n
has the solution, T(n) equals to
Question 25
A. Heap Construction | p. O(n log n) |
B. Hash table construction with linear probing | q. O(n2) |
C. AVL Tree construction | r. O(n) |
Question 26
Consider the following recurrence: T(n) = 2T(n1/2) + 1 T(1) = 1 Which of the following is true?
Question 27
Question 28
T(n) = T(n-1) + T(n-2) — T(n-3), if n > 3 = n, otherwiseThen what should be the relation between T(1), T(2) and T(3), so that the order of the algorithm is constant ?
Question 29
Question 30
There are 35 questions to complete.