SuperSheep's blog

By SuperSheep, history, 22 months ago, In English

I'm aware that if $$$2x \leq y$$$ then $$$x \leq \lfloor y/2 \rfloor$$$, and that if $$$2x \geq y$$$ then $$$x \geq \lceil y/2 \rceil$$$

I usually remember that by writing examples like $$$x \in$$$ {$$$2,3$$$}, $$$y=5$$$. But I don't quite get the logic behind that and I'm not sure if it's a general rule that $$$kx \leq y \rightarrow x \leq \lfloor y/k \rfloor$$$.

Any help with understanding that or resources to read about it would be greatly appreciated. Thanks!

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
22 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by SuperSheep (previous revision, new revision, compare).

»
22 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Just read the definition of ceil and floor.

»
22 months ago, # |
  Vote: I like it +6 Vote: I do not like it

If $$$kx\leq y$$$, then $$$x\leq\frac yk$$$. By the definition of floor, the largest integer less than or equal to $$$\frac yk$$$ is $$$\left\lfloor\frac yk\right\rfloor$$$ so if $$$x$$$ is also an integer then $$$x\leq\left\lfloor\frac yk\right\rfloor$$$.