3

I'm having a hard time proving that:

$$\left \lfloor \frac{n}{2}\right\rfloor = \left\lceil \frac{n-1}{2}\right\rceil$$

I've tried various algebraic manipulations. I've also tried to see if I could use induction. I've been unsuccessful in both approaches. Any help would be greatly appreciated.

  • 1
    DId you try to apporach it for odd and even n separately? If you do induction, do it with step size 2 not 1. – quid Jul 18 '16 at 00:20
  • 1
    I did try to approach it for odd and even n separately, but I'll try again. I'll also see if I can get my induction working using step size 2. Thank you. – Jonathan B. G. Jul 18 '16 at 00:27

1 Answers1

3

HINT Try splitting it up into two cases:

Case 1: $n=2k$ for some $k\in\{1,2,3,\ldots\}$.

Case 2: $n=2k-1$ for some $k\in\{1,2,3,\ldots\}$.

Aweygan
  • 23,232
  • 1
    Thanks to you and quid for your suggestions. It was much easier to prove it by splitting it up into two cases, than trying to prove it using algebraic manipulations :) I ended up having to prove $\lceil k - 0.5 \rceil = k$ (for even n) and $\lceil k - 1 - 0.5\rceil = k-1$ (for odd n). Both of these almost follows from the definition of the floor and ceiling functions, and were easy to prove using $$ \lceil n + x \rceil = \lceil x\rceil + n$$. – Jonathan B. G. Jul 18 '16 at 00:56
  • Glad to help :) – Aweygan Jul 18 '16 at 01:07