1
$\begingroup$

I'm dealing with the probabilistic method and how it applies to distinct sums. In the notes I'm using I encounter the following inequality:

$2^k\le nk$, which the notes simplify into this form:

$k\le \log_2n +\log_2\log_2n + O(1)$, and I have no idea how this is arrived at.

Clearly taking a $\log_2$ on both sides gives $\log_2 2^k\le \log_2 nk \implies k\le \log_2 n +\log_2 k$

But how do we get from $\log_2k$ to $\log_2\log_2n + O(1)$?

I'm sure I'm missing something obvious but any help would be appreciated.

$\endgroup$
3
  • $\begingroup$ Can you share the notes? $\endgroup$
    – Phicar
    Commented Jan 2, 2021 at 13:17
  • 1
    $\begingroup$ @Phicar Sorry for the long link, it's section 4.6 here: google.com/url?sa=t&source=web&rct=j&url=https://… $\endgroup$
    – mike123abc
    Commented Jan 2, 2021 at 13:31
  • $\begingroup$ No worries, nice notes :). $\endgroup$
    – Phicar
    Commented Jan 2, 2021 at 16:42

1 Answer 1

5
$\begingroup$

Take the $\log_2$ of the initial inequality: $$ k \le \log _2 n + \log _2 k. $$ Taking the $\log_2$ again gives $$ \log _2 k \le \log _2 (\log _2 n + \log _2 k) = \log _2 \log _2 n + \log _2 \left( {1 + \frac{{\log _2 k}}{{\log _2 n}}} \right). $$ Substituting this back into the first inequality gives $$ k \le \log _2 n + \log _2 \log _2 n + \log _2 \left( {1 + \frac{{\log _2 k}}{{\log _2 n}}} \right). $$ Thus, it remains to show that the last term is $\mathcal{O}(1)$. But $$ k \le \log _2 n + \log _2 k \le \log _2 n + \frac{k}{2} \Rightarrow k \le 2\log _2 n \Rightarrow \log _2 k \le 2\log _2 n $$ whenever $k\geq 4$, and for $k=1,2,3$ the statement is obvious.

$\endgroup$
1
  • $\begingroup$ Perfect, thank you so much $\endgroup$
    – mike123abc
    Commented Jan 2, 2021 at 15:19

You must log in to answer this question.

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