Find all $k_0$'s such that $x_{n+1}=f(x_n)$ will remain in $[0,1]$ for the "tent map" of height $3$ Let $f:  [0,1]\rightarrow \mathbb{R}$:


*

*$f(x)=3x \, \, $   if $0\le x\le \frac{1}{2}$;

*$f(x)=3-3x \, \, $   if $\frac{1}{2}<x\le 1$.


Let a sequence $k_{n+1}=f(k_n)$. Find all possible value of $k_0$ that respect the condition $k_i \in [0,1] \, \, \, \forall i \in \mathbb{N}$.
I've tried to solve the problem drawing the plot and erasing the intervals of initial value that don't respect the condition, but i've noted that i can't find a solution because it behaves like a fractal.
All the solution that I've found are $0$ and $3^n \, \, \, n\in {0,-1,-2,...}$, but they aren't unique because for example $0.3$ is a solution as well, and i think that there are more solutions.
There's an hint in the text: work with number in base 3; let $K$ the set of solution, you should find a bijection between $K$ and $\mathbb{R}$. I can't see how to use this suggestion.
 A: (Note: the following is more of a roadmap, and details are ommitted)
We denote by $ f^{-n}([0,1]) $
the $n$-th iterated pre-image of $[0,1]$.
the solution set can be alternatively described as
$$
 \tag{1}
  K= \bigcap_{n\in\mathbb N} f^{-n}([0,1])
$$
It is also obvious, that $f^{-(n+1)}([0,1])\subset f^{-n}([0,1])$.
Now we need to get an idea what $K$ looks like.
Consider $f^{-1}([0,1])$.
It is easy to prove that
$$
 f^{-1}([0,1])= [0,\frac13]\cup[\frac23,1].
$$
As a next step, one can calculate
$$
 f^{-2}([0,1])=f^{-1}(f^{-1}([0,1]))= [0,\frac19]\cup[\frac29,\frac13]\cup[\frac23,\frac79]\cup[\frac89,1].
$$
One can see, that we always delete the (open) center third of an interval, when we procede
from $f^{-n}([0,1])$ to $f^{-(n+1)}([0,1])$.
This is the same process as in Cantor set (https://en.wikipedia.org/wiki/Cantor_set).
It follows that $K$ is Cantor set.
An alternative approach is to consider the digital expansion of $x\in[0,1]$ in base 3
and observe how the digits change when applying $f$.
