Adding floor and ceiling that add up to $n$

86 Views Asked by At

Is the following statement true over all positive integers? $$ \left \lceil \frac{n}{3}\right \rceil +\left \lfloor \frac{2n}{3}\right \rfloor =n $$

4

There are 4 best solutions below

1
On

I split it into three cases:

1)$n$ is a multiple of $3$.

2)$n\equiv1(mod\text{ } 3)$

3)$n\equiv2(mod\text{ }3)$

First Case

$n$ is a multiple of $3$, so we can write it as $3k$ for some integer value $k$.

We then plug in $3k$ into the equation:

$\left\lceil\frac{3k}{3}\right\rceil+\left\lfloor \frac{6k}{3}\right\rfloor=3k$

$\left\lceil k \right\rceil + \left\lfloor 2k \right\rfloor=3k$

$k$ and $2k$ are both integers, so

$\left\lceil k\right\rceil=k$

and

$\left\lfloor2k\right\rfloor=2k$

That means $\left\lceil k\right\rceil+\left\lfloor 2k \right\rfloor=3k$, which is what we wanted, so

First case done.

Second Case

$n\equiv 1(mod \text{ }3)$, so we can write $n$ as $3k+1$, for some integer value $k$.

Plug in $3k+1$ for $n$ into the equation:

$\left\lceil \frac{3k+1}{3} \right\rceil + \left\lfloor \frac{6k+2}{3}\right\rfloor$

$\left\lceil k+\frac{1}{3} \right\rceil + \left\lfloor 2k+\frac{2}{3}\right\rfloor$

We are trying to prove that this equals $3k+1$

$k$ is an integer, so $\left\lceil k+\frac{1}{3} \right\rceil=k+1$

and $\left\lfloor 2k+\frac{2}{3}\right\rfloor=2k$

That means $\left\lceil k+\frac{1}{3} \right\rceil + \left\lfloor 2k+\frac{2}{3}\right\rfloor=k+1+2k=3k+1$

Second case done

Third Case

$n\equiv 1(mod \text{ }3)$, so we can write $n$ as $3k+2$ for some integer value $k$.

We can then plug in $3k+2$ for $n$ in the equation:

$\left\lceil \frac{3k+2}{3} \right\rceil + \left\lfloor \frac{6k+4}{3}\right\rfloor$

$\left\lceil k+\frac{2}{3} \right\rceil + \left\lfloor 2k+\frac{4}{3}\right\rfloor$

We are trying to prove that this equals $3k+2$

$k$ is an integer, so

$\left\lceil k+\frac{2}{3} \right\rceil=k+1$

and

$\left\lfloor 2k+\frac{4}{3}\right\rfloor=\left\lfloor 2k+1+\frac{1}{3}\right\rfloor=2k+1$

That means that $\left\lceil k+\frac{2}{3} \right\rceil + \left\lfloor 2k+\frac{4}{3}\right\rfloor=k+1+2k+1=3k+2$, which is what we wanted to prove.

Third case done

0
On

If $n$ is divisible by three, then

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

If $(n+1)$ is divisible by three, then

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

If $(n-1)$ is divisible by three, then

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

These are all the possibilities.

0
On

Hint: Write $n=3q+r$ with $r \in \{0,1,2\}$. Then $$ \left \lceil \frac{n}{3}\right \rceil +\left \lfloor \frac{2n}{3}\right \rfloor = q + \left \lceil \frac{r}{3}\right \rceil + 2q + \left \lfloor \frac{2r}{3}\right \rfloor = 3q + \left \lceil \frac{r}{3}\right \rceil + \left \lfloor \frac{2r}{3}\right \rfloor $$ Thus, you only need to prove the original claim for $n \in \{0,1,2\}$.

1
On

Well, just do it.

If $n = 3k$ for some $k$ then $\lceil \frac n3\rceil = k$ and $\lfloor \frac {2n}3\rfloor = 2k$ and result holds.

If $n = 3k + 1$ for some $k$ then $\lceil \frac n3\rceil =\lceil k+\frac13\rceil =k+1$ and $\lfloor \frac {2n}3\rfloor = \lfloor 2k + \frac23 \rfloor= 2k$ and result holds.

If $n = 3k + 2$ for some $k$ then $\lceil \frac n3\rceil =\lceil k+\frac23\rceil= k+1$ and $\lfloor \frac {2n}3\rfloor = \lfloor 2k + \frac43 \rfloor= 2k+1$ and result holds.