How can I remove the floor function from ⌊ab/10⌋?

1.1k Views Asked by At

After several weeks of trying on my own, I was hoping for a hand. I am familiar with transitioning ⌊ab/10⌋ to a mod function as well as a trig function. Ideally, I would like a solution that involved nothing more than */+-.

Thank you,

-Erick

a and b are whole numbers with any value from 0 to 9.


Based on the answers here, this is impossible with only the arithmetic symbols. This however leads me to ask if this would be possible with an integral or summation?

3

There are 3 best solutions below

8
On BEST ANSWER

The answer you got that says it's impossible is wrong if you only have finitely many inputs. Let $D = \{0..9\}$ and the desired function be $f : D^2 \to \mathbb{R}$. Consider the function $g$ defined for any $x,y \in D$ by: $\def\less{\smallsetminus}$

$g(x,y) = \sum_{a,b \in D} f(x,y) \dfrac{ \prod_{c \in D \less \{a\}} (x-c) }{ \prod_{c \in D \less \{a\}} (a-c) } \dfrac{ \prod_{d \in D \less \{b\}} (x-d) }{ \prod_{d \in D \less \{b\}} (b-d) }$.

This is valid since the denominators are non-zero.

Also notice that $g(x,y) = f(x,y)$ for any $x,y \in D$, because in the outer summation every term vanishes except the one where $⟨a,b⟩ = ⟨x,y⟩$, and in that one remaining term the products cancel. Symbolically, $\dfrac{ \prod_{c \in D \less \{a\}} (x-c) }{ \prod_{c \in D \less \{a\}} (a-c) } = \mathbf{1}_{x=a}$ for any $x \in D$, and likewise for the other factor.

Therefore there is a polynomial of degree at most $2|D|^2$ that exactly matches $f$ on $D^2$.

Hence we get a formula in $x,y$ using only arithmetic operations for any expression in terms of $x,y$ where $x,y \in D$, including "$\lfloor \frac{xy}{10} \rfloor$". The above technique generalizes to any function with arbitrary number of inputs from a field.

0
On

If by removing the floor function you mean that when $\lfloor {ab/10}\rfloor =ab/10$, then the only way you can remove the floor function is making sure that $ab/10$ is a whole number. From the comments you said that $a,b$ are whole numbers between 0 and 9, so the only way $10=2\times 5$ divides $ab$ is that 2 divides $a$ and 5 divides $b$, or the same with the roles of $a$ and $b$ interchanged. This implies that $a\in\{0,2,4,6,8\}$ and that $b\in\{0,5\}$ (or the other way around)

6
On

You cannot. The function you gave us is a discontinuous multivariate function. In order to express it, one must use a discontinuous function. Therefore, for all x and y that are integers from 0 to 9, there is no arithmetic function that equals the function you gave.