### Question


I am making a tree using the following two functions:


$$f(x)=\frac{x}{r},\quad g(x)=\frac{x+b}{r}$$


where $1<r<2$ and $0<b$ are rationals. Everything is a real number here.


The starting point is $x=0$. From here, we will compute $f(0)$ and $g(0)$ which will be the branches of $x=0$. We keep on repeating this process by composing the functions in every possible combination, e.g. $f(f(0))$ and $g(f(0))$ will be the branches of $f(0)$, and $f(g(0))$ and $g(g(0))$ will be the branches of $g(0)$, and so on. If we repeat this process $n$ times, we have $2^n$ branches.


My question is, will these tree branches eventually cover all rational numbers in a certain range?


### Some headway


Intuitively, when $0<x<\frac{b}{r-1}$, $f(x)$ decreases $x$, whereas $g(x)$ increases $x$, i.e. $f(x)<x$ and $g(x)>x$.


Also, let's not consider all the branches off of $f(0)$, since $f(0)=0$ (it's the same as the starting point $x=0$.) Therefore the real branching starts at the point $g(0)=b/r$.


Now let's consider the branch path where we keep on applying $g(\cdot)$. The $n$ number of compositions would be


$$ b\sum\_{i=1}^n\frac{1}{r^i}$$


which converges to $\frac{b}{r-1}$ as $n\rightarrow \infty$. Therefore, the extremities of the tree are $0$ and $\frac{b}{r-1}$, which sets the range.


I guess a related or sub-question is: can there even be branches that have the same value?



Will this "tree" cover all rational numbers in a range?
The main Question is answered in the negative by @Saúl RM in the comments.
We answer the sub-question
"can there even be branches that have the same value?":
not for any rational $r$ other than $1$ and $-1$
(neither of which is in the allowed range $1 < r < 2$).


Indeed the "branches" are precisely the sums of finite subsets of
$\{ b/r, b/r^2, b/r^3, \ldots, b/r^n, \ldots, \}$.
(Proof: by induction on $n$, after $n$ steps we have the $2^n$ subsets of
$\{ b/r, b/r^2, b/r^3, \ldots, b/r^n \}$.) So, some two branches coincide
if and only if $P(r) = 0$ for some nonzero polynomial $P$
each of whose coefficients is $0$ or $\pm 1$.
But such $P$ cannot have any rational roots other than
$0$ (which is not allowed because $r$ is the denominator of $f$ and $g$)
and $\pm 1$. **QED**


