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

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 and $$2^m\le n<2^{m+1}$$ and because $$n\in N$$ we know that its an interger so $$2^m 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.

• The equations in the title and the content differ by a pair of $\lfloor\ \rfloor$. – peterwhy Apr 24 at 21:28
• Is the $\log$ binary, as implied by your work? – peterwhy Apr 24 at 21:29
• What is $n$? What if $n=1$? – peterwhy Apr 24 at 21:32
• Pretty sure the inside is the ceil function and not floor. Also math.stackexchange.com/questions/3196363/… – kingW3 Apr 24 at 21:39
• Will it help if you incorporate the $+1$ term into floor and then get it into $\log$ at the RHS...? – CiaPan Apr 24 at 21:50