0
$\begingroup$

I'm having a hard time finding the constants/witnesses $C_0$ and $k_0$ that show $(\log_b n)^c$ is $O(n^d)$. That is $|(\log_b n)^c| \leq C_0|n^d|$ for $n > k_0$ (b > 1, and c,d are positive).

I understand you can show just the Big-O relation through L-Hopital, but my specific issue is with finding the witnesses

For example, in Rosen's discrete Math textbook, they mention in the solutions for one problem that $(\log_2 x)^4 \leq x^3$ for $x > 1$, that is $C_0 = 1$ and $k_0 = 1$. However, I'm not sure how to exactly derive that myself, nor does the textbook give an explanation as to how it got that answer. I can only see that it makes sense via desmos (at least for the finite amount of points it shows lol)

Moreover, when I try to see the relation between say $(\log_2 x)^4$ and $x^2$, I see $x^2$ only seems to start exceeding $(\log_2 x)^4$ past x = 16 (via desmos again), i.e one pair of witnesses would be $C_0 = 1$ and $k_0 = 16$.

Hence I'm really lost in finding witness pairs for $(log_b n)^c \in O(n^d)$. Kindly please help suggest some strategies that would make it easier to solve.


I have a similar confusion for witnesses when showing:

  1. $n^d \in O(b^n)$ ($b > 1$ and $d$ is positive)
  2. $c^n \in O(n!)$ ($c > 1$)

But I can leave these 2 for a separate question. We can just focus on $(log_b n)^c \in O(n^d)$ in this thread.


$\endgroup$
8
  • $\begingroup$ It's enough to show $\lim\limits_{n \to \infty}\frac{\ln(n)}{n^\alpha}=0$, for $\alpha>0$. Have you tried this? $\endgroup$
    – zkutch
    Commented Jun 27 at 20:59
  • $\begingroup$ @zkutch sorry I just added a disclaimer that should make my question more clear. $\endgroup$
    – Bob Marley
    Commented Jun 27 at 21:18
  • $\begingroup$ But did I answer the initial question correctly? You could probably evaluate my answer fairly and ask a new question specifically about constants. $\endgroup$
    – zkutch
    Commented Jun 27 at 21:37
  • $\begingroup$ @zkutch I can remove the downvote but my original question was about constants. I can remove the downvote if you want it's bothering you but I did so specifically because it wasn't answering my original question of "determining the witnesses". Wasn't trying to be mean or annoying in any way, especially to you who's answered my previous questions very nicely (btw I asked some followup questions about them if you noticed :) ) $\endgroup$
    – Bob Marley
    Commented Jun 27 at 22:23
  • $\begingroup$ Wasn't trying to be mean or annoying in any way, especially to you who's answered my previous questions very nicely (btw I asked some followup questions about them in the comments if you noticed :) ) @zkutch $\endgroup$
    – Bob Marley
    Commented Jun 27 at 22:28

1 Answer 1

1
$\begingroup$

For any pair of witness $(C_0, k_0)$, the pair of witness $(C_0, |k_0|)$ would work as well. So W.L.O.G we can only consider only the positive $k_0 > 0$, which gives us $$\begin{align*} (\log_b n)^c &\le C_0n^d & \forall n \ge k_0 \\ c \ln (\log_b n) &\le \ln C_0 + d \ln n & \forall n \ge k_0 \\ c \ln (\ln n) - c \ln (\ln b) - d \ln n &\le \ln C_0 & \forall n \ge k_0 \\ \end{align*}$$

Now take $h(x) = c \ln (\ln x) - c \ln (\ln b) - d \ln x$. We get $h'(x) = \frac{c}{x \ln x} - \frac{d}{x}$. This derivative $h'(x)$ will always be non-positive ($\le 0$) when $x > 1$ and $\frac{x\ln x}{x} \ge \frac{c}{d}$, or $x \ge e^{c/d}$. So for any $k_0 \ge e^{c/d}$, the value $h(x) : \forall x \ge k_0$ will be non-increasing. We can take the equality here $k_0 = e^{c/d}$, and let $C_0$ take care of the rest

Thus we only need to find the $C_0$ where $h(k_0) \le \ln C_0$, and as $h$ is non-increasing after that, it will never go above this value $\forall x \ge k_0$ $$\begin{align*} c \ln (\ln (e^{c/d})) - c \ln (\ln b) - d \ln (e^{c/d}) &\le \ln C_0 \\ \ln \left( \frac{\left( \frac{c}{d} \right)^c}{(\ln b)^c e^c} \right) &\le \ln C_0 \\ \left( \frac{c}{e d (\ln b)} \right)^c &\le C_0 \\ \left( \frac{c}{e d (\ln b)} \right)^c &= C_0 \\ \end{align*}$$

$\endgroup$
13
  • $\begingroup$ Very very cool solution! I just have one qualm with this part: "This derivative $h'(x)$ will always be non-positive ($\le 0$) when $\frac{x\ln x}{x} \ge \frac{c}{d}$ or $x \ge e^{c/d}$." $\endgroup$
    – Bob Marley
    Commented Jun 27 at 23:21
  • $\begingroup$ I understand that this derivative $\frac{c}{x\ln x} - \frac{d}{x} \leq 0 \iff \frac{c}{x\ln x} \leq \frac{d}{x} \iff \frac{x}{x\ln x} \leq \frac{d}{c}$ (where I divided by c and multiplied by x since c is positive and $k_0 > 0$, hence x > 0 or positive, making these operations not change direction of inequality. But when you'd take the inverse the inequality would flip and hence come to your result only when $\frac{x}{x\ln x} > 0$, hence we need $\ln x > 0$, which means $x > 1$. $\endgroup$
    – Bob Marley
    Commented Jun 27 at 23:27
  • $\begingroup$ I feel we could make the proof work if we instead assume $k_0 > 1$ which is fine considering this lemma: Lemma. Let $f(x)$ be $O(g(x))$ and let $C_0$ and $k_0$ be any constants. Then there exist constants $C$ and $k$ such that $C > C_0$, $k > k_0$, and such that $|f(x)| \leq C|g(x)|$ whenever $x > k$. Informally speaking, this lemma says that when applying the definition of big-O, you can assume the constants $C$ and $k$ are as great as you need them to be. $\endgroup$
    – Bob Marley
    Commented Jun 27 at 23:29
  • $\begingroup$ Let me know on your thoughts. $\endgroup$
    – Bob Marley
    Commented Jun 27 at 23:29
  • 1
    $\begingroup$ @BobMarley I guess the problem is that $\ln x \ge \frac{c}{d} \implies \frac{1}{\ln x} \le \frac{d}{c}$ is always true, but $ \frac{1}{\ln x} \le \frac{d}{c} \implies \ln x \ge \frac{c}{d}$ is not necessarily true. $\endgroup$
    – EnEm
    Commented Jun 28 at 0:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .