-1

this is the result in the book(Discrete mathematics and its applications) I was reading.

  1. $n^d\in O(b^n)$

where $b>1$ and $d$ is positive

and

  1. $(\log_b(n))^c\in O(n^d)$

where b>1 and d,c are positive

but i am having trouble understanding how that's possible for eg in the second if you have $c$ as some big number like $10^{100}$ and d as $10^{-100}$ they both are positive and b can be 1.0000001 how can we find a $C$ and $k$ for it to be a big-Oh notation

and in the first one if we compare the function by taking log on both sides (ignoring the d here as we can always multiply with it on the other side)

we will have

$\log(n)$ and $n\cdot \log(b)$

now which one of them is bigger as $b$ can be some number like $1.00000000001$

can some one give me proof of these two results. Thanks

edit: in the first one its not $d.n$ but $n^d$

update: i found a same question from another user identical question

it's answer did clear a little bit for me but still left me confused as acc to op's accepted answer $d<log_2(b)$ where, $log_2(b)>0$.

but the result from the book is

$n^d\in O(b^n)$

This tells us that every power of n is big-O of every exponential function of n with a base that is greater than one

There is no such constraint for $d$ (as the statement says for every power of n)

2 Answers2

0

Recall that $f(x)\in O(g(x))$ if $$\lim_{x\to\infty}\sup\frac{|f(x)|}{g(x)}<\infty$$ For part $1$: $$\lim_{n\to\infty}\sup\frac{|nd|}{b^n}=\lim_{n\to\infty}\frac{|d|}{\ln(b)b^n}=0$$ by l'Hopital's rule. Since $0<\infty$, we know $nd\in O(b^n)$.

For part $2$:

For the base case $c=1$ we have:

$$\lim_{n\to\infty}\sup\frac{|\log_b(n)|}{n^d}=\lim_{n\to\infty}\frac{\ln(n)}{n^d\ln(b)}=\lim_{n\to\infty}\frac{\frac{1}{n}}{n^{d-1}\ln(b)}=\lim_{n\to\infty}\frac{1}{n^d\ln(b)}=0$$

Thus $\ln(n)\in O(n^d)$.

Now suppose that $\lim_{n\to\infty}\sup\frac{|\log_b^{c-1}(n)|}{n^d}=\lim_{n\to\infty}\frac{\ln^{c-1}(n)}{n^d\ln^{c-1}(b)}=0$, i.e. $\ln^{c-1}(n)\in O(n^d)$. Then for $\ln^c(n)$ we have: $$\lim_{n\to\infty}\sup\frac{|\log_b^c(n)|}{n^d}=\lim_{n\to\infty}\frac{\ln^c(n)}{n^d\ln^c(b)}=\lim_{n\to\infty}\frac{\frac{\ln^{c-1}(n)}n}{n^{d-1}\ln^{c-1}(b)\cdot\ln(b)d}=\lim_{n\to\infty}\frac{\ln^{c-1}(n)}{n^d\ln^{c-1}(b)}\cdot\frac1{\ln(b)d}=0\cdot\frac1{\ln(b)d}=0$$

And by induction $\ln^c(n)\in O(n^d)$.

For non-integer $c$, suppose there is an integer $m$ such that $m>c$. Now $\lim_{n\to\infty}\sup\frac{|\log_b^c(n)|}{\log_b^m(n)}=\log_b^{c-m}(n)$. As $\log_b(n)$ approaches infinity, and $c-m<0$, $\log_b^{c-m}(n)$ approaches $0$. Thus $\log_b^c(n)\in O(\log_b^m(n))\in O(n^d)$.

Kyan Cheung
  • 3,184
  • the text i was reading didn't give me any knowledge about induction or using limits. it went form a simple result to these two. my only problem with these results is that c and d are any positive numbers and in earlier result the author mentioned that d>c>1 and proved a result that i understood but in these two he just mentioned that d and c are positive and that's what confused me as I am very new to big-oh notation. if there were any constraint that c has to be smaller than d. then i could prove it but with c and d just being positive it's hard to imagine how to prove them at my state. – Jordan jarvis Oct 08 '20 at 10:50
  • is there any other way to prove that or should I just take a leap of faith that later in my reading i can solve them with the method you showed me. but again if i needed that knowledge to solve these results why did author bother putting them so early in the book. – Jordan jarvis Oct 08 '20 at 10:52
0

Everything comes from definition, so, let's look at it: $$O(f)=\{g: \exists C>0, \exists N \in \mathbb{N}, \forall n>N, g(n) \leqslant Cf(n)\}$$

  1. $d\cdot n\in O(b^n)$. As $d$ is fixed with respect to $n$, then always exists $\exists C>0$ and $C>d$. If, for example, $d>0$, (be it $10^{100}$ or more) then we can take $C=\left\lfloor d \right \rfloor +1$. And now $d\cdot n \leqslant C \cdot n \leqslant C b^n$, for $b>1$: $$\frac{n}{b^n}=\frac{n}{(1+[b-1])^n}= \\ \frac{n}{1+n(b-1)+\frac{n(n-1)}{2}(b-1)^2+\cdots+(b-1)^n}< \frac{n}{\frac{n(n-1)}{2}(b-1)^2}=\frac{2}{(n-1)(b-1)^2}$$ So, as taking some $C>0$ we can obtain $\frac{2}{(n-1)(b-1)^2}<C$ when $n>\left\lfloor \frac{2}{C(b-1)^2}+1 \right\rfloor +1$, then we have for same $n$-s $\frac{n}{b^n}<C$. This gives $n \in O(b^n)$ for any $b>1$

  2. $(\log_b(n))^c\in O(n^d)$. Here we come out from inequality $\log_b n < n^\frac{d}{c}$ where $\frac{d}{c}>0$. Most easy is reach this with L'Hôpital's rule, but is possible, also with direct analysis. Tricky is only case $\alpha = \frac{d}{c} \in (0,1)$. Write if you would like to see it and I'll elaborate.

zkutch
  • 13,410