# Construction of bijective/ continuous maps

I am preparing for Master's admission interview. I found some previous year interview questions.

1. Is there a continuous map from $$[0,1]$$ to $$(0,1)$$? Why/Why-not?

My attempt: $$f(x) = \frac{1}{3}$$. So, answer is yes.

1. Is there a continuous map from $$(0,1)$$ to $$[0,1]$$?

My attempt: $$f(x)= 0$$ if $$x\in (0, 1/4]$$, $$12x-3$$ when $$x\in [1/4, 1/3]$$, and $$1$$ when $$x\in [1/3,1)$$.

1. Construct a bijective map from $$(0,1)$$ to $$[0,1]$$.

My attempt: Let $$A=\{\frac{1}{2},\frac{1}{3},...\}$$,$$B=\{1,\frac{1}{2},\frac{1}{3},...\}$$. Define $$f:A\rightarrow B$$ such that $$f(\frac{1}{n})=\frac{1}{n-1}$$. Now define a function $$g:(0,1) \rightarrow [0,1]$$ such that $$g(x)=x$$ if $$x$$ is not in $$A$$ , otherwise $$g(x)=f(x)$$.

Then $$g$$ is a the bijection from $$(0,1)$$ to $$(0,1]$$.

Am I right?

• For 1. and 2. it seems right as all constant maps are continuous. And for 3. that seems right, too. As it should be surjective and injective, then you can apply it in a similar way to 0 Dec 14, 2022 at 19:34
• @linkja Thanks. For 1. I am not happy with my solution. Can you or anyone please provide a good solution for me?
– user1116521
Dec 14, 2022 at 19:45
• For 3 are you looking for $(0,1)$ to $[0,1]$ or $(0,1)$ to $(0,1]$? Your answer would be correct if it goes to $(0,1].$ Dec 15, 2022 at 16:38

Let $$X,Y$$ be topological spaces and $$f:X\to Y$$ a constant map, $$f(x) = y_0$$, then $$f$$ is continuous, as for any $$U\subset Y$$ open either contains $$y_0$$, so $$f^{-1}(U) = X$$, which is open, or $$U$$ doesn't contain $$y_0$$ then $$f^{-1}(U)=\emptyset$$, which is also open. Therefor $$f$$ is continuous.
Now take you can choose $$X,Y$$ and $$y_0$$ accordingly for 1. and 2..
• I think in this case it is rather irrelevant if you know what a topological space is, you just need to know that continuity of a map can also characterized by the preimages of open sets being open. And $X,Y$ have to be something Dec 15, 2022 at 16:44
• I would use the epsilon-delta definition with subsets of $\mathbb{R}$ to explain this. Dec 15, 2022 at 16:49