Asymptotic Notation · Algorithms
40 questions · asked in 21 of 27 years (2000–2026)
MCQ 37 · MSQ 2 · NAT 11-mark 27 · 2-mark 13
2000Questions per year2026
Questions 6–10 of 40
Which one of the following statements is TRUE for all positive functions ?
Answer: (A)
(A) Let be a polynomial with (it must be positive for large ). Then and . The ratio , a positive constant, so . This is true.
(B) For , . The two are equal, not strictly smaller, so fails.
(C) For , and . grows much faster, so fails.
(D) For , is far smaller than , so fails.
Answer: (A)
(B) For , . The two are equal, not strictly smaller, so fails.
(C) For , and . grows much faster, so fails.
(D) For , is far smaller than , so fails.
Answer: (A)
Consider the following three functions.
Which one of the following options arranges the functions in the increasing order of asymptotic growth rate?
Which one of the following options arranges the functions in the increasing order of asymptotic growth rate?
Answer: (D)
Express each function with base 2:
-
-
-
Now look at the exponents. For large n:
Answer:
-
-
-
Now look at the exponents. For large n:
Answer:
There are n unsorted arrays: . Assume that n is odd. Each of contains n distinct elements. There are no common elements between any two arrays. The worst-case time complexity of computing the median of the medians of is ________ .
Answer: (C)
Let us go through each part:
- Find the median of one unsorted array of n elements using linear-time selection. It takes per array. For n arrays this gives .
- Now find the median of those n medians: .
The total is . It cannot be lower, since all elements have to be examined.
Answer:
- Find the median of one unsorted array of n elements using linear-time selection. It takes per array. For n arrays this gives .
- Now find the median of those n medians: .
The total is . It cannot be lower, since all elements have to be examined.
Answer:
Consider the following functions from positive integers to real numbers:
.
The CORRECT arrangement of the above functions in increasing order of asymptotic complexity is:
.
The CORRECT arrangement of the above functions in increasing order of asymptotic complexity is:
Answer: (B)
Compare the five functions as grows.
decreases towards , so it is the smallest. is a constant and is bigger than for large . , and all grow without limit, so they are above the constant .
Among the three: for . And grows slower than , since by L'Hopital's rule.
So the order is .
Answer: (B)
decreases towards , so it is the smallest. is a constant and is bigger than for large . , and all grow without limit, so they are above the constant .
Among the three: for . And grows slower than , since by L'Hopital's rule.
So the order is .
Answer: (B)
Match the algorithms with their time complexities:
Answer: (C)
Let us go through each item:
- Towers of Hanoi: , which matches (iii)
- Binary search: , which matches (iv)
- Heap sort in the worst case: , which matches (ii)
- Adding two n n matrices takes additions, so , which matches (i)
Answer: P-(iii), Q-(iv), R-(ii), S-(i)
- Towers of Hanoi: , which matches (iii)
- Binary search: , which matches (iv)
- Heap sort in the worst case: , which matches (ii)
- Adding two n n matrices takes additions, so , which matches (i)
Answer: P-(iii), Q-(iv), R-(ii), S-(i)
Keep practising