# Homework Help: Surjective function g and the floor function

1. Nov 16, 2013

### mahler1

The problem statement, all variables and given/known data.
Let $A$ be the set of sequences $\{a_n\}_{n \in \mathbb N}$:
1) $a_n \in \mathbb N$
2) $a_n<a_{n+1}$
3) $\lim_{n \to \infty} \frac {\sharp\{j: a_j \leq n\}} {n}$ exists.

Call that limit $\delta (a_n)$ and define the distance (I've already proved this is a distance) $d(a,b)=|\delta (a) -\delta (b)|+k^{-1}$ where $k=\{min j : a_j≠b_j\}$ and $d(a,a)=0$ for any two sequences $a$ and $b$. Prove that the function $g:(A,d) \to [0,1]$ defined as $g(\{a_n\})=\delta(\{a_n\})$ is surjective and continuous.

The attempt at a solution.
I didn't have problems to prove that this function is continuous (in fact, it's uniformly continuous), but I am totally lost at the surjectivity part. The only elements in the codomain to which I could associate two members of the domain where $0$ and $1$. Someone suggested me to consider for each $x \in (0,1)$, the sequence ${x_n}$ with $x_n=\lfloor \frac {n} {x}\rfloor$. It's immediate this sequence is of natural numbers, but how can I prove that $\lfloor \frac {n} {x}\rfloor <\lfloor \frac {n+1} {x}\rfloor$ and that $\delta (x_n)=x$?

If someone has a better suggestion/idea of how could I prove surjectivity, you are welcome to tell me.

Last edited: Nov 17, 2013
2. Nov 17, 2013

### haruspex

I don't understand how that defines g.

3. Nov 17, 2013

### mahler1

Sorry, I've corrected notation. There is no $f$, it's always $g$.

4. Nov 17, 2013

### pasmith

The floor function is non-decreasing, so immediately $x_n \leq x_{n+1}$. To exclude equality, consider the fact that $\frac{n+1}x - \frac nx = \frac 1x$ and use the condition that $0 < x < 1$ to show that there must exist an integer between $\frac{n}{x}$ and $\frac{n + 1}{x}$.