Explicit $1:1$ mapping of $\Bbb R \leftrightarrow \Bbb R - \Bbb Q$

72 Views Asked by At

Two sets $S_1$ and $S_2$ have equal cardinality iff there exists a one-to-one onto mapping of $\Bbb S_1 \leftrightarrow S_2$. But that does not mean it has to be easy to explicitly present such a mapping. Sometimes it is easy: $$ m( (-\pi/2,\pi/2 )\leftrightarrow \Bbb R : \forall x\in (-\pi/2,\pi/2 ) ( m(x) = \tan x ) $$ demonstrates explicitly that $\Bbb R$ has the same cardinality as $(-\pi/2,\pi/2 )$.

Sometimes you have to be a bit more clever to find a mapping suitable to demonstrate equal cardinality. For example,

$$ m(\Bbb R \leftrightarrow \Bbb R -\{0\}) : \forall x\in \Bbb R-\{0\} \left( m(x) = \left\{ \begin{array}{cl} x & x+1\not\in \Bbb Z^+ \\ x+1 & x+1 \in \Bbb Z^+ \end{array} \right. \right) $$ is $1:1$ and demonstrates explicitly that $\Bbb R$ has the same cardinality as $\Bbb R-\{0\}$.

But sometimes one can know (by other reasoning) that two sets have the same cardinality, yet constructing an explicit one-to-one onto mapping is not easy. For example, because the rationals are countable and the reals are not, we know that the cardinalities of $\Bbb R$ and $\Bbb R -\Bbb{Q}$ are the same.

Can you present an explicit $1:1$ mapping of $\Bbb R \leftrightarrow \Bbb R - \Bbb Q$ (the reals onto the irrationals)?

2

There are 2 best solutions below

0
On BEST ANSWER

So if we count $1=p_0$ and the primes $p_1=2, p_2=3$ etc

If $r\in R$ is of the form $q\sqrt {p_i}$ with $q\in \mathbb Q$ we send it to $q\sqrt {p_{i+1}}$ and otherwise we send $r\to r$. This sends rationals to rational multiples of $\sqrt 2$, rational multiples of $\sqrt 2$ to multiples of $\sqrt 3$ etc (using square roots of primes all the way). Unfortunately it leave $0$ fixed. But that is dealt with by combining with the function you already have.

0
On

Notice that $\mathbb R=A\cup B\cup C$ with $A=\mathbb Q$, $B=\pi+\mathbb Q$ and $C$ the complement of $A\cup B$. Find a bijection $A\cup B\to B$, and extend it to a bijection $\mathbb R\to\mathbb R-\mathbb Q$ by defining it to be the identity of $C$.