retagged by
366 views

2 Answers

0 votes
0 votes
(b)take f(n)=3^n and g(n)=n!

take log for both function log(f(n))=log(3^n) =>n*log(3) and log(g(n)) =log(n! )=>n*log(n) (we know that log(n!) and n*log(n) are asymptotically equal),now cancel n from both log(f(n)) and log(g(n)) so we can clearly see log(3)<log(n) =>3^n=O(n!)

(note-if log(g(n)) is asymptotically greater than log((f(n)) then g(n) will be asymptotically greater than f(n))

(c)take f(n)=n! and g(n)=n^n

take log both sides so log(f(n))=log(n!) =>n*log(n) and log(g(n))=n*log(n)

(here log(f(n)) and log(g(n)) are asymptotically equal so we can't say anything ,f(n) may be greater or lesser or equal to the g(n))

second method to check f(n)=n!=n*(n-1)*(n-2)......*(1) and g(n)=n*n*n....*n (n times) ,if we compare each term of f(n) and g(n) (first term of f(n) is n and first term of g(n) is n ,second term of f(n) is (n-1) and of g(n) is n and so on) we can clearly say each term of g(n) except first is greater than f(n) ,obviously g(n) is greater than f(n)=>n!=O(n^n)

Related questions

0 votes
0 votes
1 answer
1
3 votes
3 votes
3 answers
2
Sayan Das 1 asked Sep 21, 2016
812 views
0 votes
0 votes
2 answers
3
3 votes
3 votes
1 answer
4