algorithm - Is it possible to prove that f(n) + g(n) = theta(n^2) for f(n) = theta(n^2) & g(n) = O(n^2) -


is there way prove

f(n) + g(n) = theta(n^2) 

or impossible? assuming f(n) = theta(n^2) & g(n) = o(n^2)

i tried following: f(n) = o(n^2) & g(n) = o(n^2). proved

0 <= f(n) <= c1*n^2  0 <= f(n) <= c2*n^2 c1 > 1 & c2 > 1 

yes, can prove it.

  • f(n) in theta(n^2), there exists constants c1,c2,n, such n>n1 f(n) bounded: c1*n^2 <= f(n) <= c2*n^2 (by definiton)
  • g(n) in o(n^2), there exist constants c3,n2 such n>n2, g(n) bounded: g(n) <= c3*n^2 (by definition)

now, have @ f(n)+g(n) n>max{n1,n2}:

f(n) + g(n) <= c2*n^2 + c3*n^2 = (c2+c3)*n^2 

also,assuming f(n) non-negative, c1*n^2 <= f(n) <= f(n) + g(n), again n>max{n1,n2}>=n1.

we got n=max{n1,n2}, there exists constants c=c1, c'=(c2+c3), such n>n

c*n^2 <= f(n) + g(n) <= c'*n^2 

by definition of big theta, means f(n)+g(n) in theta(n^2)


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -