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!


  • 1
    $\begingroup$ You seem to suspect that the first is false; have you looked for a counterexample? $\endgroup$ – Servaes Nov 1 '18 at 17:03
  • $\begingroup$ Assuming $a_0$ represents the "units place" int the standard base $10$ expression for $x$, then your second formula is not correct. Let $x=1.9, c=8.9$. Then $f(x)=0$ but $f(x+c)=f(10.8)=1$ (while $a_0+c=1+8.9=9.9<10$). $\endgroup$ – lulu Nov 1 '18 at 17:06
  • $\begingroup$ Your first formula is false as well. Let $x=10,c=1$. Or am I misunderstanding the definition of $a_0$? $\endgroup$ – lulu Nov 1 '18 at 17:09
  • $\begingroup$ I've just done something similar and it suggests that both statements are false so I'm guessing I haven't used a correct method? $\endgroup$ – BlackSky Nov 1 '18 at 17:20
  • $\begingroup$ Your working is irrelevant to the first statement; you get $9-2>5$ so your example is not within the scope of the first statement. The first statement can be expressed as $$a_0-c<5\quad\Rightarrow\quad x\sim x-c,$$ so to disprove it you need to start with $a_0$ and $c$ such that $a_0-c<5$. $\endgroup$ – Servaes Nov 1 '18 at 17:21

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.


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$.


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.