in Algorithms recategorized by
229 views
1 vote
1 vote

Consider the following three functions defined for all positive integers $n \geq 0$.
\[
\begin{array}{l}
f(n)=|\sin (n)+n|, \\
g(n)=n, \\
h(n)=|\sin (n)| .
\end{array}
\]

Which of the following statements about these functions is / are true?

  1. $f(n)=O(g(n))$
  2. $g(n)=O(f(n))$
  3. $h(n)=O(g(n))$

 

  1. Only $\text{(i)}$ is true.
  2. Only $\text{(ii)}$ is true.
  3. Only $\text{(i)}$ and $\text{(ii)}$ are true.
  4. Only $\text{(ii)}$ and $\text{(iii)}$ are true
  5. All of $\text{(i), (ii)}$, and $\text{(iii)}$ are true.

 

in Algorithms recategorized by
by
229 views

1 comment

f(n) = $\Theta$ (g(n))

h(n) = O (g(n)) = O (f(n))

Hence option Eā€¦.

 

1
1

Please log in or register to answer this question.

Answer:

Related questions