Count the number of n-bit strings with an even number of zeros.

Divide the $2^n$ strings into two groups, one with an odd number of zeros and one with an even number of zeros. If you take anything from the "odd" group, and flip the first bit, you will get something in the "even" group. Similarly, flipping the first bit of anything in the "even" group will produce something in the "odd" group.

Once you realize that there is no chance of overlap (that is, flipping two different strings cannot give the same result), it means that the two groups have to be exactly the same size.


One standard approach is that the number of strings with an even number of $0$'s is $$\binom{n}{0}+\binom{n}{2}+\binom{n}{4}+\cdots.$$ The number with an odd number of $0$'s is $$\binom{n}{1}+\binom{n}{3}+\binom{n}{5}+\cdots.$$

Recall that by the Binomial Theorem, $$(1+x)^n=\binom{n}{0}+\binom{n}{1}x+\binom{n}{2}x^2+\binom{n}{3}x^3+\binom{n}{4}x^4+\cdots.$$ Put $x=-1$. We get $$0=\binom{n}{0}-\binom{n}{1}+\binom{n}{2}-\binom{n}{3}+\binom{n}{4}-\cdots.$$ So the number with an even number of $0$'s is the same as the number with an odd number of $0$'s.

Overkill, but this generating functions approach can be used for other results. Not first chapter stuff, maybe second.