in Algorithms edited by
670 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
670 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

9 Comments

@Bikram sir i have given answer but it is showing answer d can you please check once
0
0
yes for this questin answer D is correct option.

what option you put as an answer ? is it D , if yes plz post that snap.
0
0
No Sir I have given option A , after reading 1st line , I think the answer is option A sry
0
0
@bikram sir  

a-true

b-true

d-true

then option C is the correct ans
–1
–1

if f(n) = O(n2),    g(n) = O(n3), then how     option  c)  f(n).g(n)=O(n4) is possible ?

also if   h(n) = O(n4)    and g(n) = O(n3) then how   option  b)   h(n)-g(n)=O(n) is possible ?

so option b) and c) is incorrect hence D) is correct/ valid option.

0
0
Sir (a) and (d) are right. but there is no option having (a)

and you are saying option D is correct which is containing (b) and (d) but (b) is not correct. so how option D is the answer?
0
0
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