There is a bijection between $[0,1]$ and $\mathbb{R}$ (because they have a same cardinality). Can we write an explicit formula for such a function? (or at least a reversible function $f$ whose domain is $[0,1]$ and its range cover all real numbers?)

- 242,131

- 323
-
1See Is there a bijection from [0,1] to R? – dxiv Jan 08 '18 at 07:44
-
I think it's going to be really difficult to write a single formula. It can probably be done using cases, though. It would look like this: $$f(x) = \cases{g(x)& if something\h(x)& if something else}$$possibly with more rows. – Arthur Jan 08 '18 at 07:46
-
What do you mean by "explicit"? – zhw. Jan 08 '18 at 08:04
-
similar question there with interval $[-1,1]$, https://math.stackexchange.com/questions/2575763/give-an-example-of-a-function-fx-for-which-f-1-1-infty-infty/2575817#2575817 – zwim Jan 08 '18 at 12:09
2 Answers
or at least a reversible function $f$ whose domain is $[0,1]$ and its range cover all real numbers?
I'm not sure how is that different...
Anyway I assume that by "explicit" you mean "there is an algorithm that for a given $x$ it can calculate $f(x)$ using a given set of elementary operations (whatever that means)". Or in other words that $f$ can be encoded by a finite number of words from a set of elementary functions and operations.
Not formally clear and obvious but I guess this may satisfy your needs: take a bijection
$$g:(0,1)\to\mathbb{R}$$ $$g(x)=\tan\bigg(\pi x-\frac{\pi}{2}\bigg)$$
Now define the sequence $a_0=0$, $a_1=1$, $a_n=\frac{1}{n}$ and define
$$f:[0,1]\to\mathbb{R}$$ $$f(x)=\begin{cases} g(a_{n+2}) &\text{when }x=a_n \\ g(x) &\text{otherwise} \end{cases}$$
You can easily check that $f$ is a bijection. Note that since $[0,1]$ is compact then there is no continuous bijection $[0,1]\to\mathbb{R}$.

- 42,851
Yes.
First there is an explicit bijection between R and (-1,1).
For a bijection between (-1,1) and (-1,1]
map 1 to 1/2, 1/2 to 1/3 and so ad infinitum.
For a bijection between (-1,1] and [-1,1] do simular with -1.
There is a linear transformation between [-1,1] and [0,1].
Put the the four together for the desired result.

- 17,598