1 Inductive Proofs Rosen 6 th ed., §4.1-4.4. 2 Mathematical Induction A powerful, rigorous technique for proving that a predicate P(n) is true for every.

Slides:



Advertisements
Similar presentations
Mathematical Induction
Advertisements

Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Induction and Recursion. Odd Powers Are Odd Fact: If m is odd and n is odd, then nm is odd. Proposition: for an odd number m, m k is odd for all non-negative.
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
Recursive Definitions Rosen, 3.4. Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
1 Inductive Proofs Rosen 6 th ed., § Mathematical Induction A powerful, rigorous technique for proving that a predicate P(n) is true for every.
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
Module #1 - Logic 1 Based on Rosen, Discrete Mathematics & Its Applications. Prepared by (c) , Michael P. Frank. Modified By Mingwu Chen Induction.
1 Section 3.4 Recursive Definitions. 2 Recursion Recursion is the process of defining an object in terms of itself Technique can be used to define sequences,
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.
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.
Induction and Recursion by: Mohsin tahir (GL) Numan-ul-haq Waqas akram Rao arslan Ali asghar.
Induction and recursion
Mathematical Maxims and Minims, 1988
Lecture 9. Arithmetic and geometric series and mathematical induction
Induction and recursion
Induction and Recursion §4.1 Mathematical Induction §4.2 Strong Induction and Well-Ordering §4.3 Recursive Definitions and Structural Inductions §4.4 Recursive.
Advance Data Structure and Algorithm COSC600 Dr. Yanggon Kim Chapter 1.
Copyright © Peter Cappello Mathematical Induction Goals Explain & illustrate construction of proofs of a variety of theorems using mathematical induction.
March 3, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1Arguments Just like a rule of inference, an argument consists of one or more.
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Module #13: Inductive Proofs Rosen 5 th ed., § inference of a generalized conclusion from particular instances 2. mathematical demonstration of the.
Inductive Proofs. Mathematical Induction A powerful, rigorous technique for proving that a predicate P(n) is true for every natural number n, no matter.
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.
Chap 3 –A theorem is a statement that can be shown to be true –A proof is a sequence of statements to show that a theorem is true –Axioms: statements which.
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.
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Module #15 – Inductive Proofs 12/6/2015(c) , Michael P. Frank1 Inductive Proofs: a brief introduction Rosen 5 th ed., §3.3 ~35 slides, ~1.5 lecture.
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/18 Module.
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
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.
CSE373: Data Structures and Algorithms Lecture 2: Proof by Induction Linda Shapiro Winter 2015.
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,
2012 년 봄학기 강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics) 수학적 귀납법 (Mathematical Induction)
9/29/2011Lecture Strong Induction1 Lecture 3.2: Strong Induction CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures.
1 Discrete Mathematical Mathematical Induction ( الاستقراء الرياضي )
Mathematical Induction
6/12/2016 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(2) Mathematical Induction & Recursion Dr.Saad Alabbad Department of.
Section Recursion 2  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
Section Recursion  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
Mathematical Induction And Recursion Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
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.
(Proof By) Induction Recursion
Advanced Algorithms Analysis and Design
Induction and recursion
Mathematical Induction Recursion
Chapter 5 Induction and Recursion
Proofs, Recursion and Analysis of Algorithms
CSE373: Data Structures and Algorithms Lecture 2: Proof by Induction
Discrete Mathematics and its Applications
Induction and recursion
Follow me for a walk through...
CSE 373 Data Structures and Algorithms
Applied Discrete Mathematics Week 9: Integer Properties
Module #13: Inductive Proofs
Induction Chapter
Advanced Analysis of Algorithms
Mathematical Induction
Discrete Mathematics and its Applications
Copyright © Cengage Learning. All rights reserved.
Recursion.
Presentation transcript:

1 Inductive Proofs Rosen 6 th ed., §

2 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. Based on a predicate-logic inference rule:Based on a predicate-logic inference rule: P(0)  n  0 (P(n)  P(n+1))  n  0 P(n)P(0)  n  0 (P(n)  P(n+1))  n  0 P(n)

3 Outline of an Inductive Proof Want to prove  n P(n) …Want to prove  n P(n) … Base case (or basis step): Prove P(0).Base case (or basis step): Prove P(0). Inductive step: Prove  n P(n)  P(n+1).Inductive step: Prove  n P(n)  P(n+1). –e.g. use a direct proof: Let n  N, assume P(n). (inductive hypothesis)Let n  N, assume P(n). (inductive hypothesis) Under this assumption, prove P(n+1).Under this assumption, prove P(n+1). Inductive inference rule then gives  n P(n).Inductive inference rule then gives  n P(n).

4 Induction Example Prove thatProve that

5 Another Induction Example Prove that , n<2 n. Let P(n)=(n<2 n )Prove that , n<2 n. Let P(n)=(n<2 n ) –Base case: P(0)=(0<2 0 )=(0<1)=T. –Inductive step: For prove P(n)  P(n+1). Assuming n<2 n, prove n+1 < 2 n+1.Assuming n<2 n, prove n+1 < 2 n+1. Note n + 1 < 2 n + 1 (by inductive hypothesis) < 2 n + 2 n (because 1<2=2  2   2  2 n-1 = 2 n ) = 2 n+1Note n + 1 < 2 n + 1 (by inductive hypothesis) < 2 n + 2 n (because 1<2=2  2   2  2 n-1 = 2 n ) = 2 n+1 So n + 1 < 2 n+1, and we’re done.So n + 1 < 2 n+1, and we’re done.

6 Validity of Induction Prove: if  n  0 (P(n)  P(n+1)) and P(0), then  k  0 P(k) Prove: if  n  0 (P(n)  P(n+1)) and P(0), then  k  0 P(k) (a) Given any k  0,  n  0 (P(n)  P(n+1)) implies (P(0)  P(1))  (P(1)  P(2))  …  (P(k  1)  P(k)) (P(0)  P(1))  (P(1)  P(2))  …  (P(k  1)  P(k)) Using hypothetical syllogism k-1 times we have (b) Using hypothetical syllogism k-1 times we have P(0)  P(k) P(0)  P(k) (c) P(0) and modus ponens gives P(k). Thus  k  0 P(k). Thus  k  0 P(k).

7 Generalizing Induction Can also be used to prove  n  c P(n) for a given constant c  Z, where maybe c  0, then:Can also be used to prove  n  c P(n) for a given constant c  Z, where maybe c  0, then: –Base case: prove P(c) rather than P(0) –The inductive step is to prove:  n  c (P(n)  P(n+1)).  n  c (P(n)  P(n+1)).

8 Induction Example 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)

9 Example cont. Inductive step: Prove  n  1: P(n)  P(n+1).Inductive step: Prove  n  1: P(n)  P(n+1). –Let n  1, assume P(n), and prove P(n+1). By inductive hypothesis P(n)

10 Strong 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) Difference with previous version is that the inductive step uses the fact that P(k) is true for all smaller, not just for k=n.Difference with previous version is that the inductive step uses the fact that P(k) is true for all smaller, not just for k=n. P is true in all previous cases

11 Example 1 Show that every n>1 can be written as a product p 1 p 2 …p s of some series of s prime numbers. Let P(n)=“n has that property”Show that every n>1 can be written as a product 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. Assume  2  k  n: P(k). Consider n+1. If prime, let s=1, p 1 =n+1. Else n+1=ab, where 1  a  n and 1  b  n. Then a=p 1 p 2 …p t and b=q 1 q 2 …q u. Then 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. Assume  2  k  n: P(k). Consider n+1. If prime, let s=1, p 1 =n+1. Else n+1=ab, where 1  a  n and 1  b  n. Then a=p 1 p 2 …p t and b=q 1 q 2 …q u. Then n+1= p 1 p 2 …p t q 1 q 2 …q u, a product of s=t+u primes.

12 Example 2 Prove that every amount of postage of 12 cents or more can be formed using just 4- cent and 5-cent stamps.Prove that every amount of postage of 12 cents or more can be formed using just 4- cent and 5-cent stamps. Base case: 12=3  4), 13=2  4)+1(5), 14=1(4)+2(5), 15=3(5), so  12  n  15, P(n).Base case: 12=3  4), 13=2  4)+1(5), 14=1(4)+2(5), 15=3(5), so  12  n  15, P(n). Inductive step: Let n  15, assume  12  k  n P(k). Note 12  n  3  n, so P(n  3), so add a 4-cent stamp to get postage for n+1.Inductive step: Let n  15, assume  12  k  n P(k). Note 12  n  3  n, so P(n  3), so add a 4-cent stamp to get postage for n+1.

Recursive Definitions Recursion – defining an object (or function, algorithm, etc.) in terms of itselfRecursion – defining an object (or function, algorithm, etc.) in terms of itself Recursion can be used to define sequencesRecursion can be used to define sequences – Previously sequences were defined using a specific formula, e.g., a n = 2 n for n = 0,1,2,... – This sequence can also be defined by giving the first term of the sequence, namely a 0 = 1, and a rule for finding a term of the sequence for the previous one, namely, a n+1 = 2a n for n = 0,1,2,... 13

Recursive Definitions When defining a set recursively, weWhen defining a set recursively, we –(1) specify the initial elements in a basis step and –(2) provide a rule for constructing new elements from those we already have in the recursive step Examples… 14

Recursive Algorithms Sometimes we can reduce the solution to the problem with a particular set of input to the solution of the same problem with smaller input values Sometimes we can reduce the solution to the problem with a particular set of input to the solution of the same problem with smaller input values When such a reduction can be done, the solution to the original problem can be found with a sequence of reductions, until the problem has been reduced to the initial case for which the solution is knownWhen such a reduction can be done, the solution to the original problem can be found with a sequence of reductions, until the problem has been reduced to the initial case for which the solution is known 15

Recursive Algorithms An algorithm is called recursive if it solves a problem by reducing it to an instance of the same problem with smaller input An algorithm is called recursive if it solves a problem by reducing it to an instance of the same problem with smaller input Examples …..Examples ….. 16