Can anyone help me with the "a" for that question? So I can do the "b", "c" and "d" on my own! Thank you!
Let $B_n$ denote the set of binary strings of length $n$. For each of the functions below, indicate whether the function is injective, surjective, neither, or both (a bijection). If the function is not injective or not surjective, give an example showing why.
(a) $f: B_4 \to B_3$. The output of $f$ is obtained by taking the input string and dropping the first bit. For example, $f(1011) = 011$.
(b) $f: B_3 \to B_3$. The output of $f$ is obtained by taking the input string and replacing the first bit by $1$, regardless of whether the first bit is a $0$ or a $1$. For example, $f(001) = 101$ and $f(110) = 110$.
(c) $f: B_3 \to B_3$. The output of $f$ is obtained by taking the input string and reversing the bits. For example, $f(011) = 110$.
(d) $f: B_3 \to B_4$. The output of $f$ is obtained by taking the input string and adding an extra copy of the first bit to the end of the string. For example, $f(100) = 1001$.