Let
\(\Bin(n)\) denote the set of binary strings of length
\(n\text{.}\) Our goal is to prove that
\(|\Bin(n)|=2^n\text{.}\) It is straightforward to check that
\(|\Bin(1)|=2\) and
\(|\Bin(2)|=4=2^2\) and
\(|\Bin(3)|=8=2^3\text{.}\)
Our strategy will be to show that if we know
\(|\Bin(n)|=2^n\text{,}\) then we can prove
\(|\Bin(n+1)|=2^{n+1}\text{.}\) If we show this general statement, then using
\(|\Bin(3)|=8=2^3\text{,}\) we can conclude that
\(|\Bin(4)|=2^4\text{.}\) Then, knowing
\(|\Bin(4)|=2^4\text{,}\) we can conclude that
\(|\Bin(5)|=2^5\text{.}\) This chain of logical implications continues, so that we have our desired result for any length of binary strings.
Our strategy is the following observation:
\begin{align}
\amp \Bin(n+1) = \Bin(n)\times \{1\} \uplus \Bin(n)\times \{0\} \tag{2.1.1}
\end{align}
Once we know that
(2.1.1) holds, then the result follows because
\begin{align*}
|\Bin(n+1)| \amp = |\Bin(n)\times \{1\} \uplus \Bin(n)\times \{0\}| \\
\amp = |\Bin(n)\times \{1\}| + |\Bin(n)\times \{0\}|\\
\amp = (|\Bin(n)| \times 1) + (|\Bin(n)| \times 1) \\
\amp = 2\cdot |\Bin(n)| = 2\cdot 2^{n}=2^{n+1}
\end{align*}