[Math] Defining a bijection with binary strings

binarycombinatorics

Let $n\in\mathbb N$. Then a binary string of length $n$ has the form $a_1a_2…a_n$ such that each $a_i$ is either 0 or 1. Define $E_n$ to be the set of all binary strings of length $n$ with even number of 1's, and define $O_n$ to be the set of all binary strings of length $n$ with odd number 1's.

Define a bijection $f: E_n \to O_n$.

Now, I'm really confused as to how to apply the idea of a bijection in an example like this and I'm not sure how to start. Any help would be appreciated..

Best Answer

Easiest answer as I see it: flip $a_1$. This is a bijection as the inverse function is given by flipping $a_1$.

Related Question