in Algorithms edited by
17,368 views
67 votes
67 votes

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?

  1. $f(n) = O(g(n))$
  2. $f(n) = \Omega(g(n))$
  1. Only I
  2. Only II
  3. Both I and II
  4. Neither I nor II
in Algorithms edited by
17.4k views

4 Comments

even for positive values of n, Sin n can be negative
4
4

if instead g(n)=n^(1+sin n)  ,we have g(n)=n^(2+sin n) then sin n max value 1 (g(n)=n^2) and min value -1 (g(n)=n

so option 1 would be correct.

0
0

here, use of the sentence "where n is a positive number" is about n being equal to 0, 45, 60, 90, 180,  270, 360 (not negative -45, -90  etc.,)

here sinn (sin0, sin45, sin60, sin180 ) equals -1 to 1 

note: sinn value can be positive or negative, n should be positive number is what meant 

0
0

11 Answers

0 votes
0 votes
I think it is D. Neither 1 nor 2.

Because it is mathematically not comparable because there are infinitly many solution for n.
0 votes
0 votes

Answer: (D)

Explanation: The value of sine function varies from -1 to 1.
For sin = -1 or any other negative value, I becomes false.
For sin = 1 or any other positive value, II becomes false.

0 votes
0 votes
Taking  log with base n on both function will give us, f(n) = 1 always and g(n) = 1 + sin(n).

So we can clearly see that g(n) can be greater or smaller depending on the value of sine function, and sine function for any n can be negative or positive, if it’s negative then g(n) < f(n) and if it’s positive then g(n) > f(n).  We really can’t compare so we choose the most sane option here, which is option D.
Answer:

Related questions