Massachusetts Institute of Technology Handout 19 6.042J/18.062J: Mathematics for Computer Science September 29, 1998 Professors Nancy Lynch and Srinivas Devadas

Supplement to Lecture 2

1 An Induction Proof Format

An induction argument has a regular, but somewhat intricate structure. You can use the following format to ensure that you miss no steps; this format is not a requirement, just something to retreat to if you are a bit confused.

First, define the induction hypothesis P (n) carefully. Then proceed as shown below in the style where an assertion is made first, and then the justification follows in a sequence of indented steps.

∀n ≥ 0 P (n).

1. (base case) P (0).

(This is is usually easy, but not always.)

2. (inductive step) ∀n ≥ 0 (P (n) → P (n + 1))

(a) Fix n ≥ 0.

(b) P (n) → P (n + 1).

i. Assume P (n). ii. P (n + 1).

(This is usually the hard part of an induction proof.) iii. Q. E. D. (by implication rule)

(c) Q. E D. (by definition of ∀)

3. Q. E. D. (by induction)

Example. We cast a standard induction proof into the above format as a model. Theorem 1.1 For all n ≥ 0, 1 + 2 + … + n = \frac{n(n+1)}{2}. Proof. Let P (n) be the proposition that 1 + 2 + … + n = \frac{n(n+1)}{2}.

∀n ≥ 0 P (n).

1. (base case) P (0) holds because 1 = \frac{1(1+1)}{2}.

2. (inductive step) ∀n ≥ 0 (P (n) → P (n + 1)) (a) Fix n ≥ 0.

(b) P (n) → P (n + 1). i. Assume 1 + 2 + … + n = \frac{n(n+1)}{2}. ii. 1 + 2 + … + n + (n + 1) = \frac{(n+1)(n+2)}{2}

A. 1 + 2 + … + n = \frac{n(n+1)}{2} (by assumption)

B. 1 + 2 + … + n + (n + 1) = \frac{n(n+1)}{2} + (n + 1) (by adding n + 1 to each side) C. 1 + 2 + … + n + (n + 1) = \frac{(n+1)(n+2)}{2} (by simplifying)

iii. Q. E. D. (by implication rule)

(c) Q. E D. (by definition of ∀)

3. Q. E. D. (by induction)

2 Double Induction

Suppose that the function f(n, k) is define for all non-negative integers n and k as follows: • For all k ≥ 0, f(0, k) = 1.

• For all n ≥ 0, f(n, 0) = 1.

• For all n, k ≥ 0, f(n + 1, k + 1) = f(n, k + 1) + f(n + 1, k). This description is sufficient to calculate f(n, k) for specific values of n and k as shown

in the table below.

k = 0 1 2 3 4
n = 0 1 1 1 1 1
1  1 2 3 4 5
2  1 3 6 10 15
3  1 4 10 20 35

The following theorem gives the value of f(n, k) directly.

Theorem 2.1 For all n, k ≥ 0,

f(n, k) = \frac{(n + k)!}{n! k!}.

For example, the theorem states the f(3, 2) = \frac{5!}{3! 2!} = 10, which matches the value computed in the table above.

There is a difficulty with trying to prove this theorem by induction; namely, there are two variables involved, n and k. One solution is to use a double induction argument. The overall structure of the argument is an induction on n, but to complete the induction step, we use another whole induction argument on k.

Proof. The proof is by double induction. Let P (n) be the proposition that for all k ≥ 0, f(n, k) = \frac{(n+k)!}{n! k!}. In the base case, P (0) is true because, by part one of the definition of f, f(0, k) = 1 = \frac{(0+k)!}{0! k!}. In the inductive step, for n ≥ 0 assume that for all k ≥ 0, f(n, k) = \frac{(n+k)!}{n! k!} in order to prove that that for all k ≥ 0, f(n + 1, k) = \frac{(n+1+k)!}{(n+1)! k!}.

We complete the inductive step by using another whole induction argument, this time on k. Let Q(k) be the proposition that f(n + 1, k) = \frac{(n+1+k)!}{(n+1)! k!}. In the base case, Q(0) is true

because, by part two of the definition of f, f(n + 1, 0) = 1 = \frac{(n+1+0)!}{(n+1)! 0!}.

In the inductive step, for k ≥ 0 assume that f(n + 1, k) = \frac{(n+1+k)!}{(n+1)! k!} in order to prove that

f(n + 1, k + 1) = \frac{(n+1+k+1)!}{(n+1)! (k+1)!}. We reason as follows:

f(n + 1, k + 1) = f(n, k + 1) + f(n + 1, k)
= \frac{(n + k + 1)!}{n! (k + 1)!} + \frac{(n + 1 + k)!}{(n + 1)! k!}
= \frac{(n + 1)(n + k + 1)!}{(n + 1)! (k + 1)!} + \frac{(k + 1)(n + 1 + k)!}{(n + 1)! (k + 1)!}
= \frac{(n + 1 + k + 1)!}{(n + 1)! (k + 1)!}

The first step uses the third part of the definition of f. The second step uses the induction hypotheses from both the induction on n and the induction on k. The remaining steps are simplifications.