TITLE: Bijections from $A$ to $B$, where $A$ is the set of subsets of $[n]$ that have even size and $B$ is the set of subsets of $[n]$ that have odd size
QUESTION [5 upvotes]: Let $A$ be the set of subsets of $[n]$ that have even size, and let $B$ be the set of subsets of $[n]$ that have odd size.  Establish a bijection from $A$ to $B$.  The following bijection is suggested for $n=3$:
$$\matrix{A: & \{1,2\} & \{1,3\} & \{2,3\} & \varnothing\\

B: & \{1,2,3\} & \{1\} & \{2\} & \{3\}}$$
I know that first we have to establish a function that is both surjective and injective so that it is bijective. I don't know where to take a step from here in the right direction. So I need a bit of guidance. 
Something suggested is let f be the piecewise function:
$$f(x) = x \setminus \{n\}\text{ if }n \in x\text{ and }f(x) = x\cup\{n\}\text{ if }n \notin x$$

REPLY [4 votes]: Number the members of the set $1,2,3,4,\ldots,n$.
For every subset with an even number of elements, there is a corresponding set with an odd number of elements, that corresponds in this way:

If $1$ is a member of the set with an even number of elements, then delete $1$ from the set to get a set with an odd number of elements.
If $1$ is not a member of the set with an even number of elements, then add $1$ to the set to get a set with an odd number of elements.

For example, suppose the set is $\{1,2,3,4\}$.  Then we have this correspondence between sets with an even number of elements and sets with an odd number of elements:
$$
\begin{array}{rcl}
\text{even} & & \text{odd} \\
\hline
\varnothing & \leftrightarrow & \{1\} \\
\{1,2\} & \leftrightarrow & \{2\} \\
\{1,3\} & \leftrightarrow & \{3\} \\
\{1,4\} & \leftrightarrow & \{4\} \\
\{2,3\} & \leftrightarrow & \{1,2,3\} \\
\{2,4\} & \leftrightarrow & \{1,2,4\} \\
\{3,4\} & \leftrightarrow & \{1,3,4\} \\
\{1,2,3,4\} & \leftrightarrow & \{2,3,4\}
\end{array}
$$
This won't work with the empty set because we don't have an element to which we can assign the number $1$.