l3_induction1

l3_induction1 - 6.042/18.062J Mathematics for Computer...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 6.042/18.062J Mathematics for Computer Science February 8, 2005 Srini Devadas and Eric Lehman Lecture Notes Induction I 1 Induction A professor brings to class a bottomless bag of assorted miniature candy bars. She offers to share in accordance with two rules. First, she numbers the students 0, 1, 2, 3, and so forth for convenient reference. Now here are the two rules: 1. Student gets candy. 2. For all n N , if student n gets candy, then student n + 1 also gets candy. You can think of the second rule as a compact way of writing a whole sequence of state- ments, one for each natural value of n : If student gets candy, then student 1 also gets candy. If student 1 gets candy, then student 2 also gets candy. If student 2 gets candy, then student 3 also gets candy, and so forth. Now suppose you are student 17. By these rules, are you entitled to a miniature candy bar? Well, student gets candy by the first rule. Therefore, by the second rule, student 1 also gets candy, which means student 2 gets candy as well, which means student 3 get candy, and so on. So the professors two rules actually guarantee candy for every student, no matter how large the class. You win! This reasoning generalizes to a principle called induction : Principle of Induction. Let P ( n ) be a predicate. If P (0) is true, and for all n N , P ( n ) implies P ( n + 1) , then P ( n ) is true for all n N . 2 Induction I Heres the correspondence between the induction principle and sharing candy bars. Suppose that P ( n ) is the predicate, student n gets candy. Then the professors first rule asserts that P (0) is true, and her second rule is that for all n N , P ( n ) implies P ( n + 1) . Given these facts, the induction principle says that P ( n ) is true for all n N . In other words, everyone gets candy. The intuitive justification for the general induction principle is the same as for every- one getting a candy bar under the professors two rules. Mathematicians find this intu- ition so compelling that induction is always either taken as an axiom or else proved from more primitive axioms, which are themselves specifically designed so that induction is provable. In any case, the induction principle is a core principle of mathematics. 2 Using Induction Induction is by far the most important proof technique in computer science. Generally, induction is used to prove that some statement holds for all natural values of a variable. For example, here is a classic formula: Theorem 1. For all n N : n ( n + 1) 1 + 2 + 3 + . . . + n = 2 The left side of the equation represents the sum of all the numbers from 1 to n . Youre supposed to guess the pattern and mentally replace the . . . with the other terms. We could eliminate the need for guessing by rewriting the left side with summation notation : n i or i or i i =1 1 i n i { 1 ,...,n } Each of these expressions denotes the sum of all values taken on by the expression to the...
View Full Document

This note was uploaded on 02/08/2011 for the course EECS 6.042 taught by Professor Dr.ericlehman during the Spring '11 term at MIT.

Page1 / 9

l3_induction1 - 6.042/18.062J Mathematics for Computer...

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