Assuming $d+1 <= log_2(n)$, how to show $d - 1 > log_2(n/8)$?

57 Views Asked by At

Also we know $d = log_2(n/2)$ rounded down to its nearest integer.

Add (-2) to each side $$d-1 <= log_2(n) - 2$$ $$d-1 <= log_2(n) - log_2(4)$$ $$d-1 <= log_2(n/4)$$

This is as far as I can get.

2

There are 2 best solutions below

0
On BEST ANSWER

If you take any real number $x$ and round down to the nearest integer, the result is greater than $x-1$. So $$d>\log_2\Bigl(\frac n2\Bigr)-1=\log_2n-2$$ and $$d-1>\log_2n-3=\log_2\Bigl(\frac n8\Bigr)\ .$$

3
On

It is not necessarily true. For example, if $d=1$ and $n=1024$, then $$d+1=2\le 10=\log_2(n) $$ yet $$ d-1=0 \not > 7 = \log_2(n/8) $$