1
$\begingroup$

Prove that $[x+y] = [x]+[y]$ or $[x]+[y]+1$, where $[·]$ is the floor function

I'm Having a little bit of trouble with the last part of this proof.

First, I will use the definition of floor function:

$[x] = m ≡ m ≤ x < m+1$

and

$[y] = n ≡ n ≤ y < n+1$

so, $[x]+[y] = m+n ≡ m+n ≤ x+y < m+n+2$

This is where I get stuck; I have that $[x+y] = t ≡ t ≤ x < t+1 $, so putting $m+n ≤ x+y < m+n+2$ in that form, seems impossible, let alone the one that corresponds to $[x]+[y]+1$.

Could you help me with this last part?

Thanks in advance.

$\endgroup$
  • 1
    $\begingroup$ Your inequalities should be less than signs on the right everywhere.That should improve things. $\endgroup$ – jgon Dec 19 '18 at 22:20
  • $\begingroup$ Corrected; however, it was typo when passing notes from my notebook, I used the correct definition in my notebook, and still don't realize how to follow up. $\endgroup$ – Daniel Bonilla Jaramillo Dec 19 '18 at 22:23
  • $\begingroup$ Why do you write: "$[x+y] = t ≡ t ≤ x < t+1$" Shouldn't that be "$[x+y] = t \equiv t \le x + y \le t + 1$"? $\endgroup$ – fleablood Dec 19 '18 at 22:44
7
$\begingroup$

$m+n\le x+y<m+n+2\implies\lfloor x+y\rfloor=m+n$ or $m+n+1$, because the only integers in $[m+n,m+n+2)$ are $m+n, m+n+1$

| cite | improve this answer | |
$\endgroup$
1
$\begingroup$

You have $[x] = m$ and $[y] = n$ so $m+n\le x + y < m+n+2$

But how does $x+y$ compare to $m + n + 1$? There are two possibilities.

1) $x + y < m+n + 1$ then

$m + n \le x + y < m+ n + 1$. Then by definition you have $[x+y] = m+n = [x]+[y]$.

2) $x + y \ge m+n + 1$ then

$m+n + 1 \le x+y < m+n + 2=(m+n+1) + 1$ so by definition you have $[x+y] = m+n+1$.

That's it.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ How do you conclude the two possibilities "$x+y<m+n+1$" and "$x+y≥m+n+1$"? $\endgroup$ – Daniel Bonilla Jaramillo Dec 19 '18 at 23:05
  • 1
    $\begingroup$ Trichotomy. Given two values $A$ and $B$ then you either have $A < B$ or $A\ge B$. What other options are there? How can neither be true? $\endgroup$ – fleablood Dec 19 '18 at 23:28
  • 1
    $\begingroup$ @DanielBonillaJaramillo : For any real numbers $a$ and $b$, exactly one of “$a<b$”, “$a=b$”, or “$a>b$” holds. Combine the last two to get that exactly one of “$a<b$” or “$a\geq b$” holds. $\endgroup$ – MPW Dec 19 '18 at 23:28
0
$\begingroup$

I didn't read the question exactly, but you have floor(x)=n iff. $n<x<n+1$, hence you get $...<m+n+2$ instead of $\leq$.

| cite | improve this answer | |
$\endgroup$
0
$\begingroup$

Let $m=\lfloor x\rfloor$ and $n=\lfloor y\rfloor$; let $\{x\}=x-\lfloor x\rfloor=x-m$ and $\{y\}=y-\lfloor x\rfloor=y-n$. Then $$ x+y=m+\{x\}+n+\{y\} $$ Note that $0\le\{x\}<1$ and $0\le\{y\}<1$, so $0\le\{x\}+\{y\}<2$. There are two cases:

  1. if $0\le\{x\}+\{y\}<1$, then $m+n\le x+y<m+n+1$ and so $\lfloor x+y\rfloor=m+n$;
  2. if $1\le\{x\}+\{y\}<2$, then $m+n+1\le x+y<m+n+2$ and so $\lfloor x+y\rfloor=m+n+1$.
| cite | improve this answer | |
$\endgroup$
0
$\begingroup$

Alternatively. By definition $[x+y]$ is the largest possible integer that this less than or equal to $x+y$. But $[x] \le x$ and $[y] \le y$ so $[x] + [y] \le x+y$. So $[x]+[y] \le [x+y]$.

Likewise $[x+y] + 1$ by definition is the smallest possible integer that is larger $x + y$. But $[x]+ 1 > x$ and $[y] + 1 > y$ so $[x]+[y] + 2 > x+y$. So $[x] + [y] + 2\ge [x+y]+1$.

So $[x]+[y] + 1 \ge [x+y]$.

So $[x]+[y] \le [x+y] \le [x] + [y] + 1$

As $[x]+[y]$ and $[x+y]$ and $[x] + [y]+1$ are all integers. And there is NO integer between $[x] +[y]$ and $[x]+[y]+1$ there are only two options $[x] + [y]= [x+y]$ or $[x+y] = [x] + [y]+1$.

.......

And a third way.

$[x] \le x < [x]+1$ means $0 \le x - [x] < 1$.

A) $0 \le x-[x] < 1$ and $0 \le y -[y] < 1$ so $0 \le x+y -[x]-[y] < 2$.

B) $0 \le x+y - [x+y] < 1$.

Reverse B) to get

B') $-1 < [x+y] - x - y \le 0$.

Add B' and A to get:

$-1 < ([x+y] - x - y) + (x + y - [x]-[y]) < 2$ so

$-1 < [x+y] - [x] -[y] < 2$ or

$0 \le [x+y] -[x] -[y] \le 1$ or

$[x]+[y] \le [x+y] \le [x] + [y] + 1$.

.....

Basically: $x+y$ is between $[x+y]$ and $[x+y] + 1$; two integers that are only $1$ apart.

But $x + y$ is also between $[x] + [y]$ and $[x] + [y] + 2$; two integers that are only $2$ apart.

There are only so many choicese to find these integers $[x+y], [x]+[y], [x+y] + 1$ and $[x]+[y] + 2$ so that they all fit in such a tight range.

It doesn't matter how you prove it but you must have $[x+y]$ and $[x]+ [y]$ within one of each other and you must have $[x]+[y]\le [x+y]$. There are only two ways that can happen.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.