There are a,b $\in$ $\mathbb R$ such that a < b. Show bijection function $f:[a,b) \to (0,1)$
I've tried something like: $\\$ $f(n) =$ \begin{cases} n & \text{0 < $n$ < 1} \\ \frac{1}{n} & \text{$n$ > 1} \\ \frac{1}{2} & \text{$else$} \end{cases}
But that function isn't injective.
can I get any clue please ?
A Bijective function is one which takes a set of points A, and Surjectively AND Injectively maps its elements to the elements of another set of points, B.
In other words, the function ensures two conditions are met on the elements of both sets:
These two conditions ensure that there are no extraneous elements in either set; they have the same amount of elements, and each element in either set has one and only one buddy.
An example of such a bijective function is as follows:
Consider the set A: \begin{align} \{ a_n |a_n= \frac{1}{2^n}, \ \forall n \in \mathbb{N}^+\} \bigcup \{ a_i|a_i = \frac{2^i-1}{2^i} ,\forall i \in \mathbb{N}^+/\{1\} \} \bigcup {0} \end{align} A constitutes a portion of the domain of f, whose elements are: \begin{align} \{0, \frac{1}{2^n}, \frac{1}{2^{n-1}},..., \frac{1}{8}, \frac{1}{4}, \frac{1}{2}, \frac{3}{4}, \frac{7}{8},\frac{15}{16},..., \frac{2^i-1}{2^i}\} \end{align}
Now we define the set B - a portion of the range of the function - as:
\begin{align} \{ b_n |b_n= \frac{1}{2^{n+1}}, \ \forall n \in \mathbb{N}^+\} \bigcup \{ b_i|b_i = \frac{2^i-1}{2^i} ,\forall i \in \mathbb{N}^+/\{1\} \} \end{align}
The elements of B are:
\begin{align} \{ \frac{1}{2^{n+1}}, \frac{1}{2^{n}},..., \frac{1}{8}, \frac{1}{4}, \frac{1}{2}, \frac{3}{4}, \frac{7}{8},\frac{15}{16},..., \frac{2^i-1}{2^i}\} \end{align}
To obtain the bijection, we must begin by assigning $0 \in A \text{ to} \frac{1}{2^{n+1}} \in B$.
Then, we assign all of the remaining values in A to their corresponding values in B, and finally, assign every value that lies in the interval $[0,1)$ and is not in A, to the corresponding values which lie in the interval $(0,1)$ that also do not lie in B.
Boom! We now have a bijection from $[a,b)$ to $(0,1)$ for $a = 0$, and $b = 1$, by using the sequences $a_n = \frac{1}{2^n}$ and $a_i = \frac{2^i-1}{2^i}$ to construct the domain and range.
Note, I've left out the proof showing that $\frac{2^i-1}{2^i} = 1$ as $i->\infty$ and $\frac{1}{2^n} = 0 $ as $n-> \infty$