1 / 28

Mathematical Induction

Mathematical Induction. Section 4.1. Example. Consider the predicate P ( n ): ``1 + 3 + ··· + (2 n -1) is equal n 2 ’’ Let ’ s verify the truth value of P ( n ) for some n : P ( 1 ): 1 (1) is equal 1 2 P ( 2 ): 1 + 3 (4) is equal 2 2

marli
Télécharger la présentation

Mathematical Induction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mathematical Induction Section 4.1

  2. Example • Consider the predicate P(n): ``1 + 3 + ··· + (2n-1) is equal n2’’ • Let’s verify the truth value of P(n) for some n: • P(1): 1 (1) is equal 12 • P(2): 1 + 3 (4) is equal 22 • P(3): 1 + 3 + 5 (9) is equal 32 • .... • P(9): 1 + 3 + 5 + 7 + 9 + 11 + 13 + 15 + 17 is equal 92 • …Let us write “is equal” by the symbol =. • Thus,1 + 3 + 5 + 7 + 9 + 11 + 13 + 15 + 17 = 92

  3. Example… (no calculators!) • Suppose, without verifying, that P(21): 1 + 3 + 5 + … + 39 + 41= 212 • Given above, can we prove thatP(22): 1 + 3 + 5 + … + 39 + 41 + 43 = 222 ? • P(22): 1 + 3 + 5 + … + 39 + 41 + 43 = 222 ? • P(22) : 212 (by P(21)) +43= 222 • P(22) : 212 + 43 = 222 ? • P(22): (22– 1)2 + (22×2 –1) = 222 ? • P(22): 222–22×2 + 1 + 22×2 –1 = 222✔

  4. Example (no calculators!) • How general is our methods? • Let’s replace 21 with a place holder k. • Suppose, without verifying, that P(k) = 1 + 3 + 5 + … + (2k-1)= k2 • Given this, can we prove thatP(k+1) = 1 + 3 + 5 + … + (2(k+1)-1)= (k+1)2 ? • P(k+1) = 1 + 3 + 5 + … + (2k-1) + (2(k+1)-1) = (k+1)2 ? • P(k+1) = k2 (by P(k)) + (2(k+1)-1) = (k+1)2 ? • P(k+1) = k2 + (2(k+1)-1) = (k+1)2 ? • P(k+1) = ((k+1)– 1)2 + (2(k+1)-1) = (k+1)2 ? • P(k+1) = (k+1)2–2(k+1) + 1 + 2(k+1)–1 = (k+1)2✔

  5. Example… • What have we accomplished so far? • We have shown that P(k) ⇒P(k+1), for any k. For instance: • P(1) ⇒P(2), • P(2) ⇒P(3), • … • P(6) ⇒P(7), • … • P(19) ⇒P(20), • … • P(2000) ⇒P(2001), …. • Note that, we do NOT know if, for example, P(6) or P(19) … is true. All we know is that IF, for example, P(6) is true, then P(7) is also true. • What do we need to show that P(n) is true for all n? • All we need is to PROVE that P(1) is indeed true.

  6. Mathematical Induction • Let P(n) be some propositional function involving integer n. • P(n) = “n (n+3) is an even number ” • P(n) = “1 + 3 + ··· + (2n-1) = n2 ” • ….. • To prove that P(n) is true for all positive integers n, we can do the following: • Give a proof (usually a straight verification) that P(1) is true. • Give a proof that for an arbitraryk, IFP(k) is true THENP(k+ 1) is true. That is, we validate the logical implication: P(k) ⇒P(k+1)

  7. Mathematical Induction • Mathematical induction amounts to the following rule of inference:[P(1)  k ((k ≥ 1)  P(k))  P(k +1))] ⇒ nP(n)where our universe is the set of positive integers • A proof using mathematical induction involves: • The Basis: prove P(1) is true. • The Hypothesis: Assume P(k) is true for an arbitrary k ≥ 1. • The InductionStep: Establish that P(k +1) A (direct) proof that ((k ≥ 1)  P(k)) ⇒P(k +1)

  8. Mathematical Induction…. • In proof by mathematical induction it is not given that P(k) is true for all positive integers! It is only shown that IF P(k)is true, THENP(k+1)is also true. Otherwise the proof by mathematical induction was a case of begging the question or circular reasoning.

  9. Example • Let P(n) = “1 + 3 + ··· + (2n-1) = n2 ”. We want to prove by induction that P(n) is true for all n. • Basis: Prove that when n=1, the proposition is correct. P(1) is “1= 12”; thus, it is correct. • Hypothesis: We will assume that P(k) is true for some arbitrary k. • Step: Using the hypothesis, we want to prove that P(k +1) is true.

  10. Example

  11. Example

  12. Induction can start anywhere • To show P(n) for any n ≥ b : • The Basis: prove P(b) is true. • The Hypothesis: Assume P(k) is true and k ≥ b. • The InductionStep: Establish that P(k +1) A (direct) proof that ((k ≥ b)  P(k)) ⇒P(k +1)

  13. Example • Suppose we have coins of two different denominations, namely, 3 cents and 5 cents. We want to show that it is possible to pay exactly for any purchase of 8 cents or higher. In other words, that we can make up 8, 9, 10, …. cents using just these coins. • Here is a proof by induction: • Basis: 8 = 3+5✓ • Hypothesis: Suppose we can pay exactly with just 3-cent coins and 5-cent coins for a purchase amount of k cents.

  14. Example • Want to show that it is we can pay exact for (k + 1) cents using just 3-cent coins and 5-cent coins. • Proof: If in making up k cents, we used at least one 5- cent coin, then replace that coin with two 3-cent coins to make up (k + 1) cents. Otherwise, we must have used at least three 3-cent coins to make up ksince we are considering k > 8. In the case, we will replace three 3-cent coins with two 5-cent coins to make up (k + 1) cents.

  15. Strong induction • To prove that P(k+1) holds, we may use any of the following assumptions: • P(k) is true • P(k – 1) is true • P(k – 2) is true • …. • P(1) is true • We must make sure that all the “assumptions” are in fact true for the induction “engine” to start.

  16. Induction, recap • Let P(n) be some propositional function about an integer n. To prove that P(n) is true for all positive integers n, we do the following: • Give a proof that P(1) is true • Give a proof that if all of P(1), P(2), …, P(k) are true and k ≥ 1 thenP(k+1) is also true. • As before, the induction can start at any integer b: • Give a proof that P(b) is true • Give a proof that if all of P(b), P(b+1), …, P(k) are true and k ≥ bthenP(k+1) is also true.

  17. Example • Show that any positive integer n > 1 is either a prime or a product of primes. • Proof: • Basis: n = 2. Since 2 is prime.✓ • Hypothesis: Assume true for n≤k • Step: Need to show that, given the hypothesis, the proposition is true for k+1. • Proof: If n = k+1 is a prime, then the proposition is true. If k+1 is not prime, then k+1=pq, where p ≤ k and q ≤ k. By the hypothesis, p and q are either primes or product of primes, and thus so is pq.

  18. Example • Show that for every nonnegative integer n 20+ 21 + 22 + 23 + ∙∙∙ + 2n= 2n+1–1. • Let P(n) be the corresponding predicate • Basis: P(0) is true since 20 =1= 21-1. • Hypothesis: Assume that P(k) is true and that k≥ 0. • Step: Need to show that P(k+1) is true given that the hypothesis is true.

  19. Example P(k+1) = 20+21+22+23+ ∙∙∙+2k + 2k+1 = 2k+1–1 + 2k+1 by the induction hypothesis = 2k+2–1 by arithmetic = 2(k+1)+1–1 by arithmetic Thus P(k) ⇒ P(k +1)

  20. Example

  21. Example Hypothesis is used here

  22. Proof of Correctness of Mathematical Induction We want to show that [P(1)  k ((k ≥ 1) P(k))  P(k +1))] ⇒ nP(n) where the universe is the positive integers Proof is done by contradiction • ¬ nP(n) Contrary assumption • x¬P(x) 1, Demogan’s • ¬ P(r)2, EI, select smallest r • P(r -1) 3, choice of r • P(1) Premise • r > 1 r is positive (by choice in 4) & 5 • k ((k ≥ 1) P(k))  P(k +1)) Premise • ((r-1 ≥ 1) P(r-1))  P(r) UI, k = r-1 • P(r) 4, 6 & 8, modus ponens • Contradiction 3 & 9

  23. Example

  24. Example

  25. Proof:

  26. Example • Prove by induction thatif S is a finite set with n elements then S has 2n subsets. • Basis: Assume n = 0. There is one set with cardinality zero: the empty set. Thus, S= . The empty set has only one subset: itself. Moreover, 20 = 1. Thus the basis is verified. • Hypothesis. Assume true for any set S with cardinality 1,2,…, k • Step. Want to show that if S has cardinality k+1, the proposition still holds. Let S be such a set. Let r be an arbitrary element of S. Write S = X⋃ {r}. Now, the subsets of S either contain r or they don’t. For the ones that do not contain r , those are also subsets of X, and there are 2k of them. To form the ones that do contain r, we take each subset of X and inset r in it. That would give us another 2k subsets. Thus, S has a total of 2k+1 subsets.

  27. “Induction” and “Mathematical Inductions” • Let P(n) denote the number of different ways to write nas a sum of positive integers when order is not important. For instance, integer 5 can be written in the following 7 ways:1+1+1+1+1=2+1+1+1=2+2+1=3+1+1=3+2=4+1=5 • Verify that: • P(2) = 2 • P(3) = 3 • P(4) = 5 • P(5) = 7 • P(6) = ? • P(7) …..

  28. What’s wrong with the following proof?

More Related