Proof that $\lfloor \log(n) \rfloor = \lfloor \log((n−1)/2) \rfloor + 1$

68 Views Asked by At

I have an assignment tomorrow and we should proof that $$\lfloor{\log n}\rfloor = \left\lfloor \log\left( \Big\lfloor \frac{n-1}2 \Big\rfloor \right) \right\rfloor + 1$$ But the floor drives me crazy since I cannot relate to it. I believe that let $m=\lfloor{\log n}\rfloor$ so that $m=\lfloor{\log n}\rfloor$ then $m\le \log n<m+1$ and $2^m\le n<2^{m+1}$ and because $n\in N$ we know that its an interger so $2^m<n+1\le2^{m+1}$ and therefore $m+1=\lfloor \log n \rfloor+1$ but again the $\log(\lfloor\frac{n-1}{2}\rfloor$) part kills me.

Would really appreciate some hints since I stuck and can't get forward on my own.