The cantor function can be defined in $c(x) : [0,1] \rightarrow [0,1]$ by
- Express $x$ in base 3.
- If $x$ contains a 1, replace every digit after the first 1 by 0.
- Replace all 2s with 1s.
- Interpret the result as a binary number. The result is $c(x)$.
or, equivalently, by the cumulative function of the cantor set.
How do I compute its inverse, $c^{-1}(y)$? does it exists?
(this problem was motivated by trying to sample from the cantor set using inverse transforming sampling)