Problem
Let $D$ be the set of all the functions $f\colon\mathbb N\to \mathbb N$ , where $\mathbb N$ is the set of natural numbers.
Let $E$ be the set of all functions $f\colon \mathbb N\to\{\,0,1\,\}$.
Prove both the sets have equal cardinality.
Attempt (failed)
$E$ is the set of all infinite binary sequences. By Cantor's second diagonal argument $E$ is uncountable. Since $E\subset D$, $D$ is also uncountable. If i prove there exists injections from $D$ to $E$ and also from $E$ to $D$, then Schroeder-Bernstein theorem can be used.
Attempt 2
Consider two functions $\alpha\colon D \to E$ and $\beta\colon E \to D $
Consider a function $f \in E$ is a function from $\mathbb N$ to $\{\,0,1\,\}$. $\beta(f) $ is a function that assigns to $n$ the $f(n)+1$ . This is a injective function .
I have difficulty finding $\alpha$.
Any hint or help will be appreciated.