HO29 - Maggie Johnson CS103A Handout #29 Introduction to...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Maggie Johnson Handout #29 CS103A Introduction to Induction Key topics: * Introduction and Definitions * Examples of Weak Induction * Proper Proof Form * Examples of Strong Induction * A Faulty Proof and Some Interesting Proofs * Some Useful Formulas One of the most important tasks in mathematics is to discover and characterize regular patterns or sequences. The main mathematical tool we use to prove statements about sequences is induction . Induction is a very important tool in computer science for several reasons, one of which is the fact that a characteristic of most programs is repetition of a sequence of statements. To illustrate how induction works, imagine that you are climbing an infinitely high ladder. How do you know whether you will be able to reach an arbitrarily high rung? Suppose you make the following two assertions about your climbing abilities: 1) I can definitely reach the first rung. 2) Once I get to any rung, I can always climb to the next one up. If both statements are true, then by statement 1 you can get to the first one, and by statement 2, you can get to the second. By statement 2 again, you can get to the third, and fourth, etc. Therefore, you can climb as high as you wish. Notice that both of these assertions are necessary for you to get anywhere on the ladder. If only statement 1 is true, you have no guarantee of getting beyond the first rung. If only statement 2 is true, you may never be able to get started. Assume that the rungs of the ladder are numbered with the positive integers (1,2,3. ..). Now think of a specific property that a number might have. Instead of "reaching an arbitrarily high rung", we can talk about an arbitrary positive integer having that property. We will use the shorthand P(n) to denote the positive integer n having property P. How can we use the ladder-climbing technique to prove that P(n) is true for all positive n? The two assertions we need to prove are: 1) P(1) is true 2) for any positive k, if P(k) is true, then P(k+1) is true Assertion 1 means we must show the property is true for 1; assertion 2 means that if any number has property P then so does the next number. If we can prove both of these statements, then P(n) holds for all positive integers, just as you could climb to an arbitrary rung of the ladder. The foundation for arguments of this type is the Principle of Mathematical Induction . The Principle of Mathematical Induction can be used as a proof technique on statements that have a
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
particular form. First of all, we must be working with positive integers or numbers of objects, and we must be talking about some kind of sequence or pattern. The Principle tells us that if we can prove the assertion is true for 1 (or some small starting value), and then prove that it is also true for k+1 (assuming it is true for k), we have proven the assertion for all positive integers, because if it is true for 1 and k+1, then it is true for k. When it is true for all three, it is true for all positive
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/15/2008 for the course CS 103A taught by Professor Plummer,r during the Fall '07 term at Stanford.

Page1 / 12

HO29 - Maggie Johnson CS103A Handout #29 Introduction to...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online