Are statements below true or false?
(1+1/n)n=Θ(logn)
loglogn=o(logn) Note that it is little-o, not big-O
For first statement, I thought it would have Θ(n2) complexity so it is false, while the second statement is true. Is my assumption correct?
Answer
It is a standard exercise to show that an:=(1+1n)n is bounded between 2 and 3 for all n. (In fact, this sequences approaches e=2.718⋯.) So an=Θ(1) by definition of Θ. Since Θ is an equivalence relation and 1∉Θ(logn), it follows that an∉Θ(logn) as well.
The second statement loglogn=o(logn) is true. There are many ways to show this; for instance: logn=exp(loglogn)=exp(12loglogn)2≥(12loglogn)2=14(loglogn)2,
and loglogn→∞ as n→∞. (I used the fact that ex>x for all x in the above.)
No comments:
Post a Comment