Constructing an explicit bijection from $\mathbb{R}\to(0,1)\cup(2,3)$

elementary-set-theoryfunctions

I am asked to find a bijection from $\mathbb{R}\to(0,1)\cup(2,3)$. We have that $$\frac{1}{2}\bigg(\frac{x}{1+|x|}\bigg)+\frac{1}{2}$$ is a bijection from $\mathbb{R}\to(0,1)$. Similarly, we have that $$\frac{1}{2}\bigg(\frac{x}{1+|x|}\bigg)+\frac{5}{2}$$ is a bijection from $\mathbb{R}\to(2,3)$. Using these somehow, is it possible to construct a bijection from $\mathbb{R}\to(0,1)\cup(2,3)$. Obviously it must be possible since both sets have the same cardinality, but I do not see an obvious way to construct an explicit bijection between the two.

Ideally, the bijection should preserve order. That is let $g$ be the bijection from $\mathbb{R}\to(0,1)\cup(2,3)$. If $x<y$, the bijeciton should be one such that $g(x)<g(y)$. Clearly, the two above bijections possess this property.

Best Answer

You won't be able to preserve order. Let's imagine you have found such a bijection $g$. Consider limits of preimages: $$A=\lim_{x\to1^+} g^{-1}(x),\qquad B=\lim_{x\to2^-}g^{-1}(x)$$

$$\forall x\in(0,1),y\in(2,3):g^{-1}(x)<A\le B<g^{-1}(y).$$

So $g(A)\not\in (0,1)\cup(2,3)$.

In other words, you can map open interval to an open interval conserving the ordering, but you cannot construct an open interval from 2 open intervals without disturbing the ordering.

If we omit the ordering requirement, the bijection is easy. We can map $(0,1)$ to $(-\infty,0)$; $(2,3)$ to $(0,\infty)$ using your functions or similar ones. Then we need to squeeze point $x=0$ in our bijection. If you aware how to map $[0,1]$ to $\mathbb R$, you will be able to do it.

Related Question