This is another exercise from Charles Chapman book, Real Mathematical Analysis, that I haven't been able to solve:
To find a bijection between the intervals [a,b], [a,b) and (a,b).
While you can't "write them down", it's not hard to tell you how to form such a bijection. Of course, they can't be continuous functions so don't expect to be able to write them as a simple "formula".
For the [a, b] to [a, b) for example, map all irrationals in a, b (except a and b themselves if they happen to be irrational) to themselves. Now write all the rational rational numbers in the interval in an ordered list (of course, rationals are countable so that can be done) starting with b first and a second (even if a and b are irrational). Map each in that list to to