• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Top MCQs on Complexity Analysis using Recurrence Relations with Answers

Question 11

Which one of the following correctly determines the solution of the recurrence relation with T(1) = 1?
T(n) = 2T(n/2) + Logn 
  • Θ(n)
  • Θ(nLogn)
  • Θ(n*n)
  • Θ(log n)

Question 12

The worst-case running time of Merge sort algorithm is described by the following recurrence relation :
                 ⌈ 1               , if n = 1
       T(n)  =   | 2T(n/2)+ n      , otherwise
                 ⌊
Given recurrence equation evaluates to -
  • 2k T(n/2k) + kn
  • 2k T(nk/2) + kn
  • nk T(n/2k)
  • T(n/2k) + kn

Question 13

Consider the following recurrence relation GATECS2003Q35 The value of T(m2) for m ≥ 1 is
  • (m/6) (21m - 39) + 4
  • (m/6) (4m2 - 3m + 5)
  • (m/2) (m2.5 - 11m + 20) - 5
  • (m/6) (5m3 - 34m2 + 137m - 104) + (5/6)

Question 14

The solution to the recurrence equation T(2k) = 3 T(2k-1) + 1, T (1) = 1, is:
  • 2k
  • (3k + 1 - 1)/2
  • 3log2k
  • 2log3k

Question 15

Consider the following three functions.
f1 = 10n
f2 = nlogn
f3 = n√n 
Which one of the following options arranges the functions in the increasing order of asymptotic growth rate?
  • f3,f2,f1
  • f2,f1,f3
  • f1,f2,f3
  • f2,f3,f1

Question 16

Select the correct asymptotic complexity of an algorithm with runtime T(n, n) where
T(x, c) = Θ(x) for c <= 2,
T(c, y) = Θ(y) for c <= 2, and
T(x, y) = Θ(x+y) + T(x/2, y/2) 
  • Θ(nLogn)
  • Θ(n2)
  • Θ(n)
  • Θ(n2Logn)

Question 17

Let f(n) = n and g(n) = n(1+sin n), where n is a positive integer. Which of the following statements is/are correct?
I.  f(n) = O(g(n))
II. f(n) = Ω(g(n))  
  • Only I
  • Only II
  • Both I and II
  • Neither I nor II

Question 18

Consider a list of recursive algorithms and a list of recurrence relations as shown below. Each recurrence relation corresponds to exactly one algorithm and is used to derive the time complexity of the algorithm.
Recursive Algorithm Recurrence Relation
P. Binary search I. T(n) = T(n-k) + T(k) + cn
Q. Merge sort II. T(n) = 2T(n-1) + 1
R. Quick sort III. T(n) = 2T(n/2) + cn
S. Tower of Hanoi IV. T(n) = T(n/2) + 1
  • P-II, Q-III, R-IV, S-I
  • P-IV, Q-III, R-I, S-II
  • P-III, Q-II, R-IV, S-I
  • P-IV, Q-II, R-I, S-III

Question 19

Consider the recurrence relation a1 = 8, an = 6n2 + 2n + an-1. Let a99 = k x 104. The value of K is _____   Note : This question was asked as Numerical Answer Type.
  • 190
  • 296
  • 198
  • 200

Question 20

The given diagram shows the flowchart for a recursive function A(n). Assume that all statements, except for the recursive calls, have O(1) time complexity. If the worst case time complexity of this function is O(nα), then the least possible value (accurate up to two decimal positions) of α is __________ z9
  • 2.2 to 2.4
  • 3.2 to 3.4
  • 0 to 1.8
  • 1

There are 35 questions to complete.

Last Updated :
Take a part in the ongoing discussion