Asymptotic Notation: GATE CS Previous Year Questions

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 21–25 of 40

Q21GATE 20101 markMCQ−0.33 if wrong
Two alternative packages A and B are available for processing a database having 10k10^{k} records. Package A requires 0.0001n2n^{2} time units and package B requires 10nlog⁡10n10n \log _{{10}} n time units to process n records. What is the smallest value of k for which package B will be preferred over A?

Q22GATE 20081 markMCQ−0.33 if wrong
Arrange the following functions in increasing asymptotic order:
a. n1/3n^{1/3}
b. ene^n
c. n7/4n^{7/4}
d. nlog⁡9nn \log^9n
e. 1.0000001n1.0000001^n

Q23GATE 20082 marksMCQ−0.67 if wrong
Consider the following C functions:
int f1(int n)
{
  if(n == 0 || n == 1)
    return n;
  else
    return (2*f1(n-1) + 3*f1(n-2));
}
 
int f2(int n)
{
  int i;
  int X[N], Y[N], Z[N] ;
  X[0] = Y[0] = Z[0] = 0;
  X[1] = 1; Y[1] = 2; Z[1] = 3;
  for(i = 2; i <= n; i++)
  {
    X[i] = Y[i-1] + Z[i-2];
    Y[i] = 2*X[i];
    Z[i] = 3*X[i];
  }
  return X[n] ;
}
The running time of f1(n) and f2(n) are

Q24GATE 20082 marksMCQ−0.67 if wrong
Consider the following functions:
f(n)=2nf(n)=2^{n}
g(n)=n!g(n)=n!
h(n)=nlognh(n)=n^{log n}

Which of the following statements about the asymptotic behaviour of f(n), g(n), and h(n) is true?

Q25GATE 20071 markMCQ−0.33 if wrong
Exponentiation is a heavily used operation in public key cryptography. Which of the following options is the tightest upper bound on the number of multiplications required to compute bn mod m,0≤b,n≤mb^n \bmod{m}, 0 \leq b, n \leq m ?

Keep practising

Topics in Algorithms

All CS topics ›