The GATE Grind

GATE 2015 CS (CS3) – Question 64

Algorithms · Asymptotic Analysis and Time/Space Complexity · 2 marks · Multiple choice

For positive integer n, $f(n)=n$ and $g(n)=n^{1+\sin n}$. Which hold? I: f=O(g). II: f=Ω(g).

  1. I only
  2. II only
  3. Both
  4. Neither

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (D) Neither

Explanation

The ratio is $f/g=n^{-\sin n}$. Integer arguments modulo 2π visit intervals where sin n is bounded above zero and intervals where it is bounded below zero infinitely often. Along the first subsequence the ratio tends to zero, and along the second it grows without bound. Thus neither an eventual positive lower bound nor a finite upper bound exists. Answer D.

More Asymptotic Analysis and Time/Space Complexity questions

All Asymptotic Analysis and Time/Space Complexity questions →