# How to construct a bijection from $(0, 1)$ to $[0, 1]$? [duplicate]

I wonder if I can cut the interval $(0,1)$ into three pieces: $(0, \frac{1}{3})\cup(\frac{1}{3},\frac{2}{3})\cup(\frac{2}{3},1)$, in which I'm able to map point $\frac{1}{3}$ and $\frac{2}{3}$ to $0$ and $1$ respectively. Now the question remained is how to build a bijection mapping from those three intervels to $(0,1)$.

Or, my method just goes in a wrong direction. Any correct approaches?

-

## marked as duplicate by Belgi, EuYu, Austin Mohr, Marvis, Martin SleziakOct 14 '12 at 6:16

I think it is a bit easier to go the other way, that is, find a bijection $f : [0, 1] \to (0, 1)$ by considering what happens to the endpoints. Having said that, your approach isn't wrong. – Michael Albanese Oct 14 '12 at 2:43
@EuYu : I agree that OP has a similar question to the one you link, but he is suggesting an approach which is quite different. Answering him wouldn't be such a bad idea. – Patrick Da Silva Oct 14 '12 at 2:48
@Patrick It seemed to me that the construction given in the other question seemed very similar to his approach. But on second thought perhaps I was too hasty. – EuYu Oct 14 '12 at 2:53

Consider the sequence $$\frac 12, \frac 13, \frac 14, \frac 15, \dots, \frac 1n, \dots$$ Map every other point $f : (0,1) \to [0,1]$ that is not in this sequence to itself, and then map the above sequence to the corresponding points in this one : $$0, 1, \frac 12, \frac 13, \frac 14, \dots.$$ In other words, map $\frac 12$ to $0$, $\frac 13$ to $1$, and then map $\frac 1n$ to $\frac 1{n-2}$ for $n \ge 4$.

The reason why you can map some set into some bigger set bijectively is precisely because they are infinite, so you must exploit this fact. If you don't, you have no chance.

Now to answer your actual question, the trick you try to use doesn't feel relevant to me ; I'm not saying there is absolutely no way it could work, because I actually know there is, since your set (the union of the three intervals) and the interval $(0,1)$ have the same cardinality. The problem with your idea is that I don't think a construction will naturally come out of it. In general, to map bijectively a set into a bigger one you must be "moving things around", so I expect any fairly understandable construction involving your idea to be similar to the one I've shown you.

Hope that helps,

-
Note that I could have chosen any sequence in $]a,b[$ and the exact same trick would've worked. I don't need convergence or any kind of property from the sequence, I just need the sequence members to be distinct, and it so happens that $\frac 1n$ is my favorite sequence with this property. – Patrick Da Silva Oct 14 '12 at 2:47

The idea you mention, with mild modification, will work. Please note that what is below is a minor variant of the solution given by Patrick da Silva.

Your decomposition of $(0,1)$ is not quite complete. We want to write $$(0,1)=\left(0,\frac{1}{3}\right) \cup\left\{\frac{1}{3}\right\} \cup \left(\frac{1}{3},\frac{2}{3}\right)\cup \left\{\frac{2}{3}\right\}\cup \left(\frac{2}{3},1\right),$$ so $5$ "intervals," two of them kind of boring. From now on, we will call $\frac{2}{3}$ by the more cumbersome name $1-\frac{1}{3}$.

Use the identity function on the two endintervals $\left(0,\frac{1}{3}\right)$ and $\left(1-\frac{1}{3},1\right)$, and map $\frac{1}{3}$ to $0$, and $1-\frac{1}{3}$ to $1$.

This leaves $\left(\frac{1}{3},1-\frac{1}{3}\right)$, which needs to be bijectively mapped to $\left[\frac{1}{3},1-\frac{1}{3}\right]$.

Use the same trick on the interval $\left(\frac{1}{3},1-\frac{1}{3}\right)$ that we used on $(0,1)$. So this time the two special points "inside" that will be mapped to $\frac{1}{3}$ and $1-\frac{1}{3}$ respectively are $\frac{1}{3}+\frac{1}{9}$ and $1-\frac{1}{3}-\frac{1}{9}$. That leaves $\left(\frac{1}{3}+\frac{1}{9},1-\frac{1}{3}-\frac{1}{9}\right)$ to be mapped bijectively to $\left[\frac{1}{3}+\frac{1}{9},1-\frac{1}{3}-\frac{1}{9}\right]$. Continue, forever. As pointed out by Patrick da Silva, the point $\frac{1}{2}$ is not dealt with in this process: simply map it to itself.

It would be notationally a little simpler to use the same idea to map $(-1,1)$ bijectively to $[-1,1]$, and use linear functions to take $(0,1)$ to $(-1,10$, and $[-1,1]$ to $[0,1]$ toadjust to our situation.

The advantage is that first "middle" interval is $\left(-\frac{1}{3},\frac{1}{3}\right)$, the second middle interval is $\left(-\frac{1}{9},\frac{1}{9}\right)$, and so on.

-
That's precisely why I didn't go on with OP's idea... this is rather complicated compared to a single re-arranging of a sequence of points. But I admit it is significantly different. But hey, $\left| [0,1]^{(0,1)} \right| = \left| \mathbb R^{\mathbb R} \right|$, so we expect a huge ton of solutions, don't we. – Patrick Da Silva Oct 14 '12 at 18:50
Note that you need to precise that there is one point that cannot be attained by finite induction on $n$ to define your bijection, i.e. $\frac 12$, so you need to precise that you map this point to itself. But +1 for following OP's idea. – Patrick Da Silva Oct 14 '12 at 18:53
Andre, I am just learning bijection. I am wondering a question like this, when mapping, you essentially can map it onto any subset as long as if its in the domain? And how come for this example it cant be a continous function ? – Q.matin Feb 3 '13 at 8:28