in Algorithms edited by
669 views
0 votes
0 votes

Let $f\left ( n \right )$m  $g\left ( n \right )$ and $h\left ( n \right )$ be functions whose domain is a subset of positive integers such that $f\left ( n \right )= O\left (n^{2}\right), g\left ( n \right )= O\left(n^{3}\right), h\left ( n \right )= O\left(n^{4}\right).$ Then:

  1. $f \left ( n \right ) +g \left ( n \right )= O \left(n^{3}\right)$   
  2. $h \left ( n \right ) -g \left ( n \right )=O \left ( n \right )$    
  3. $f \left ( n \right ).g \left ( n \right )=O\left( n^{4}\right)$   
  4. $h \left ( n \right ) .g \left ( n \right ) =O\left(n^{7}\right)$

Which of the above is/are incorrect?

  1. $(d)$ $only$
  2. $(c)$ $only$
  3. $(b)$ $and$ $(d)$ $only$
  4. $(b)$ $and$ $(c)$ $only$
in Algorithms edited by
by
669 views

1 Answer

2 votes
2 votes
Best answer
Here  (a) is correct because f(n) = O(n^2) and g(n) = O(n^3), and f(n) + g(n) = O(n^3) (Addition Rule asymptotic behavior)
Similarly item (d) is also correct according to the Multiplication Rule for asymptotic behavior. Hence the answer is (D).
selected by

4 Comments

oh no...question was asking which is incorrect.. sorry...i have to be more careful
1
1

@vineet

why not read question carefully !!

it says Which of the above is/are incorrect ? 

0
0
can someone explain option b why it is wrong.
1
1
Answer:

Related questions