Floor function and a range of the function

333 Views Asked by At

Let $f(x) = \lfloor x \lfloor x \rfloor \rfloor$ for $x \ge 0.$

Find the number of possible values of $f(x)$ for $0 \le x \le 10.$

Note that once we plug our lower bound, $0,$ into the function, we get $0$ back. If we plug the upper bound, $10,$ into the function, we get $100$ back.

Let's split our $x$ values into cases. When $x$ is in the range $0$ through $1,$ $1$ through $2,$ and so on all the way to $10.$

Testing out the first $5$ cases, we get:

\begin{align*} x \in [0, 1] \text{ there are $0$ values missing.} \\ x \in [1, 2] \text{ there are $2$ values missing.} \\ x \in [2, 3] \text{ there are $3$ values missing.} \\ x \in [3, 4] \text{ there are $4$ values missing.} \\ x \in [4, 5] \text{ there are $5$ values missing.} \\ \end{align*}

We can see that our missing values are going up in increments by $1.$

Hence, our solution is \begin{align*} &101-(0+2+3+4+5+6+7+8+9+10) \\ &=101-54 \\ &=\boxed{47}. \\ \end{align*}

Would this be the correct way to go?

1

There are 1 best solutions below

1
On BEST ANSWER

I tried to see the problem otherwise to see if I would come to the same conclusion.

Same starting point as you, we will separate the values of $x$.

If $n\leq x<n+1$, then $$\lfloor x\lfloor x\rfloor\rfloor=\lfloor xn \rfloor$$ For $0\leq x<1$, the function is always $0$, so one possible value.

If $1\leq n<10$ then $$n^2\leq\lfloor xn\rfloor <n(n+1)=n^2+n$$ The number of possible values for the function is $n^2+n-n^2=n$.

Finally, if $n=10$, $f(10)=100$, one possible value.

The number of possible values is $$1+1+2+3+4+5+6+7+8+9+1=47$$ I used a different path and came to the same answer. So you are right.