Is there also an other way to show the equality: $\left\lfloor \frac{n}{2}\right\rfloor + \left\lceil \frac{n}{2} \right\rceil=n$?

451 Views Asked by At

I want to show that:

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

That's what I have tried:

  • $ \left\lfloor \frac{n}{2}\right\rfloor=\max \{ m \in \mathbb{Z}: m \leq \frac{n}{2}\}$
  • $\left\lceil \frac{n}{2} \right\rceil= \min \{ m \in \mathbb{Z}: m \geq \frac{n}{2}\}$

If $n=2k,k \in \mathbb{Z}$,then: $\frac{n}{2} \mathbb{Z}$,so $$\left\lfloor \frac{n}{2}\right\rfloor=\max \left\{ \frac{n}{2}, \frac{n-2}{2}, \dots \right\}=\frac{n}{2} \\ \left\lceil \frac{n}{2} \right\rceil=\min \left\{ \frac{n}{2}, \frac{n+2}{2}, \dots \right\}=\frac{n}{2}$$

Therefore, $ \left\lfloor \frac{n}{2}\right\rfloor + \left\lceil \frac{n}{2} \right\rceil=n$.

If $n=2k+1, k \in \mathbb{Z}$,then $\frac{n}{2} \notin \mathbb{Z}$.So:

$$\left\lfloor \frac{n}{2}\right\rfloor=\max \left\{ \frac{n-1}{2}, \frac{n-3}{2}, \dots \right\}=\frac{n-1}{2}\\ \left\lceil \frac{n}{2} \right\rceil=\min \left\{ \frac{n+1}{2}, \frac{n+3}{2}, \dots \right\}=\frac{n+1}{2}$$

Therefore, $ \lfloor \frac{n}{2}\rfloor + \lceil \frac{n}{2} \rceil=\frac{n-1}{2}+\frac{n+1}{2}=n$

Is there also an other way to show the equality or is it the only one?

3

There are 3 best solutions below

4
On BEST ANSWER

Since the function $f(x)=\{x\}=x-\lfloor x\rfloor$ is periodic with period one, the function: $$ g(n) = \left\lfloor\frac{n}{2}\right\rfloor+\left\lceil\frac{n}{2}\right\rceil -n$$ is periodic with period $2$. Since $g(0)=g(1)=0$, $g(n)=0$ for every $n\in\mathbb{N}$.

8
On

For even $n$, $\left\lfloor\frac n2\right\rfloor=\left\lceil\frac n2\right\rceil=\frac n2$.

For odd $n$, $\left\lfloor\frac n2\right\rfloor=\frac{n-1}2$, and $\left\lceil\frac n2\right\rceil=\frac{n+1}2$.

0
On

Let $x,y$ be any two real numbers. Then $\lfloor x\rfloor+\lceil y\rceil>x+y-1$, since $\lfloor x\rfloor>x-1$ and $\lceil y\rceil\geq y$. Similarly $\lfloor x\rfloor+\lceil y\rceil<x+y+1$. So $\lfloor x\rfloor+\lceil y\rceil$ differs from $x+y$ by strictly less than $1$. Since $\lfloor x\rfloor+\lceil y\rceil$ is always an integer, if $x+y$ is also an integer the two must be equal. This holds in particular for $x=y=n/2$.