Induction

Example #2: Using induction, we'll prove that a set $S$ with $|S| = n$ elements has $2^n$ subsets (covered on slide 16 of Topic 2.)

Proof. [The size of a set $S$'s power set is $2^{|S|} = 2^n$.]

  1. Base case: For $n=0$, the empty set has $2^0 = 1$ subset: the empty set $\emptyset$ itself.
  2. Inductive hypothesis: We assume that any set with $k$ elements has $2^k$ subsets.
  3. Inductive step: We'll now prove that a set with $k + 1$ elements has $2^{k+1}$ subsets. Let's add a new element to a $k$-element set. Every existing subset either (1) contains the new element or (2) doesn't contain the new element. This doubles the number of subsets: $2 \cdot 2^k = 2^{k+1}$.
    Example: For $S_1 = \{a, b\}$, we have $\mathcal{P}(S_1) = \{\emptyset, \{a\}, \{b\}, \{a, b\}\}$, while for $S_2 = \{a, b, c\}$, we have $\mathcal{P}(S_2) = \{\emptyset, \underline{\{c\}}, \{a\}, \underline{\{a, c\}}, \{b\}, \underline{\{b, c\}}, \{a, b\}, \underline{\{a, b, c\}}\} = \{\emptyset, \{a\}, \{b\}, \{c\}, \{a, b\}, \{a, c\}, \{b, c\}, \{a, b, c\}\}$.

According to our proof by induction above, a set with $|S| = n \ge 0$ elements has $2^n$ subsets.