GATE / CS ARCHIVE

GATE CSE 2015 SET 3 / QUESTION 64

GATE CSE 2015 Set 3 Q64

Algorithms · Asymptotic Analysis & Recurrences · Full GATE CSE 2015 Set 3 paper

GATE 2015 Set 3, Q64 2 marks · MCQ
Report issue

Asymptotic Analysis & Recurrences

Question 64, GATE 2015: Let f(n)=n and g(n)=n^(1+sin n), for positive integers n, with sine measured in radians. Which asymptotic statements hold? I: f(n)=O(g(n)); II: f(n)=Ω(g(n)). Options: (A) I only; (B) II only; (C) both; (D) neither.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

1. The ratio g(n)/f(n)=nsin n.

2. Since1/(2π) is irrational, integer n modulo 2π is dense, and every tail is dense. There are therefore arbitrarily large n with sin n≥1/2 and arbitrarily large n with sin n≤−1/2. Along the former subsequence g/f≥sqrt(n) is unbounded, ruling out f=Ω(g); along the latter f/g≥sqrt(n) is unbounded, ruling out f=O(g). Thus neither statement holds, D, with sine in radians.

Original paper, page 78 · Answer key