algorithm - Understanding asymptotic notation homework -
this problem steven skiena's algorithm design manual book. homework , not looking solution. want know if understand concept , approaching right way.
find 2 functions f(n) , g(n) satisfy following relationship. if no such f , g exist, write none.
a) f(n)=o(g(n)) , f(n)≠Θ(g(n))
so i'm reading g(n) strictly (little-oh) larger f(n) , average not same. if i'm reading correctly answer is:
f(n) = n^2 , g(n) = n^3
b) f(n)=Θ(g(n)) , f(n)=o(g(n))
i'm taking mean f(n) on average same g(n) g(n) larger, answer is:
f(n)=n+2 , g(n)=n+10
c) f(n)=Θ(g(n)) , f(n)≠o(g(n))
f(n) on average same g(n) , g(n) not larger:
f(n)=n^2+10 , g(n)=n^2
d) f(n)=Ω(g(n)) , f(n)≠o(g(n))
g(n) lower bound of f(n):
f(n)=n^2+10 , g(n)=n^2
now understanding of problem correct? if not, doing wrong? if correct, solutions make sense? appreciated.
thanks!!
Comments
Post a Comment