Copyright © Zeph Grunschlag, Induction Zeph Grunschlag
L142 Agenda Mathematical Induction Proofs Well Ordering Principle Simple Induction Strong Induction (Second Principle of Induction) Program Correctness Correctness of iterative Fibonacci program
L143 Mathematical Induction Suppose we have a sequence of propositions which we would like to prove: P (0), P (1), P (2), P (3), P (4), … P (n), … EG: P (n) = “The sum of the first n positive odd numbers is the n th perfect square” We can picture each proposition as a domino: P (n)
L144 Mathematical Induction So sequence of propositions is a sequence of dominos. … P (n+1)P (n) P (2)P (1)P (0)
L145 Mathematical Induction When the domino falls, the corresponding proposition is considered true: P (n)
L146 Mathematical Induction When the domino falls (to right), the corresponding proposition is considered true: P (n) true
L147 Mathematical Induction Suppose that the dominos satisfy two constraints. 1) Well-positioned: If any domino falls (to right), next domino (to right) must fall also. 2) First domino has fallen to right P (0) true P (n+1)P (n)
L148 Mathematical Induction Suppose that the dominos satisfy two constraints. 1) Well-positioned: If any domino falls to right, the next domino to right must fall also. 2) First domino has fallen to right P (0) true P (n+1)P (n)
L149 Mathematical Induction Suppose that the dominos satisfy two constraints. 1) Well-positioned: If any domino falls to right, the next domino to right must fall also. 2) First domino has fallen to right P (0) true P (n) true P (n+1) true
L1410 Mathematical Induction Then can conclude that all the dominos fall! … P (n+1)P (n) P (2)P (1)P (0)
L1411 Mathematical Induction Then can conclude that all the dominos fall! … P (n+1)P (n) P (2)P (1)P (0)
L1412 Mathematical Induction Then can conclude that all the dominos fall! …P (0) true P (n+1)P (n) P (2)P (1)
L1413 Mathematical Induction Then can conclude that all the dominos fall! …P (0) true P (1) true P (n+1)P (n) P (2)
L1414 Mathematical Induction Then can conclude that all the dominos fall! P (2) true …P (0) true P (1) true P (n+1)P (n)
L1415 Mathematical Induction Then can conclude that all the dominos fall! P (2) true …P (0) true P (1) true P (n+1)P (n)
L1416 Mathematical Induction Then can conclude that all the dominos fall! P (2) true …P (0) true P (1) true P (n) true P (n+1)
L1417 Mathematical Induction Then can conclude that all the dominos fall! P (2) true …P (0) true P (1) true P (n) true P (n+1) true
L1418 Mathematical Induction Principle of Mathematical Induction: If: 1) [basis] P (0) is true 2) [induction] n P(n) P(n+1) is true Then: n P(n) is true This formalizes what occurred to dominos. P (2) true …P (0) true P (1) true P (n) true P (n+1) true
L1419 Mathematical Induction Example EG: Prove n 0 P(n) where P(n) = “The sum of the first n positive odd numbers is the n th perfect square.” =
L1420 Mathematical Induction Example Every induction proof has two parts, the basis and the induction step. 1) Basis: Show that the statement holds for n = 1. In our case, plugging in 0, we would like to show that:
L1421 Mathematical Induction Example 2) Induction: Show that if statement holds for k, then statement holds for k+1. (induction hypothesis) This completes proof.
More Examples In class notes L1422