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))
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)) Correct Answer Neither I nor II
Concept:
Sin function value ranges from -1 to + 1. (-1, 0, 1)
Explanation:
Case 1: when sin(n) is -1,
g(n) = n(1 - 1) = n0 = 1
so, for this case f(n) > g(n) i.e. g(n) = O (f(n))
So, statement 1 is incorrect.
Case 2: when sin(n) is +1,
g(n) = n(1 + 1) = n2
so, for this case f(n) < g(n) i.e. f(n) = O(g(n))
but for this, second statement i.e. f(n) = Ω(g(n)) is incorrect.
Both statements are not true for all values of sin(n).
Hence, option 4 is correct answer.
মোঃ আরিফুল ইসলাম
Feb 20, 2025