Equivalence relation with the floor function

683 Views Asked by At

Let us consider a function $f:\ \Bbb{R}\ \longrightarrow\ \Bbb{R}$ and we define the equivalence relation $\sim$ on $\Bbb{R}$ such that: $$x\ \sim\ y\qquad\Leftrightarrow\qquad f(x)=f(y).$$

Note: The following $\lfloor x\rfloor$ is the floor function of $x$. It gives you the first integer smaller or equal to $x$. For example $\lfloor2.2\rfloor=2$, $\lfloor12\rfloor=12$, and $\lfloor−2.2\rfloor=−3$.

For the function $f(x)=\lfloor x/10\rfloor$, only one of the following statement is true.

For $x=a_0+10a_1+10^2a_2+...+10^na_n$, with all $a_j\in\{0,1,2,\ldots,9\}$ and for all $c\in\{0,1,2,\ldots,9\}$:

1) $x\ \sim\ x-c$ if $a_0-c<5$,

2) $x\ \sim\ x+c$ if $a_0+c<10$.

My working: Take $a_0=9$ and $c=2$ then the first statement is false as $9-2>5$ but if I apply to the second statement $9+2>10$ which is wrong too, so I think my method is wrong.

I am guessing the second one is true from the function $f(x)=\lfloor x/10\rfloor$, but I'm really not sure about this. Any help will be appreciated!

Thanks.

2

There are 2 best solutions below

0
On BEST ANSWER

It's just decimal representation. If you subtracta a $c$ from a number do you have to carry/borrow a one or not.

to wit....

So $x = 10^na_n + 10^{n_1}a_{n-1} + ..... + 10a_1 + a_0$

$\frac x{10} = 10^{n-1}a_n + 10^{n-2}a_{n-1} + ..... + a_1 + \frac {a_0}{10}$

$f(x) = \lfloor \frac x{10} \rfloor = 10^{n-1}a_n + 10^{n-2}a_{n-1} + ..... + a_1$

And $x - c = 10^na_n + 10^{n_1}a_{n-1} + ..... + 10a_1 + (a_0-c)$

And $\frac {x-c}{10} = 10^{n-1}a_n + 10^{n_2}a_{n-1} + ..... + a_1 + \frac {(a_0-c)}{10}$

To find the least integer depends upon the value of $\frac {(a_0-c)}{10}$.

$-9 \le a_0 -c \le 9$ and $-.9\le \frac {(a_0-c)}{10} \le .9$

If $\frac {(a_0-c)}{10} \ge 0$ then

$\rfloor \frac {x-c}{10}\lfloor = 10^{n-1}a_n + 10^{n_2}a_{n-1} + ..... + a_1 + \rfloor\frac {(a_0-c)}{10}\lfloor= 10^{n-1}a_n + 10^{n_2}a_{n-1} + ..... + a_1 = f(x)$

If $\frac {(a_0-c)}{10} \le 0$ then

$\rfloor \frac {x-c}{10}\lfloor = 10^{n-1}a_n + 10^{n_2}a_{n-1} + ..... + a_1 + \rfloor\frac {(a_0-c)}{10}\lfloor= 10^{n-1}a_n + 10^{n_2}a_{n-1} + ..... + a_1 - 1= f(x)-1$

So $x$~$x-c$ if $a_0 -c \ge 0$. But $x$ !~ $x-c$ if $a_0 - c < 0$. So if $a_0 - c < 0 < 5$ this is not true.

....

You can do 2) the same way.

$f(x+c) = 10^{n-1}a_n + 10^{n-2}a_{n-1} + ..... + a_1 + \lfloor \frac {a_0+c}{10}\rfloor = f(x) + \lfloor \frac {a_0+c}{10}\rfloor$.

And $\lfloor \frac {a_0+c}{10}\rfloor = 0$ if $a_0+c< 10$ but $\lfloor \frac {a_0+c}{10}\rfloor = 1$ if $a_0 + c \ge 10$.

So 2) is true.

0
On

The question is a bit of a mess, so let's clean things up; note that if $$x=a_0+10a_1+10^2a_2+\ldots+10^na_n,$$ with $a_j\in\{0,1,2,\ldots,9\}$, then $f(x)=\lfloor\frac{x}{10}\rfloor$ is simply $$f(x)=a_1+10a_2+10^2a_3+\ldots+10^{n-1}a_n.$$ Now if $c\in\{0,1,2,\ldots,9\}$ then $x\sim x-c$ if and only if $$x-c=b+10a_1+10^2a_2+\cdots+10^na_n,$$ for some $b\in\{0,1,2,\ldots,9\}$. That is, if and only if $a_0-c\geq0$. Similarly $x\sim x+c$ if and only if $$x+c=b+10a_1+10^2a_2+\cdots+10^na_n,$$ for some $b'\in\{0,1,2,\ldots,9\}$. That is, if and only if $a_0+c<10$. This is precisely the second statement, so this one is true and the other one seems false.

To show that the first statement is false, find $a_j$ and $c$ such that $a_0-c<0$. Simply take $x=0$ and $c=1$.Then $a_0-c=-1<5$ but $x\not\sim x-c$ because $f(x)=0$ and $f(x-c)=-1$.