Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,

Slides:



Advertisements
Similar presentations
Mathematical Induction
Advertisements

Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Mathematical Induction
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides.
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 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.
Discrete Structures Chapter 5: Sequences, Mathematical Induction, and Recursion 5.2 Mathematical Induction I [Mathematical induction is] the standard proof.
Proofs, Recursion, and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Chapter 10 Sequences, Induction, and Probability Copyright © 2014, 2010, 2007 Pearson Education, Inc Mathematical Induction.
Copyright © Cengage Learning. All rights reserved.
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.
Copyright © 2007 Pearson Education, Inc. Slide 8-1.
ICS 253 Presents Mathematical Induction Sultan Almuhammadi muhamadi
Mathematical Maxims and Minims, 1988
Induction and recursion
Chapter 6 Mathematical Induction
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!
CSNB143 – Discrete Structure Topic 5 – Induction Part I.
1 Introduction to Abstract Mathematics Chapter 4: Sequences and Mathematical Induction Instructor: Hayk Melikya 4.1- Sequences. 4.2,
INDUCTION AND RECURSION. PRINCIPLE OF MATHEMATICAL INDUCTION To prove that P(n) is true for all positive integers n, where P(n) is a propositional function,
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2.5 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
9.4 Mathematical Induction
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.
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
1 Mathematical Induction CS 202 Epp, chapter 4. 2.
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.
Slide Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Copyright © Cengage Learning. All rights reserved. Sequences and Series.
1 2/21/2016 MATH 224 – Discrete Mathematics Sequences and Sums A sequence of the form ar 0, ar 1, ar 2, ar 3, ar 4, …, ar n, is called a geometric sequence.
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.
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 a particular.
1 Discrete Mathematical Mathematical Induction ( الاستقراء الرياضي )
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.
Chapter 3 The Real Numbers.
Induction and recursion
CSNB 143 Discrete Mathematical Structures
Chapter 5 Induction and Recursion
Proofs, Recursion and Analysis of Algorithms
CS201: Data Structures and Discrete Mathematics I
Notes 9.5 – Mathematical Induction
Induction and recursion
Exercise Use mathematical induction to prove the following formula.
Follow me for a walk through...
CSE 373 Data Structures and Algorithms
Section 2.1 Proof Techniques Introduce proof techniques:   o        Exhaustive Proof: to prove all possible cases, Only if it is about a.
Mathematical Induction
Mathematical Induction
Follow me for a walk through...
Induction Chapter
Advanced Analysis of Algorithms
Copyright © Cengage Learning. All rights reserved.
Mathematical Induction
(c) Project Maths Development Team 2011
Mathematical Induction
Follow me for a walk through...
Copyright © Cengage Learning. All rights reserved.
Chapter 1 Automata CE year IV.
Presentation transcript:

Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs, Recursion and Analysis of Algorithms

Section 2.2Induction1 Principles of mathematical induction First Principle: P(1) is true (  k )P(k) true  P(k+1) true Second Principle: P(1) is true P(r) true for all r, 1  r  k  P(k+1) true Major difference is in the second statement. Use the second principle when assuming P(k) is not enough to prove P(k+1). Assuming P(r) for any r where 1  r  k gives more ammunition to prove the relation. Use second principle when the case k+1 depends on results further back than k. P(n) is true for all positive integers n

Section 2.2Induction2 Example: First Principle of Induction Prove that …+2 n = 2 n+1 -1 for any n  1. P(1) is the equation 1+2 = or 3 = , which is true. We take P(k) = …+2 k = 2 k+1 -1 as the inductive hypothesis and try to establish P(k+1): …+2 k+1 = 2 k Again, rewriting the sum on the left side of P(k+1) reveals how the inductive assumption can be used: …+2 k+1 = …+ 2 k + 2 k+1 = 2 k k+1 = 2(2 k+1 )-1 = 2 k Therefore, …+2 k+1 = 2 k and verifies P(k+1) and completes the proof. ?

Section 2.2Induction3 Example: First Principle of Induction Prove that for any positive integer n, the number 2 2n -1 is divisible by 3. The basis step is to show P(1), that 2 2(1) -1 = 4-1 = 3 is divisible by 3. Clearly this is true. We assume that 2 2k +1 is divisible by 3,which means that 2 2k +1 = 3m for some integer m, or 2 2k = 3m+1. We want to show that 2 2(k+1) -1 is divisible by (k+1) -1 = 2 2k+2 -1 = k -1 = 2 2 (3m+1) -1 (by the inductive hypothesis) = 12m+4 -1 = 12m+3 = 3(4m+1) where 4m+1 is an integer Thus 2 2(k+1) -1 is divisible by 3.

Section 2.2Induction4 Example: Second Principle of Induction Prove that the amount of postage greater than or equal to 8 cents can be built using only 3-cent and 5-cent stamps. Proof using the second principle of Induction Hence, we have to prove that P(n) is true for n  8 where P(n) is the sum of 3 and 5 cent stamps used to make the n cents worth of postage. Base case: P(8) = = 8 which is true. In this case we will have to establish additional cases to prove this. Hence, establish two cases P(9) and P(10) P(9) = = 9 and P(10) = Assume P(r) is true for any r, 8  r  k and consider P(k+1) We have proved P(r) is true for r = 8,9,10 So, lets assume k+1  11 If k+1  11 then (k+1)-3= k-2  8, hence, by inductive hypothesis, P(k-2) is true. Hence, k-2 can be written as a sum of 3s and 5s. Adding an additional 3 results in k+1 as a sum of 3s and 5s. This verifies P(k+1) is true and hence verifies the proof.