algorithm - Big O or Big theta? -


suppose have function f(n)= log n , function g(n)=log n^2. question f(n)=o(g(n)) or f(n)=big_theta(g(n)). since log n^2 = 2 log n way put question can use fraction constant k? big_theta option, have k1=1/4 lower bound , k2=1 upper bound. okay?

obviously, k cannot 0 or negative not sure fraction , did not see clear answer on web or in books looked in.

thanks in advance help.

both f(n)= Θ(g(n)) , f(n)= Θ(g(n)). please note @ same time true f(n)=o(g(n)). intuitively big-oh means f bounded above g(n)(i.e. grows no faster g). big theta on other hand means f bounded both above , below g(i.e. grows precisely fast g). please note last 2 sentences not absolutely precise purpose of being easier understand , focus on intuitive meaning of rather theory.


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -