Presentation is loading. Please wait.

Presentation is loading. Please wait.

Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank1 Inductive Proofs: a brief introduction Rosen 5 th ed., §3.3 ~35 slides, ~1.5 lecture.

Similar presentations


Presentation on theme: "Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank1 Inductive Proofs: a brief introduction Rosen 5 th ed., §3.3 ~35 slides, ~1.5 lecture."— Presentation transcript:

1 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank1 Inductive Proofs: a brief introduction Rosen 5 th ed., §3.3 ~35 slides, ~1.5 lecture

2 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank2 §3.3: Mathematical Induction A powerful, rigorous technique for proving that a predicate P(n) is true for every natural number n, no matter how large.A powerful, rigorous technique for proving that a predicate P(n) is true for every natural number n, no matter how large. Essentially a “domino effect” principle.Essentially a “domino effect” principle. Based on this inference rule: P(0)  n  0 (P(n)  P(n+1))  n  0 P(n)Based on this inference rule: P(0)  n  0 (P(n)  P(n+1))  n  0 P(n) “The First Principle of Mathematical Induction”

3 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank3 The “Domino Effect” 0 1 2 3 4 5 6 Premise #1: Domino #0 falls.Premise #1: Domino #0 falls. Premise #2: For every n  N, if domino #n falls, then so does domino #n+1.Premise #2: For every n  N, if domino #n falls, then so does domino #n+1. Conclusion: All of the dominoes fall down!Conclusion: All of the dominoes fall down!

4 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank4 The “Domino Effect” 0 1 2 3 4 5 6 … Premise #1: Domino #0 falls.Premise #1: Domino #0 falls. Premise #2: For every n  N, if domino #n falls, then so does domino #n+1.Premise #2: For every n  N, if domino #n falls, then so does domino #n+1. Conclusion: All of the dominoes fall down!Conclusion: All of the dominoes fall down! Note: this works even if there are infinitely many dominoes!

5 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank5 First premiss: the basis step (also: base case)First premiss: the basis step (also: base case) Second premiss: the induction stepSecond premiss: the induction step Why is mathematical induction valid?Why is mathematical induction valid?

6 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank6 Validity of Induction Proof that  k>0 P(k) is a valid conclusion: Consider any k>0. The 2 nd premiss  n  0 (P(n)  P(n+1)) implies that (P(0)  P(1))  (P(1)  P(2))  …  (P(k  1)  P(k)). Premiss #1 says that P(0). One application of Modus Ponens (in combination with (P(0)  P(1)) ) gives us P(1); another gives us P(2), and so on to P(k) (using k steps of Modus Ponens in total)). Thus  k>0 P(k). ■ Premiss #1 says that P(0). One application of Modus Ponens (in combination with (P(0)  P(1)) ) gives us P(1); another gives us P(2), and so on to P(k) (using k steps of Modus Ponens in total)). Thus  k>0 P(k). ■

7 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank7 The Well-Ordering Property A more general way to prove the validity of the inductive inference rule is by using the fact that (N,  ) is a well-ordering:A more general way to prove the validity of the inductive inference rule is by using the fact that (N,  ) is a well-ordering: –Every non-empty set of natural numbers has a least (“smallest”) element. –   S  N :  m  S :  n  S : m  n This implies that {n|  P(n)} (if non-empty!) has a min. element m, but then the assumption that P(m−1)  P((m−1)+1) would be contradicted.This implies that {n|  P(n)} (if non-empty!) has a min. element m, but then the assumption that P(m−1)  P((m−1)+1) would be contradicted.

8 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank8 Inductive Proofs have a fixed structure: Suppose we want to prove  n P(n)…Suppose we want to prove  n P(n)… –Basis step: Prove P(0). –Inductive step: Prove  n P(n)  P(n+1). E.g. you could use a direct proof, as follows:E.g. you could use a direct proof, as follows: Assume P(n). (inductive hypothesis = IH)Assume P(n). (inductive hypothesis = IH) Now, under this assumption, prove P(n+1).Now, under this assumption, prove P(n+1). –If you manage to do all this, then the inductive inference rule gives us  n P(n).

9 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank9 Induction is like heridity:Induction is like heridity: “If Adam had big feet, and big feet are heriditary then every person (except possibly Eve) has/had big feet”“If Adam had big feet, and big feet are heriditary then every person (except possibly Eve) has/had big feet” (Note: what if a person’s feet can be just slightly smaller than that of both of his parents?)(Note: what if a person’s feet can be just slightly smaller than that of both of his parents?)

10 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank10 Generalizing Induction slightly Rule can also be used to prove  n  c P(n) for a given constant c  Z, where maybe c  0.Rule can also be used to prove  n  c P(n) for a given constant c  Z, where maybe c  0. –In this circumstance, the base case is to prove P(c) rather than P(0), and the inductive step is to prove  n  c (P(n)  P(n+1)).

11 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank11 Proof by induction (1 st princ): a very simple example Theorem:  x  N (x  0). Proof:Theorem:  x  N (x  0). Proof: Basis step:Basis step: Inductive step:Inductive step:

12 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank12 Proof by induction (1 st princ): a very simple example Theorem:  x  N (x  0). Proof:Theorem:  x  N (x  0). Proof: Basis step: we show that 0  0. This is obvious, since  is reflexive.Basis step: we show that 0  0. This is obvious, since  is reflexive. Inductive step: we show that  x (x  0  x+1  0). Induction Hypothesis (IH): Suppose a  0. Clearly, a+1  a. Transitivity allows us to infer from these two propositions that a+1  0. QEDInductive step: we show that  x (x  0  x+1  0). Induction Hypothesis (IH): Suppose a  0. Clearly, a+1  a. Transitivity allows us to infer from these two propositions that a+1  0. QED

13 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank13 Find the error “Theorem”: All sets of horses are ‘uniform’, in the sense that all their elements have the same colour.“Theorem”: All sets of horses are ‘uniform’, in the sense that all their elements have the same colour. Method: induction over the cardinality of the setMethod: induction over the cardinality of the set P(x): all sets of cardinality x are uniformP(x): all sets of cardinality x are uniform“Proof”: Basis step: P(1) (This is trivial)Basis step: P(1) (This is trivial)

14 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank14 Find the error “Theorem”: All sets of horses are uniform“Theorem”: All sets of horses are uniform Induction Hypothesis: P(n). To prove: P(n+1). Proof: Consider a set S= {h 1,h 2,…,h n+1 } of n+1 horses. Split S into its subsets A and B: A= {h 1,h 2,…h n } B= {h 2,h 3,…,h n+1 } Induction Hyp implies that A is uniform and B is uniform. A  B , so A  B is uniform. QEDInduction Hypothesis: P(n). To prove: P(n+1). Proof: Consider a set S= {h 1,h 2,…,h n+1 } of n+1 horses. Split S into its subsets A and B: A= {h 1,h 2,…h n } B= {h 2,h 3,…,h n+1 } Induction Hyp implies that A is uniform and B is uniform. A  B , so A  B is uniform. QED

15 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank15 Second Example (1st princ.) Prove that the sum of the first n odd positive integers is n 2. That is, prove:Prove that the sum of the first n odd positive integers is n 2. That is, prove: Proof by induction.Proof by induction. –Base case: Let n=1. The sum of the first 1 odd positive integer is 1, which equals 1 2. (Cont…) P(n)P(n)

16 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank16 Example cont. –Inductive step: Prove  n  1: P(n)  P(n+1). Let n  1, assume P(n) (IH), and prove P(n+1). Let n  1, assume P(n) (IH), and prove P(n+1). By inductive hypothesis P(n)

17 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank17 Proving the induction step of the first principle of m.i. To prove the universally quantified statement  n  1: P(n)  P(n+1), you do this: –Taking an arbitrary n, you hypothesise P(n) –If this allows you to prove P(n+1) then you have proved  n  1: P(n)  P(n+1)

18 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank18 Second Principle of Induction Characterized by another inference rule: P(0)  n  0: (  0  k  n P(k))  P(n+1)  n  0: P(n)Characterized by another inference rule: P(0)  n  0: (  0  k  n P(k))  P(n+1)  n  0: P(n) The only difference between this and the 1st principle is that:The only difference between this and the 1st principle is that: –the inductive step here makes use of the stronger hypothesis that P(k) is true for all smaller numbers k<n+1, not just for k=n. P is true in all previous cases A.k.a. “Strong Induction”

19 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank19 Proving the induction step of the second principle of m.i. To prove the universally quantified statement  n  0: ((  0  k  n P(k))  P(n+1)) you do this: –Taking an arbitrary n  0, you hypothesise  0  k  n P(k) –If this allows you to prove P(n+1) then you have proved  n  0: ((  0  k  n P(k))  P(n+1))

20 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank20 Example of Second Principle Theorem: Show that every n>1 can be written as a product  p i = p 1 p 2 …p s of prime numbers. –Let P(n)=“n has that property” Definition: x is a prime number  x is only dividable by 1 and by xDefinition: x is a prime number  x is only dividable by 1 and by x Base case: n=2, let s=1, p 1 =2.Base case: n=2, let s=1, p 1 =2. Inductive step: Let n  2. IH: assume  2  k  n: P(k). Consider n+1. If it’s prime, then let s=1, p 1 =n+1. Else …..Inductive step: Let n  2. IH: assume  2  k  n: P(k). Consider n+1. If it’s prime, then let s=1, p 1 =n+1. Else …..

21 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank21 Example of Second Principle Theorem: Show that every n>1 can be written as a product  p i = p 1 p 2 …p s of some series of s prime numbers. –Let P(n)=“n has that property” Base case: n=2, let s=1, p 1 =2.Base case: n=2, let s=1, p 1 =2. Inductive step: Let n  2. IH: assume  2  k  n: P(k). Consider n+1. If it’s prime, then let s=1, p 1 =n+1. Else n+1=ab, where 1  a  n and 1  b  n. Then (by IH) a=p 1 p 2 …p t and b=q 1 q 2 …q u. Consequently, n+1 = p 1 p 2 …p t q 1 q 2 …q u, a product of s=t+u primes.Inductive step: Let n  2. IH: assume  2  k  n: P(k). Consider n+1. If it’s prime, then let s=1, p 1 =n+1. Else n+1=ab, where 1  a  n and 1  b  n. Then (by IH) a=p 1 p 2 …p t and b=q 1 q 2 …q u. Consequently, n+1 = p 1 p 2 …p t q 1 q 2 …q u, a product of s=t+u primes.

22 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank22 Application to the cardinality of sets Theorem: for all finite sets A, if |A|=n then P(A) = 2 n. Proof:Theorem: for all finite sets A, if |A|=n then P(A) = 2 n. Proof: Base step: if |A|=0 then P(A) = 2 0 =1. Why?Base step: if |A|=0 then P(A) = 2 0 =1. Why?

23 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank23 Application to the cardinality of sets Theorem: for all finite sets A, if |A|=n then P(A) = 2 n. Proof:Theorem: for all finite sets A, if |A|=n then P(A) = 2 n. Proof: Base step: if |A|=0 then P(A) = 2 0 =1. Why? P(  )={  } and |{  }|=1.Base step: if |A|=0 then P(A) = 2 0 =1. Why? P(  )={  } and |{  }|=1.

24 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank24 Application to the cardinality of sets Theorem: for all finite sets A, if |A|=n then P(A) = 2 n. Proof:Theorem: for all finite sets A, if |A|=n then P(A) = 2 n. Proof: Base step: if |A|=0 then P(A) = 2 0 =1. Why? P(  )={  } and |{  }|=1.Base step: if |A|=0 then P(A) = 2 0 =1. Why? P(  )={  } and |{  }|=1. I.H.: suppose for every set A such that |A|=n, it holds that P(A) = 2n Then consider any set B such that |B|=n+1. To prove: |P(B)|=2 n+1I.H.: suppose for every set A such that |A|=n, it holds that P(A) = 2n Then consider any set B such that |B|=n+1. To prove: |P(B)|=2 n+1

25 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank25 Application to the cardinality of sets I.H.: suppose for every set A such that |A|=n, it holds that P(A) = 2n. Then consider any set B such that |B|=n+1. To prove: |P(B)|=2 n+1I.H.: suppose for every set A such that |A|=n, it holds that P(A) = 2n. Then consider any set B such that |B|=n+1. To prove: |P(B)|=2 n+1 Proof: B has twice as many subsets as A. (Think of B as consisting of a set B’ such that |B’|=|A|=n, plus one other element b. Every subset of B’ comes in two flavours: one with and one without b.) Thus, |P(B)| = 2.|P(A)| = 2.2 n (because of IH) = 2 n+1Proof: B has twice as many subsets as A. (Think of B as consisting of a set B’ such that |B’|=|A|=n, plus one other element b. Every subset of B’ comes in two flavours: one with and one without b.) Thus, |P(B)| = 2.|P(A)| = 2.2 n (because of IH) = 2 n+1

26 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank26 Mathematical Induction is valid on all well- ordered structures (as we have proven).Mathematical Induction is valid on all well- ordered structures (as we have proven). We have seen examples where it is applied to the structure (N,  ). More generally, ({x  Z|x>n},  ).We have seen examples where it is applied to the structure (N,  ). More generally, ({x  Z|x>n},  ). Integers are everywhere, and this makes Mathematical Induction very powerfulIntegers are everywhere, and this makes Mathematical Induction very powerful

27 Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank27 Something else: `Nonmathematical` induction We have talked about mathematical induction.We have talked about mathematical induction. In physical sciences (and in ordinary life), people use a much less precise kind of inductive hypothesis to make inferences.In physical sciences (and in ordinary life), people use a much less precise kind of inductive hypothesis to make inferences. E.g.: “If the sun has come up every day up to a given day, then it will come up the next day”. E.g.: “If the sun has come up every day up to a given day, then it will come up the next day”. You can’t prove that! Non-mathematical induction may be highly plausible, but its induction step is never logically valid.You can’t prove that! Non-mathematical induction may be highly plausible, but its induction step is never logically valid.


Download ppt "Module #15 – Inductive Proofs 12/6/2015(c)2001-2003, Michael P. Frank1 Inductive Proofs: a brief introduction Rosen 5 th ed., §3.3 ~35 slides, ~1.5 lecture."

Similar presentations


Ads by Google