Which one is larger, floor(a/k) * k vs floor(a)?

58 Views Asked by At

Suppose we have $a$, which is in real, and $k$ which is a natural number and $k \geq1$.

Which one is larger? $$\lfloor a \rfloor \hspace{5mm} \text{ or } \hspace{5mm} k \, \left\lfloor \frac{a}{k} \right\rfloor $$

I feel that $\lfloor a \rfloor$ is no smaller than $ k \, \left\lfloor \frac{a}{k} \right\rfloor$.

I'm wondering if there is a formal proof or theory for this?

Thank you very much!

3

There are 3 best solutions below

0
On BEST ANSWER

$a = k*n + r$

$\cfrac{a}{k} = n + \cfrac{r}{k}$

$k*floor(\cfrac{a}{k}) = n$

$floor(a) >= k*floor(\cfrac{a}{k})$

0
On

Just consider the definition: $$\biggl\lfloor\frac ak\biggr\rfloor=n\iff n\le\frac ak < n+1\implies nk\le a ,\enspace\text{so}\quad nk\le \lfloor a\rfloor. $$

0
On
  • $\lfloor a \rfloor$ is the largest integer which is less than or equal to $a$.

  • $k\left\lfloor \frac{a}{k} \right\rfloor$ is an integer which is less than or equal to $a$.

Need I say more?