reading: MCS 5.1

- proof by induction
example: size of the power set

**Definition:** The **power set** of a set \(X\), written \(Pow(X)\) or \(2^X\) is the set of all subsets of \(X\).

For example,

- \(Pow(\{1,2\}) = \{\emptyset, \{1\}, \{2\}, \{1,2\}\}\).
- \(Pow(\emptyset) = \{\emptyset\}\)
- \(Pow(\{\emptyset\}) = \{\emptyset, \{\emptyset\}\}\)

**Notation:** If \(X\) and \(Y\) are sets, then **\(X \setminus Y\)** (pronounced "\(X\) minus \(Y\)") is the set of all elements of \(X\) that are not in \(Y\).

To demonstrate how induction works, we will prove that \(|Pow(X)| = 2^{|X|}\) for finite \(X\).

**Big Claim:** For all \(n \in \mathbb{N}\), if \(|X| = n\) then \(|Pow(X)| = 2^n\).

We start with a baby version:

Claim 0:If \(|X| = 0\) then \(|Pow(X)| = 2^0\).

Proof:If \(|X| = 0\), then \(X\) must be the empty set. \(Pow(\emptyset) = \{\emptyset\}\), which has \(1\) element. We are done since \(1 = 2^0\).

We'll prove the next claim in a more roundabout way for reasons that will become clear soon:

Claim 1:If \(|X| = 1\) then \(|Pow(X)| = 2^1\).

Proof:Since \(|X| = 1\), we can write \(X = \{x_1\}\). We can split \(Pow(X)\) into two groups of subsets: let \(A\) be the set of those that contain \(x_1\) and \(B\) be the set of those that don't. Formally, \(A = \{S \subseteq X \mid x_1 \in S\}\) and \(B = \{S \subseteq X \mid x_1 \notin S\}\).Now, \(B\) is just the power set of \(X \setminus \{x_1\}\) (convince yourself with a small example). Since \(|X| = 1\), \(X \setminus \{x_1\}\) has cardinality 0. Therefore we can apply claim 0 to conclude that \(|B| = |Pow(X \setminus \{x_1\})| = 2^0\).

Moreover, \(|B| = |A|\), because the function \(f : B → A\) given by \(f(S) = S \cup \{x_1\}\) is a bijection (check this as an exercise).

So we have \(|Pow(X)| = |A \cup B| = |A| + |B| = 2^0 + 2^0 = 2 \cdot 2^0 = 2^1\) as required.

2 steps down, an infinite number to go. On to claim 2:

Claim 2:If \(|X| = 2\) then \(|Pow(X)| = 2^2\).

Proof:Since \(|X| = 2\), we can write \(X = \{x_1,\dots,x_2\}\). We can split \(Pow(X)\) into two groups of subsets: let \(A\) be the set of those that contain \(x_2\) and \(B\) be the set of those that don't. Formally, \(A = \{S \subseteq X \mid x_2 \in S\}\) and \(B = \{S \subseteq X \mid x_2 \notin S\}\).Now, \(B\) is just the power set of \(X \setminus \{x_2\}\). Since \(|X| = 2\), \(X \setminus \{x_2\}\) has cardinality 1. Therefore we can apply claim 1 to conclude that \(|B| = |Pow(X \setminus \{x_2\})| = 2^1\).

Moreover, \(|B| = |A|\), because the function \(f : B → A\) given by \(f(S) = S \cup \{x_2\}\) is a bijection.

So we have \(|Pow(X)| = |A \cup B| = |A| + |B| = 2^1 + 2^1 = 2 \cdot 2^1 = 2^2\) as required.

There seems to be a pattern. Here's claim 3:

Claim 3:If \(|X| = 3\) then \(|Pow(X)| = 2^3\).

Proof:Since \(|X| = 3\), we can write \(X = \{x_1,\dots,x_3\}\). We can split \(Pow(X)\) into two groups of subsets: let \(A\) be the set of those that contain \(x_3\) and \(B\) be the set of those that don't. Formally, \(A = \{S \subseteq X \mid x_3 \in S\}\) and \(B = \{S \subseteq X \mid x_3 \notin S\}\).Now, \(B\) is just the power set of \(X \setminus \{x_3\}\). Since \(|X| = 3\), \(X \setminus \{x_3\}\) has cardinality 2. Therefore we can apply claim 2 to conclude that \(|B| = |Pow(X \setminus \{x_3\})| = 2^2\).

Moreover, \(|B| = |A|\), because the function \(f : B → A\) given by \(f(S) = S \cup \{x_3\}\) is a bijection.

So we have \(|Pow(X)| = |A \cup B| = |A| + |B| = 2^2 + 2^2 = 2 \cdot 2^2 = 2^3\) as required.

At this point, you are probably convinced that we could use claim 3 to prove claim 4 (with almost exactly the same proof as the proof of claim 3), and we could use claim 4 to prove claim 5, and claim 5 to prove claim 6, and so on. In fact, for any \(N\), you could generate proofs of the claims all the way up to claim \(N\) using the following template:

Claim n:If \(|X| = n\) then \(|Pow(X)| = 2^n\).

Proof:Since \(|X| = n\), we can write \(X = \{x_1,\dots,x_n\}\). We can split \(Pow(X)\) into two groups of subsets: let \(A\) be the set of those that contain \(x_n\) and \(B\) be the set of those that don't. Formally, \(A = \{S \subseteq X \mid x_n \in S\}\) and \(B = \{S \subseteq X \mid x_n \notin S\}\).Now, \(B\) is just the power set of \(X \setminus \{x_n\}\). Since \(|X| = n\), \(X \setminus \{x_n\}\) has cardinality n-1. Therefore we can apply claim (n-1) to conclude that \(|B| = |Pow(X \setminus \{x_n\})| = 2^{n-1}\).

Moreover, \(|B| = |A|\), because the function \(f : B → A\) given by \(f(S) = S \cup \{x_n\}\) is a bijection.

So we have \(|Pow(X)| = |A \cup B| = |A| + |B| = 2^{n-1} + 2^{n-1} = 2 \cdot 2^{n-1} = 2^n\) as required.

This is how a proof by induction works. To do a proof by induction:

You first clearly describe what "claim \(n\)" says (this is often written \(P(n)\) and is called the

**inductive hypothesis**)You then prove the first claim directly (claim 0 in our example above, whose proof was different from the others). This is called the

**base case**.You then give a "template" proof of claim \(n\), but in that proof you may use claim \(n-1\). This is called the

**inductive step**.You can then conclude that for all \(n\), claim \(n\) holds, by induction.

Here is how I might put together the above pieces to prove the "big claim" if I were submitting it for a homework assignment, for example:

Big Claim:For all \(n \in \mathbb{N}\), if \(|X| = n\) then \(|Pow(X)| = 2^n\).

Proof:by induction. Let \(P(n)\) be the statement "if \(|X| = n\) then \(|Pow(X)| = 2^n\).In the base case, we want to show \(P(0)\), i.e. if \(|X| = 0\) then \(|Pow(X)| = 2^0\). Well, if \(|X| = 0\), then \(X\) must be the empty set. \(Pow(\emptyset) = \{\emptyset\}\), which has \(1\) element. We are done since \(1 = 2^0\).

For the inductive step, fix an arbitrary \(n\) and assume \(P(n-1)\) holds. We want to show that if \(|X| = n\) then \(|Pow(X)| = 2^n\).

Since \(|X| = n\), we can write \(X = \{x_1,\dots,x_n\}\). We can split \(Pow(X)\) into two groups of subsets: let \(A\) be the set of those that contain \(x_n\) and \(B\) be the set of those that don't. Formally, \(A = \{S \subseteq X \mid x_n \in S\}\) and \(B = \{S \subseteq X \mid x_n \notin S\}\).

Now, \(B\) is just the power set of \(X \setminus \{x_n\}\). Since \(|X| = n\), \(X \setminus \{x_n\}\) has cardinality n-1. Therefore we can apply P(n-1) to conclude that \(|B| = |Pow(X \setminus \{x_n\})| = 2^{n-1}\).

Moreover, \(|B| = |A|\), because the function \(f : B → A\) given by \(f(S) = S \cup \{x_n\}\) is a bijection.

So we have \(|Pow(X)| = |A \cup B| = |A| + |B| = 2^{n-1} + 2^{n-1} = 2 \cdot 2^{n-1} = 2^n\), which completes the inductive step.

Therefore, by induction, for all \(n\), if \(|X| = n\) then \(|Pow(X)| = 2^n\).

Here is a second example of a proof by induction. Note that here we are assuming \(P(n)\) and proving \(P(n+1)\) in the inductive step. Either style (proving \(P(n) ⇒ P(n+1)\) or proving \(P(n-1) ⇒ P(n)\)) is fine: in each case you are showing how to reduce a complex case (either one of size \(n+1\) or one of size \(n\)) to a simpler case (either one of size \(n\) or one of size \(n-1\)).

**Claim:** for all \(n\), \(\sum_{i=0}^n i = \frac{n(n+1)}{2}\)

**Proof:** by induction. Let \(P(n)\) be the statement "\(\sum_{i=0}^n i = \frac{n(n+1)}{2}\)".

For the base case, we want to show \(P(0)\), i.e. that \(\sum_{i=0}^0 i = \frac{0(0+1)}{2}\). By inspection, both the left and right hand sides are 0, so \(P(0)\) holds.

For the inductive step, assume \(P(n)\); we wish to show \(P(n+1)\); that is, we want to show \(\sum_{i=0}^{n+1} i = \frac{(n+1)(n+2)}{2}\).

We simplify the left-hand side: \[\begin{aligned} \sum_{i=0}^{n+1} i &= (n+1) + \sum_{i=0}^n i && \text{by definition} \\ &= (n+1) + \frac{n(n+1)}{2} && \text{by $P(n)$} \\ &= \frac{2(n+1) + n(n+1)}{2} = \frac{(n+1)(n+2)}{2} && \text{by arithmetic} \\ \end{aligned}\] as required.

Therefore, by induction, \(\sum_{i=0}^n i = \frac{n(n+1)}{2}\) for all \(n\).