15 Mathematical Induction
15 Mathematical Induction
15 Mathematical Induction
Niloufar Shafiei
Mathematical induction
Mathematical induction is an extremely important proof technique. Mathematical induction can be used to prove
results about complexity of algorithms correctness of certain types of computer programs theorem about graphs and trees
Mathematical induction can be used only to prove results obtained in some other ways.
1
Mathematical induction
Assume P(n) is a propositional function. Principle of mathematical induction: To prove that P(n) is true for all positive integers n we complete two steps 1. Basis step: Verify P(1) is true. 2. Inductive step: Show P(k) P(k+1) is true for all positive integers k.
2
Mathematical induction
Basis step: P(1) Inductive step: k (P(k) Result: n P(n) 1. 2. 3. 4. 5. 6. P(1) k (P(k) P(k+1)) P(1) P(2) P(2) P(2) P(3) P(3) P(k+1)) domain: positive integers
Mathematical induction
[P(1) k (P(k) P(k+1))) n P(n)]
P(k+1))?
Direct proof can be used Assume P(k) is true for some arbitrary k. Then, show P(k+1) is true.
4
Example
Show that 1+2++n = n(n+1)/2, where n is a positive integer. Proof by induction: First define P(n) P(n) is 1+2++n= n(n+1)/2 Basis step: (Show P(1) is true.) 1 = 1(2)/2 So, P(1) is true.
5
Example
Show that 1+2++n = n(n+1)/2, where n is a positive integer. Proof by induction: Inductive step: (Show k (P(k) P(k+1)) is true.) Assume P(k) is true. 1+2++k = k(k+1)/2 Show P(k+1) is true. P(k+1) is 1+2++k+(k+1)=(k+1)(k+2)/2 1+2++k+(k+1) = k(k+1)/2 + (k+1) = [k(k+1) + 2(k+1)] / 2 = [k2 + k + 2k +2] / 2 = [k2 + 3k +2]/2 = (k+1)(k+2)/2 We showed that P(k+1) is true under assumption that P(k) is true. So, by mathematical induction 1+2++n = n(n+1)/2.
6
Example
Show that 1+3+5+(2n-1) = n2, where n is a positive integer. Proof by induction: First define P(n) P(n) is 1+3+5+(2n-1) = n2 Basis step: (Show P(1) is true.) 2-1 = 12 So, P(1) is true.
Example
Show that 1+3+5+(2n-1) = n2, where n is a positive integer. Proof by induction: Inductive step: (Show k (P(k) P(k+1)) is true.) Assume P(k) is true. 1+3+5+(2k-1) = k2 Show P(k+1) is true. P(k+1) is 1+3+5+(2k-1)+(2(k+1)-1) = (k+1)2 1+3+5+(2k-1)+(2(k+1)-1) = k2 + (2(k+1)-1) = k2 + 2k + 1 = (k+1)2 We showed that P(k+1) is true under assumption that P(k) is true. So, by mathematical induction 1+3+5+(2n-1) = n2.
8
Mathematical induction
Sometimes we need to show that P(n) is true for n = b, b+1, b+2, , where b is an integer other than 1. Mathematical induction: Basis step: Show P(b) is true. Inductive step: Show k (P(k) P(k+1)) is true.
9
Example
Use mathematical induction to show that 1+2+22++2n = 2n+1 - 1 for all nonnegative integers n. Proof by induction: First define P(n) P(n) is 20+21+22++2n = 2n+1 - 1 Basis step: (Show P(0) is true.) 20 = 21 - 1 So, P(0) is true.
10
Example
Use mathematical induction to show that 1+2+22++2n = 2n+1 - 1 for all nonnegative integers n. Proof by induction:
Inductive step: (Show k (P(k) Assume P(k) is true. P(k+1)) is true.)
1+2+22++2k = 2k+1 - 1
Show P(k+1) is true. P(k+1) is 1+2+22++2k+1 = 2k+2 - 1 1+2+22++2k+2k+1 = 2k+1 - 1 + 2k+1 = 2 . 2k+1 - 1 = 2k+2 - 1 We showed that P(k+1) is true under assumption that P(k) is true. So, by mathematical induction 1+2+22++2n = 2n+1 - 1.
11
Example
Use mathematical induction to prove the formula for the sum of a finite number of terms of a geometric n progression. ark = a+ar+ar2++arn= (arn+1 - a) / (r-1) when r 1 Proof by induction: First define P(n) P(n) is a+ar+ar2++arn= (arn+1 - a) / (r-1). Basis step: (Show P(0) is true.) ar0 = (ar - a)/(r-1) = a So, P(0) is true.
12
k=0
Example
Use mathematical induction to prove the formula for the sum of a finite number of terms of a geometric n progression. ark = a+ar+ar2++arn= (arn+1 - a) / (r-1) when r 1 Proof by induction: Inductive step: (Show k (P(k) P(k+1)) is true.) Assume P(k) is true. a+ar+ar2++ark= (ark+1 - a) / (r-1) Show P(k+1) is true. P(k+1) is a+ar+ar2++ark+1= (ark+2 - a) / (r-1)
13
k=0
Example
Use mathematical induction to prove the formula for the sum of a n finite number of terms of a geometric progression. ark = a+ar+ar2++arn= (arn+1 - a) / (r-1) when r 1 k=0 Proof by induction: a+ar+ar2++ark+ark+1= (ark+1 - a) / (r-1) + ark+1 = (ark+1 - a) / (r-1) + ark+1 (r-1) / (r-1) = (ark+1 - a + ark+2 - ark+1) / (r-1) = (ark+2 - a) / (r-1) We showed that P(k+1) is true under assumption that P(k) is true. So, by mathematical induction a+ar+ar2++arn= (arn+1 - a) / (r-1).
14
Example
Use mathematical induction to prove that 2n<n! for every positive integer n with n 4.
Proof by induction: First define P(n) P(n) is 2n < n!. Basis step: (Show P(4) is true.) 24 < 1 . 2 . 3 . 4 16 < 24 So, P(4) is true.
15
Example
Use mathematical induction to prove that 2n<n! for every positive integer n with n 4. Proof by induction: Inductive step: (Show k (P(k) P(k+1)) is true.) Assume P(k) is true. 2k < k! Show P(k+1) is true. P(k+1) is 2(k+1) < (k+1)! 2 . 2k < 2 . k! 2(k+1) < 2 . k! < (k+1) . k! = (k+1)! We showed that P(k+1) is true under assumption that P(k) is true. So, by mathematical induction 2n<n!.
16
Example
Harmonic numbers Hj, j=1,2,3, are defined by Hj = 1+1/2 + 1/3 + + 1/j. Use mathematical induction to show that H2n 1 + n/2, whenever n is a nonnegative integer. Proof by induction: First define P(n) P(n) is H2n 1+n/2. Basis step: (Show P(0) is true.) H20 1+ 0/2 1 1 So, P(0) is true.
17
Example
Use mathematical induction to show that H2n 1 + n/2, whenever n is a nonnegative integer. Proof by induction: Inductive step: (Show k (P(k) P(k+1)) is true.) Assume P(k) is true. H2k = 1+1/2+1/3++1/2k 1 + k/2 Show P(k+1) is true. P(k+1) is 1+1/2+1/3++1/2k + 1/(2k+1) + + 1/2k+1 1+(k+1)/2 1+1/2+1/3++1/2k + 1/(2k+1) + + 1/2k+1 1+k/2+ 1/(2k+1) + + 1/2k+1 (1 + k/2) + 2k . 1/2k+1 (1 + k/2) + 1/2 = 1 + (k+1)/2 We showed that P(k+1) is true under assumption that P(k) is true. So, by mathematical induction H2n 1 + n/2.
18
Example
Use mathematical induction to prove that n3-n is divisible by 3 whenever n is a positive integer.
Proof by induction: First define P(n) P(n) is n3-n is divisible by 3. Basis step: (Show P(1) is true.) 13-1 = 0 is divisible by 3. So, P(1) is true.
19
Example
Use mathematical induction to prove that n3-n is divisible by 3 whenever n is a positive integer. Proof by induction: Inductive step: (Show k (P(k) P(k+1)) is true.) Assume P(k) is true. (k3-k is divisible by 3) Show P(k+1) is true. (P(k+1) is (k+1)3 - (k+1) is divisible by 3.) (k+1)3 - (k+1) = (k3 + 3k2 + 3k + 1) - (k+1) = (k3 - k) + 3(k2 + k) By inductive hypothesis (k3 - k) is divisible by 3 and 3(k2 + k) is divisible by 3 because it is 3 times an integer, so P(k+1) is divisible by 3 We showed that P(k+1) is true under assumption that P(k) is true. So, by mathematical induction n3-n is divisible by 3.
20
Example
Let S be a set with n elements, where n is nonnegative integer. Use mathematical induction to show that S has 2n subsets.
Proof by induction: First define P(n) P(n) is A set with n elements has 2n subsets. Basis step: (Show P(0) is true.) The empty set has 20=1 subset, namely, itself. So, P(0) is true.
21
Example
Let S be a set with n elements, where n is nonnegative integer. Use mathematical induction to show that S has 2n subsets.
Proof by induction: Inductive step: (Show k (P(k) P(k+1)) is true.) Assume P(k) is true. (set S with k elements has 2k subsets) Show P(k+1) is true. (set T (=S {a}) has 2k+1 subsets.) For each subset X of S there are exactly two subsets of T, namely, X and X {a}. Since S has 2k subsets, T has 2 . 2k = 2k+1 subsets. We showed that P(k+1) is true under assumption that P(k) is true. So, by mathematical induction, any set with n elements, has 2n subsets.
22
Example
Use mathematical induction to prove the following generalization of one of De Morgans laws:
n n
J=1
Aj =
J=1
Aj
P(n) is Aj = Aj. J=1 J=1 Basis step: (Show P(2) is true.) A1 A2 = A1 A2 By De Morgans law, P(2) is true.
23
Example
Use mathematical induction to prove
n n
J=1 J=1 Proof by induction: Inductive step: (Show k (P(k) Assume P(k) is true. k J=1 Show P(k+1) is true. k+1 J=1 k
Aj =
Aj
Aj =
J=1 k+1
Aj
Aj =
J=1
Aj
24
Example
Use mathematical induction to prove
n n
J=1
Aj =
J=1 k
Aj
when n 2. Ak+1 Ak+1 (by De Morgans law) Ak+1 (by inductive hypothesis)
A j) Aj )
=( =( =
J=1 k J=1 k
Aj )
Aj
Example
An odd number of people stand in a yard at mutually distinct distances. At the same time each person throws a pie at their nearest neighbor, hitting this person. Use mathematical induction to show that there is at least one person who is not hit by a pie. Proof by induction: First define P(n) P(n) is there is one survivor whenever 2n+1 people stand in a yard at distinct mutual distances and each person throws a pie at their nearest neighbor.
26
Example
Proof by induction: Basis step: (Show P(1) is true.) There are 2(1)+1=3 people (A,B and C) in the pie fight. Assume the closest pair is A and B. Since the distances between pairs of people are different, the distance between A and C and the distance between B and C are greater than the distance between A and B. So, A and B throw a pie at each other, while C throws a pie at either A or B, whichever is closer. So, C is not hit by a pie and P(1) is true.
27
Example
Proof by induction: Inductive step: (Show k (P(k) P(k+1)) is true.) Assume P(k) is true. There is at least one survivor whenever 2k+1 people stand in a yard at distinct mutual distances and each throws a pie at their nearest neighbor. Show P(k+1) is true. Assume there are 2(k+1)+1=2k+3 people in a yard with distinct distance between pairs of people. Let A and B be the closest pair of people among 2k+3 people. So, A and B throw pies at each other.
28
Example
Proof by induction: Case 1: If someone else throws a pie at either A or B. So, three pies are thrown at A and B. So, at most (2k+3 - 3) = 2k pies are thrown at the remaining 2k+1 people. This guarantees that at least one person is a survivor. Case 2: If no one else throws a pie at either A or B. Besides A and B, there are 2k+1 people. Since the distances between pairs of people are all different, by inductive hypothesis, there is at least one survivor when 2k+1 people throws pie at each other. So, by mathematical induction, P(n) is true.
29
Recommended exercises
3,6,7,11,13,16,21,27,29,33,35,39,41,43,45,49 ,59,61,70
30