Maths WorkshopMaths problems with full solutions
Exercise 1607Combinatorics › Counting principlesOlympiadAdded 3 Nov 2026

Double counting

#double counting#combinatorial proof#count in two ways

Statement

Show that ∑k=0n(nk)=2n\sum_{k=0}^n\binom{n}{k}=2^n by double counting.

Hint

Count subsets of an nn-element set in two ways.

Show solutionHide solution

Solution

First way. Number of subsets of {1,…,n}\{1,\ldots,n\} is 2n2^n (each element in or out).

Second way. Group subsets by size: (n0)+(n1)+⋯+(nn)\binom{n}{0}+\binom{n}{1}+\cdots+\binom{n}{n}.

Conclusion. Both equal the number of subsets, so ∑(nk)=2n\sum\binom{n}{k}=2^n.