edited by
16,297 views
39 votes
39 votes

Consider the following functions:

  • $f(n) = 2^n$
  • $g(n) = n!$
  • $h(n) = n^{\log n}$

Which of the following statements about the asymptotic behavior of $f(n)$, $g(n)$ and $h(n)$ is true?

  1. $f\left(n\right)=O\left(g\left(n\right)\right); g\left(n\right)=O\left(h\left(n\right)\right)$
  2. $f\left(n\right) = \Omega\left(g\left(n\right)\right); g(n) = O\left(h\left(n\right)\right)$
  3. $g\left(n\right) = O\left(f\left(n\right)\right); h\left(n\right)=O\left(f\left(n\right)\right)$
  4. $h\left(n\right)=O\left(f\left(n\right)\right); g\left(n\right) = \Omega\left(f\left(n\right)\right)$
edited by

5 Answers

2 votes
2 votes

Take log on both sides of the functions and compare each functions.

eg   2n   n!

taking log on both sides

nlog(base 2)  log(n!)

and put n = 2^128 or some 2^k values

 ll get

nlog(base2) < log(n!)

and simlarly for 2^n and n^logn
 
now, 2^n > n^logn
 
so n! > 2^n > n^logn
 
Answer is (D).
 
correct me if i'm wrong
2n
Answer:

Related questions

24 votes
24 votes
6 answers
3
go_editor asked Apr 23, 2016
5,245 views
Let $x_n$ denote the number of binary strings of length $n$ that contain no consecutive $0$s.The value of $x_5$ is $5$$7$$8$$16$