1 Section 4.4 Inductive Proof What do we believe about nonempty subsets of N? Since  N, <  is well-founded, and in fact it is linear, it follows that.

Slides:



Advertisements
Similar presentations
Equivalence, Order, and Inductive Proof
Advertisements

Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Week 5 - Friday.  What did we talk about last time?  Sequences  Summation and production notation  Proof by induction.
1 Mathematical Induction. 2 Mathematical Induction: Example  Show that any postage of ≥ 8¢ can be obtained using 3¢ and 5¢ stamps.  First check for.
Induction and recursion
1.  The set N = {1,2,3,4,……..} is known as natural numbers or the set of positive integers  The natural numbers are used mainly for :  counting  ordering.
1 Intro to Induction Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
1 Mathematical Induction. 2 Mathematical Induction: Example  Show that any postage of ≥ 8¢ can be obtained using 3¢ and 5¢ stamps.  First check for.
CSE115/ENGR160 Discrete Mathematics 03/22/12 Ming-Hsuan Yang UC Merced 1.
CSE115/ENGR160 Discrete Mathematics 03/31/11
1 Section 3.3 Mathematical Induction. 2 Technique used extensively to prove results about large variety of discrete objects Can only be used to prove.
CSE115/ENGR160 Discrete Mathematics 03/29/11 Ming-Hsuan Yang UC Merced 1.
1 Strong Mathematical Induction. Principle of Strong Mathematical Induction Let P(n) be a predicate defined for integers n; a and b be fixed integers.
Mathematical Induction
1 Mathematical Induction. 2 Mathematical Induction: Example  Show that any postage of ≥ 8¢ can be obtained using 3¢ and 5¢ stamps.  First check for.
What it is? Why is it a legitimate proof method? How to use it?
ICS 253 Presents Mathematical Induction Sultan Almuhammadi muhamadi
Mathematical Maxims and Minims, 1988
Induction and recursion
Chapter 6 Mathematical Induction
Discrete Mathematics, 1st Edition Kevin Ferland
Mathematical Induction. F(1) = 1; F(n+1) = F(n) + (2n+1) for n≥ F(n) n F(n) =n 2 for all n ≥ 1 Prove it!
College Algebra Fifth Edition James Stewart Lothar Redlin Saleem Watson.
1 Introduction to Abstract Mathematics Chapter 4: Sequences and Mathematical Induction Instructor: Hayk Melikya 4.1- Sequences. 4.2,
Discrete Mathematics Tutorial 11 Chin
Formal Semantics of Programming Languages 虞慧群 Topic 3: Principles of Induction.
Induction Proof. Well-ordering A set S is well ordered if every subset has a least element. [0, 1] is not well ordered since (0,1] has no least element.
Section 3.3: Mathematical Induction Mathematical induction is a proof technique that can be used to prove theorems of the form:  n  Z +,P(n) We have.
CompSci 102 Discrete Math for Computer Science March 1, 2012 Prof. Rodger Slides modified from Rosen.
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
1 Section 4.3 Order Relations A binary relation is an partial order if it transitive and antisymmetric. If R is a partial order over the set S, we also.
1 INFO 2950 Prof. Carla Gomes Module Induction Rosen, Chapter 4.
Mathematical Induction Section 5.1. Climbing an Infinite Ladder Suppose we have an infinite ladder: 1.We can reach the first rung of the ladder. 2.If.
Mathematical Induction
Copyright © Cengage Learning. All rights reserved. Sequences and Series.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
Chapter 5. Section 5.1 Climbing an Infinite Ladder Suppose we have an infinite ladder: 1.We can reach the first rung of the ladder. 2.If we can reach.
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Induction Practice CS1050. Prove that whenever n is a positive integer. Proof: Basis Case: Let n = 1, then.
Section 1.7. Definitions A theorem is a statement that can be shown to be true using: definitions other theorems axioms (statements which are given as.
1 Discrete Mathematical Mathematical Induction ( الاستقراء الرياضي )
Mathematical Induction What it is? Why is it a legitimate proof method? How to use it?
Mathematical Induction I Lecture 19 Section 4.2 Mon, Feb 14, 2005.
3.3 Mathematical Induction 1 Follow me for a walk through...
Chapter 5 1. Chapter Summary  Mathematical Induction  Strong Induction  Recursive Definitions  Structural Induction  Recursive Algorithms.
Mathematical Induction. The Principle of Mathematical Induction Let S n be a statement involving the positive integer n. If 1.S 1 is true, and 2.the truth.
CS151: Mathematical Foundations of Computing Mathematical Induction.
11.7 – Proof by Mathematical Induction
CSE15 Discrete Mathematics 03/22/17
Advanced Algorithms Analysis and Design
Chapter 3 The Real Numbers.
Induction and recursion
Mathematical Induction Recursion
Chapter 5 Induction and Recursion
Proofs, Recursion and Analysis of Algorithms
CS201: Data Structures and Discrete Mathematics I
BaSIC Math Reviews.
Induction and recursion
Mathematical Induction I
Mathematical Induction
Follow me for a walk through...
Induction Chapter
Advanced Analysis of Algorithms
Chapter 11: Further Topics in Algebra
Copyright © Cengage Learning. All rights reserved.
Mathematical Induction
Mathematical Induction
Follow me for a walk through...
Copyright © Cengage Learning. All rights reserved.
Agenda Proofs (Konsep Pembuktian) Direct Proofs & Counterexamples
Presentation transcript:

1 Section 4.4 Inductive Proof What do we believe about nonempty subsets of N? Since  N, <  is well-founded, and in fact it is linear, it follows that every nonempty subset has a least element. This little observation is the only thing we need to present the ideas of inductive proof. Basis for the Principle of Mathematical Induction (PMI) Let S  N, 0  S, and suppose also that k  S implies k + 1  S. Then S = N. Proof. Assume, BWOC, that S ≠ N. Then N – S has a least element x. Since 0  S and x  S, it follows that x > 0. Since x is the least element of N – S, it follows that x – 1  S. So the hypothesis tells us that (x – 1) + 1  S. So we have x  S and x  S, a contradiction. Therefore S = N. QED. Principle of Mathematical Induction (PMI) Let P(n) denote a statement for each n  N. To prove P(n) is true for each n  N do the following steps. 1.Show P(0) is true. 2.Show that if P(k) is true then P(k + 1) is true. Proof. Assume that the two steps have been shown. Let S = {n | P(n) is true}. Since P(0) is true, it follows that 0  S. Since P(k) true implies P(k + 1) true, it follows that k  S implies k + 1  S. So by the Basis for PMI we have S = N. QED. Remark. PMI also works for statements P(n) where n  {m, m + 1, …}. In this case, the least element is m, so step 1 is modified to show that P(m) is true.

2 Example. Prove that … + n = n(n + 1)/2 for all n  N. Proof. Let P(n) be the given equation. For n = 0 the equation is 0 = 0(0 + 1)/2. So P(0) is true. Now assume P(k) is true and prove P(k + 1) is true. The left side of P(k + 1) is: … + k + (k + 1) = ( … + k) + (k + 1) = k(k + 1)/2 + (k + 1)(induction assumption) = (k + 1)((k + 1) + 1)/2(algebra) which is the right side of P(k + 1). So P(k + 1) is true and it follows from PMI that P(n) is true for all n  N. QED. Example. Prove that … + n 3 = ( … + n) 2 for all n  N. Proof. Let P(n) be the given equation. For n = 0 the equation is 0 3 = 0 2. So P(0) is true. Now assume P(k) is true and prove P(k + 1) is true. The left side of P(k + 1) is: … + k 3 + (k + 1) 3 = ( … + k 3 ) + (k + 1) 3 = ( … + k) 2 + (k + 1) 3 (induction assumption) = (k(k + 1)/2 ) 2 + (k + 1) 3 (previous example) = (k 2 + 4k + 4)(k + 1) 2 /4(algebra) = ((k + 1)(k + 2)/2) 2 (algebra) = ( … + (k + 1)) 2 (previous example) which is the right side of P(k + 1). So P(k + 1) is true and it follows from PMI that P(n) is true for all n  N. QED.

3 Example. Let ƒ : N  N be defined by ƒ(n) = if n = 0 then 0 else ƒ(n – 1) + n 2. Claim: ƒ(n) = n(n + 1)(2n + 1)/6 for all n  N. Proof. Let P(n) be the given equation. Since ƒ(0) = 0 = 0(0 + 1)(2·0 + 1)/6, P(0) is true. Now assume P(k) is true and prove P(k + 1) is true. The left side of P(k + 1) is: ƒ(k + 1) = ƒ(k + 1 –1) + (k + 1) 2 (definition of ƒ) = ƒ(k) + (k + 1) 2 (algebra) = k(k + 1)(2k + 1)/6 + (k + 1) 2 (induction assumption) = (k + 1)(2k 2 + 7k + 6)/6(algebra) = (k + 1)(k + 2)(2k + 3)/6(algebra) = (k + 1)((k + 1) + 1)(2(k + 1) + 1)/6(algebra) which is the right side of P(k + 1). So P(k + 1) is true and it follows from PMI that P(n) is true for all n  N. QED.

4 Extending Inductive Proof to Well-Founded Sets A more general form of inductive proof is based on the following statements about well- founded sets. Basis for Well-Founded Induction Let W be a well-founded set. Let S be a subset of W that contains the minimal elements of W and whenever an element x  W has the property that all its predecessors are in S, then x  S. Then S = W. Proof. Assume, BWOC, that S ≠ W. Then W – S has a minimal element x. So any predecessor of x must be in S. But the assumption then tells us that x  S. So we have x  S and x  S, a contradiction. Therefore S = W. QED. Well-Founded Induction Let W be a well-founded set. Let P(x) denote a statement for each x  W. To prove P(x) is true for each x  W do the following steps. 1.Show P(m) is true for each minimal element m of W. 2.Show that if x  W and P(y) is true for all predecessors y of x, then P(x) is true. Proof. Assume that the two steps have been shown. Let S = {x  W | P(x) is true}. Since P(m) is true for the mimimal elements of W, it follows that S contains the minimal elements of W. The second step tells us that if x  W and P(y) is true for each y < x, then P(x) true. In other words, x  W and each predecessor of x is in S, then x  S. So by the Basis for Well-founded induction we have S = W. QED.

5 Example (Well-Founded Induction). Let ƒ : N  N be defined by ƒ(0) = ƒ(1) = 0 ƒ(n) = ƒ(n – 2) + 1 (for n > 1). Prove that ƒ(n) =  n/2  for all n  N. Proof. In this case, we can use a well-founded ordering of N that has 0 and 1 as the two minimal elements and with the usual ordering for every other number in N. The poset diagram at right indicates this ordering Let P(n) be the statement “ƒ(n) =  n/2  ”. The definition of ƒ tells us that ƒ(0) = ƒ(1) = 0 and the definition of floor tells us that  0/2  =  1/2  = 0. So ƒ(0) =  0/2  and ƒ(1) =  1/2 , which tells us that P(0) and P(1) are true. This takes care of the minimal elements. Now assume that k > 1 and P(i) is true (i.e., ƒ(i) =  i/2  ) for each predecessor i < k. We must show that P(k) is true (i.e., ƒ(k) =  k/2  ). We have the following equations: ƒ(k)=ƒ(k – 2) + 1(definition of ƒ) =  (k – 2)/2  + 1(induction assumption since k – 2 < k) =  (k/2) – 1  + 1(algebra) =  (k/2)  – 1 + 1(property of floor) =  (k/2)  So P(k) is true and it follows by well-founded induction that P(n) is true for all n  N. QED.

6 A popular corollary to well-founded induction is the second principle of mathematical induction. Second PMI Let P(n) denote a statement for each n  N. To prove P(n) is true for each n  N do the following steps. 1.Show P(0) is true. 2.Show that if k > 0 and P(i) is true for i < k then P(k) is true. Remark. Second PMI also works for statements P(n) where n  {m, m + 1, …}. In this case, the least element is m, so step 1 is modified to show that P(m) is true and step 2 is modified to assume k > m. Proof. N is well-founded with minimal element 0. So the result follows from the well- founded induction theorem. QED. Example. Prove that every natural number greater than 1 is prime or a sum of primes. Proof. Let P(n) mean that n is a prime or a sum of primes. We need to show P(n) is true for every n ≥ 2. Since 2 is prime, P(2) is true. Assume k > 2 and P(i) is true for i < k. Show P(k) is true. If k is prime, then P(k) is true. Otherwise, k = ij where 2 ≤ i < k and 2 ≤ j < k. So by assumption P(i) and P(j) are true. i.e., i and j are primes or sums of primes. But we can write k = ij = j + j + … + j (i times), so k is a sum of primes. Thus P(k) is true and it follows from Second PMI that P(n) is true for all n ≥ 2. QED.

7 Example. Let L = {a m c n b m | m, n  N}. Prove that L is the language of the grammar S  aSb | T T  cT | . Proof. Let M be the language of the grammar. We must show that L = M. First show L  M. Let P(m, n) be “Some derivation produces a m c n b m.” Let (x 1, x 2 ) < (y 1, y 2 ) iff x 1 + x 2 < y 1 + y 2. This order is well-founded with minimal element (0, 0). P(0, 0) is true because S  T  . Assume (m, n) > (0, 0) and P(i, j) is true for all (i, j) < (m, n). Show P(m, n) is true. We have either m > 0 or n > 0. If m > 0, then (m – 1, n) < (m, n). So by assumption P(m – 1, n) is true. So there is a derivation S  + a m–1 c n b m–1. To derive a m c n b m start with S  aSb and follow it with the steps in S  + a m–1 c n b m–1. So P(m, n) is true. If n > 0, then (m, n – 1) < (m, n). So by assumption P(m, n – 1) is true. So there is a derivation S  + a m c n–1 b m. Notice that a terminal string can be derived only by using the production T   in the last step. If we replace the last step of S  + a m c n–1 b m by two steps that use T  cT followed by T  , then we obtain a derivation of a m c n b m. So P(m, n) is true. Therefore, P(m, n) is true for all m, n  N (by well- founded induction). In other words, L  M. Show M  L. Let P(n) be “Any derivation of length n derives a string in L.” The shortest derivation has length 2 and it is S  T    L. So P(2) is true. Assume k > 2 and P(k) is true. Prove that P(k + 1) is true. Any derivation of length k + 1 must start with either S  aSb or S  T. In the first case, S  aSb  + ayb where S  + y has length k. Since P(k) is true, it follows that y  L. Therefore, ayb  L. In the second case, S  T  cT  + cy where T  + y has length k – 1. So the derivation S  T  + y has length k. Since P(k) is true, it follows that y  L. This derivation does not use S  aSb, so y must be a string of c’s. Therefore, cy  L. So P(k + 1) is true. Therefore, P(n) is true for all n ≥ 2 (by PMI). So M  L. Since L  M and M  L, we have the desired result, L = M. QED.