Assuming I need to find an onto and 1-to-1 function from $(a,b)$ to $(0,1)$, well that's not a hard job. But things are getting bit more complicated when I'm asked to do the exact same but from $[a,b)$ to $(0,1)$ or from $(a,b)$ to $(0,1]$ and so on.
What is the most effective way to find those required functions? because I have the feeling that there is a scheme that I can work by to handle those kind of problems handling with the cardinality of the continuum, $\aleph$.