# The floor function [closed]

How do I prove or disprove the following statements: $$(a) ∀n ∈ \mathbb N, ∃k ∈ \mathbb N, ∀x ∈ \mathbb R , \lfloor nx \rfloor − n \lfloor x \rfloor ≤ k$$ and $$(b)\exists k \in \mathbb N, \forall n \in \mathbb N, \forall x \in \mathbb R, \lfloor nx \rfloor − n \lfloor x \rfloor ≤ k$$

I've also been given the following three properties to use: $(i) \forall x \in \mathbb R, \exists \epsilon \in R, 0 ≤ \epsilon < 1 ∧ x = \lfloor x \rfloor + \epsilon \\ (ii) \forall x \in \mathbb Z, \forall y \in \mathbb R, \lfloor x + y \rfloor = x + \lfloor y \rfloor \\ (iii) \forall x \in \mathbb Z, \lfloor x \rfloor = x$

I know that we must negate the statement$(a)$ first in order to pave the way for a disproof(if it false) by proving: $$\exists n \in \mathbb N, \forall k \in \mathbb N, \exists x \in \mathbb R, \lfloor nx \rfloor - n \lfloor x \rfloor > k$$ Other than that I have no idea which property to use and in which order. The help would be really appreciated.

• Is this specific to CS somehow? It looks as a pure math question. – chi Feb 15 '17 at 13:21
• I'm voting to close this question as off-topic because it is purely mathematical in nature and seems to have no computational content. – David Richerby Feb 15 '17 at 16:28
• This is Discrete Maths & it is a part of Computer science. Don't discourage Discrete structure questions. – Mr. Sigma. Feb 16 '17 at 11:39
• @Seeker I agree that computer scientists need to know about discrete mathematics, and it's probably taught in all computer science courses. We welcome questions about the use of discrete mathematics within computer science; indeed, theoretical computer science is essentially a subfield of discrete mathematics. However, this question is completely independent of computation. It's a mathematics question that has no link to computer science, so it should be posted on Mathematics rather than here. – David Richerby Feb 16 '17 at 14:14
• @Seeker I think a good rule of thumb is, "Would I expect a computer scientist to give a better answer to this question than a general mathematician?" In this case, I think the answer is "no". – David Richerby Feb 16 '17 at 14:17

You have been given that $$0\le\epsilon<1$$ multiplying by $-1$ $$\therefore 0\ge-\epsilon>-1\tag{1}$$ adding $x$ $$\therefore x\ge x-\epsilon> x-1$$ $$\therefore x\ge \lfloor x \rfloor >x-1\tag{2}$$ We can use this inequality $(2)$ to show that $$\therefore nx\ge n\lfloor x\rfloor > nx - n\tag{3}$$ adding $nx$ to inequality $(1)$ we get $$nx\ge nx-\epsilon > nx -1$$ $$nx\ge \lfloor nx \rfloor > nx -1 \tag{4}$$ Using $(3)$ and $(4)$ we can write $$nx-1 - nx<\lfloor nx\rfloor - n \lfloor x\rfloor<nx - (nx - n)$$ $$\therefore -1<\lfloor nx\rfloor - n \lfloor x\rfloor<n$$
The first step is to understand for each $n,k$ the following property holds: $$P(n,k) \Leftrightarrow \forall x \in \mathbb{R}, \lfloor nx \rfloor - n\lfloor x \rfloor \leq k.$$ If $nx = na + b + \epsilon$, where $a,b \in \mathbb{Z}$, $0 \leq b < n$, and $0 \leq \epsilon < 1$, then $$\lfloor nx \rfloor = na + b, \quad n\lfloor x \rfloor = na \quad \Longrightarrow \quad \lfloor nx \rfloor - n \lfloor x \rfloor = b.$$ This means that $$\{\lfloor nx \rfloor - n \lfloor x \rfloor : x \in \mathbb{R}\} = \{0,1,\ldots,n-1\}.$$ In particular, $$P(n,k) \Leftrightarrow k \geq n-1.$$ Your two statements are thus equivalent to $$\forall n \in \mathbb{N} \exists k \in \mathbb{N}, k \geq n-1, \\ \exists n \in \mathbb{N} \forall k \in \mathbb{N}, k \geq n-1.$$ You take it from here.