# Bijection between (0,1) and [0,1) in R?

## Homework Statement

I need to find a bijection between (0,1) and [0,1) in R. It can go in either direction since it is a bijection.

## Homework Equations

I can't think of any equations at all!

## The Attempt at a Solution

Something like f(x) = 1/[(1/x)+1] for x in A
x for x not in A
where A={1/2, 1/3, 1/4, ...}

Having an issue with zero though.

Related Calculus and Beyond Homework Help News on Phys.org
LCKurtz
Homework Helper
Gold Member

## Homework Statement

I need to find a bijection between (0,1) and [0,1) in R. It can go in either direction since it is a bijection.

## Homework Equations

I can't think of any equations at all!

## The Attempt at a Solution

Something like f(x) = 1/[(1/x)+1] for x in A
x for x not in A
where A={1/2, 1/3, 1/4, ...}

Having an issue with zero though.
Not sure which direction you are trying to do. For ##[0,1)\rightarrow (0,1)## try starting with ##0\to 1/2##, ##1/2\to 1/3## etc.

HallsofIvy
Homework Helper
The crucial point here is that the set of rational numbers, between 0 and 1, is countable. Write the rational numbers as "$a_1, a_2, a_3, ...$" and map $a_1$ to 0 and $a_{n+1}$ to $a_n$. Map each irrational number to itself.

SammyS
Staff Emeritus