0

For each of the 2 pairs of functions I need to figure out the following:

  1. g(n) = Θ(h(n))?
  2. g(n) = O(h(n))?
  3. g(n) = Ω(h(n))?
  4. g(n) = o(h(n))?
  5. g(n) = ω(h(n))?

Pair one g(n) = (64)(n/4), h(n) = 256(n/8)

Pair two g(n) = n1024, h(n) 2(lg(n)*lg(n)), lg is base 2

For pair one, I have the limit as n->inf for g(n)/h(n) = inf. Therefore:

  1. g(n) = Θ(h(n)). No, given g(n) = O(h(n)) is not true
  2. g(n) = O(h(n)). No, if g(n)/h(n) headed towards 0 and not infinity
  3. g(n) = Ω(h(n)). Yes, given g(n) completely overtakes h(n) in speed as n increases
  4. g(n) = o(h(n)). No, given g(n) should never be below h(n) for some n0 > 0.
  5. g(n) = ω(h(n)). I think yes, given g(n) = Ω(h(n)) is true but g(n) = O(h(n)) is not. Which was the same logic for o(h(n)) in pair one.

So for pair two, I have the limit as n->inf for g(n)/h(n) = 0. Therefore:

  1. g(n) = Θ(h(n)). No, given g(n) = Ω(h(n)) is not true
  2. g(n) = O(h(n)). Yes, given g(n) completely overtaken by h(n) in speed
  3. g(n) = Ω(h(n)). No, if g(n)/h(n) headed towards infinity and not 0
  4. g(n) = o(h(n)). Yes, given g(n) = O(h(n)) is true but g(n) = Θ(h(n)) is not
  5. g(n) = ω(h(n)). I'm thinking no, same reasoning as g(n) = Ω(h(n)) being no

Made edits based on user plop comments.

  • In the first pair $\frac{g(n)}{h(n)}=\frac{64^{n/4}}{256^{n/8}}=\frac{2^{6n/4}}{2^{n}}=2^{n/2}\to\infty$ – plop Oct 01 '20 at 00:51
  • In the second pair $\frac{g(n)}{h(n)}=\frac{n^{1024}}{2^{\log^2(n)}}=\frac{n^{1024}}{n^{\log(n)}}=n^{1024-\log(n)}\to0$ – plop Oct 01 '20 at 00:54
  • Gotcha, yeah the first pair I should've realized given just graphing the formulas. The second pair I'm pretty shocked at, I don't think I've seen that rule for logarithms but they are indeed equal for 2log2(n) = nlog(n). Given my edits does my logic for my yes/no's for 1-5 make sense? – user126936 Oct 01 '20 at 01:28
  • It is this $2^{\log^2(n)}=(2^{\log(n)})^{\log(n)}=n^{\log(n)}$. A product in the exponent is a nested exponentiation. The $n$ in the base appears because in parentheses we have $2^{\log(n)}$, which is $n$, since the logarithm is in base $2$. – plop Oct 01 '20 at 01:52
  • Gotcha, that makes sense. Thanks! Do you think my yes/no's for the two parts make sense? – user126936 Oct 01 '20 at 14:44

0 Answers0