reading: MCS 5.1
example: size of the power set
Definition: The power set of a set X, written Pow(X) or 2X is the set of all subsets of X.
For example,
Notation: If X and Y are sets, then X∖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∈N, if |X|=n then |Pow(X)|=2n.
We start with a baby version:
Claim 0: If |X|=0 then |Pow(X)|=20.
Proof: If |X|=0, then X must be the empty set. Pow(∅)={∅}, which has 1 element. We are done since 1=20.
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)|=21.
Proof: Since |X|=1, we can write X={x1}. We can split Pow(X) into two groups of subsets: let A be the set of those that contain x1 and B be the set of those that don't. Formally, A={S⊆X∣x1∈S} and B={S⊆X∣x1∉S}.
Now, B is just the power set of X∖{x1} (convince yourself with a small example). Since |X|=1, X∖{x1} has cardinality 0. Therefore we can apply claim 0 to conclude that |B|=|Pow(X∖{x1})|=20.
Moreover, |B|=|A|, because the function f:B→A given by f(S)=S∪{x1} is a bijection (check this as an exercise).
So we have |Pow(X)|=|A∪B|=|A|+|B|=20+20=2⋅20=21 as required.
2 steps down, an infinite number to go. On to claim 2:
Claim 2: If |X|=2 then |Pow(X)|=22.
Proof: Since |X|=2, we can write X={x1,…,x2}. We can split Pow(X) into two groups of subsets: let A be the set of those that contain x2 and B be the set of those that don't. Formally, A={S⊆X∣x2∈S} and B={S⊆X∣x2∉S}.
Now, B is just the power set of X∖{x2}. Since |X|=2, X∖{x2} has cardinality 1. Therefore we can apply claim 1 to conclude that |B|=|Pow(X∖{x2})|=21.
Moreover, |B|=|A|, because the function f:B→A given by f(S)=S∪{x2} is a bijection.
So we have |Pow(X)|=|A∪B|=|A|+|B|=21+21=2⋅21=22 as required.
There seems to be a pattern. Here's claim 3:
Claim 3: If |X|=3 then |Pow(X)|=23.
Proof: Since |X|=3, we can write X={x1,…,x3}. We can split Pow(X) into two groups of subsets: let A be the set of those that contain x3 and B be the set of those that don't. Formally, A={S⊆X∣x3∈S} and B={S⊆X∣x3∉S}.
Now, B is just the power set of X∖{x3}. Since |X|=3, X∖{x3} has cardinality 2. Therefore we can apply claim 2 to conclude that |B|=|Pow(X∖{x3})|=22.
Moreover, |B|=|A|, because the function f:B→A given by f(S)=S∪{x3} is a bijection.
So we have |Pow(X)|=|A∪B|=|A|+|B|=22+22=2⋅22=23 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)|=2n.
Proof: Since |X|=n, we can write X={x1,…,xn}. We can split Pow(X) into two groups of subsets: let A be the set of those that contain xn and B be the set of those that don't. Formally, A={S⊆X∣xn∈S} and B={S⊆X∣xn∉S}.
Now, B is just the power set of X∖{xn}. Since |X|=n, X∖{xn} has cardinality n-1. Therefore we can apply claim (n-1) to conclude that |B|=|Pow(X∖{xn})|=2n−1.
Moreover, |B|=|A|, because the function f:B→A given by f(S)=S∪{xn} is a bijection.
So we have |Pow(X)|=|A∪B|=|A|+|B|=2n−1+2n−1=2⋅2n−1=2n 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∈N, if |X|=n then |Pow(X)|=2n.
Proof: by induction. Let P(n) be the statement "if |X|=n then |Pow(X)|=2n.
In the base case, we want to show P(0), i.e. if |X|=0 then |Pow(X)|=20. Well, if |X|=0, then X must be the empty set. Pow(∅)={∅}, which has 1 element. We are done since 1=20.
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)|=2n.
Since |X|=n, we can write X={x1,…,xn}. We can split Pow(X) into two groups of subsets: let A be the set of those that contain xn and B be the set of those that don't. Formally, A={S⊆X∣xn∈S} and B={S⊆X∣xn∉S}.
Now, B is just the power set of X∖{xn}. Since |X|=n, X∖{xn} has cardinality n-1. Therefore we can apply P(n-1) to conclude that |B|=|Pow(X∖{xn})|=2n−1.
Moreover, |B|=|A|, because the function f:B→A given by f(S)=S∪{xn} is a bijection.
So we have |Pow(X)|=|A∪B|=|A|+|B|=2n−1+2n−1=2⋅2n−1=2n, which completes the inductive step.
Therefore, by induction, for all n, if |X|=n then |Pow(X)|=2n.
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, ∑ni=0i=n(n+1)2
Proof: by induction. Let P(n) be the statement "∑ni=0i=n(n+1)2".
For the base case, we want to show P(0), i.e. that ∑0i=0i=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 ∑n+1i=0i=(n+1)(n+2)2.
We simplify the left-hand side: n+1∑i=0i=(n+1)+n∑i=0iby definition=(n+1)+n(n+1)2by P(n)=2(n+1)+n(n+1)2=(n+1)(n+2)2by arithmetic as required.
Therefore, by induction, ∑ni=0i=n(n+1)2 for all n.