Size of a set of integers

61 Views Asked by At

I am truing to prove that the size of the set:

$$R(n,r)=\left\{1\leq x\leq n: \left\lfloor \frac{(x-1)r}{n}\right\rfloor<\left\lfloor \frac{xr}{n}\right\rfloor \right\}$$ is exactly $r$, where $r<n$. This shouldn't be so difficult but for some reason I am struggling.

$n,x,r$ are all integers.

I appreciate any answer!

2

There are 2 best solutions below

1
On BEST ANSWER

Hint: Show that the difference between consecutive terms of $ \lfloor \frac{ x r } { n } \rfloor $ is either 0 or 1.

Since $\lfloor \frac{ 1\times r } { n } \rfloor = 0$ and $\lfloor \frac{ n\times r } { n } \rfloor = r$, there are exactly $r$ times when the difference is exactly 1.

Thus, the set has size $r$.

0
On

SO for $\lfloor \frac {(x-1)r}n\rfloor <\lfloor \frac {xr}n\rfloor$ There must be an integer $m$ so that

$\frac {(x-1)r}n= \frac {xr}n - \frac rn < m \le \frac {xr}n$.

As $\frac rn < 1$ then if this occurs we will have

$m-1 \le \frac {xr}n - 1 < \frac {(x-1)r}n < m \le \frac {xr}n$

IF we assume the OP intended $x$ to be an integer, then the above shows there is only one such $m$ for any such $x$. ANd by the archemedian principal, for every $m$ there is one such $x$. SO for every $m$ there is exactly one such $x$.

SO there are exactly as many as there are acceptable integers $m$. And $m \le \frac {xr}n \le \frac {nr}n = r$ there are $r$ such integers.