CS70: Lecture 3. Induction! The naturals. A formula. 1. The natural numbers. 2. 5 year old Gauss. 3. ..and Induction. n + 3 Teacher: Hello class. n + 2 Teacher: Please add the numbers from 1 to 100. 4. Simple Proof. 0, 1, 2, 3, n + 1 Gauss: It’s ( 100 )( 101 ) 5. Two coloring map or 5050! ... , n , n + 1, n + 2, n + 3, ... 2 n 6. Strengthening induction. 7. Horses with one color... 8. Try this at home. 3 2 1 0 Gauss and Induction Induction Notes visualization i = 1 i = n ( n + 1 ) Child Gauss: ( ∀ n ∈ N )( ∑ n ) Proof? The canonical way of proving statements of the form 2 i = 1 i = k ( k + 1 ) Idea: assume predicate for n = k . ∑ k . 2 ( ∀ k ∈ N )( P ( k )) An visualization: an infinite sequence of dominos. Is predicate true for n = k + 1? ∑ k + 1 i = 1 i = ( ∑ k i = 1 i )+( k + 1 ) = k ( k + 1 ) + k + 1 = ( k + 1 )( k + 2 . ◮ For all natural numbers n , 1 + 2 ··· n = n ( n + 1 ) . 2 2 2 How about k + 2. Same argument starting at k + 1 works! ◮ For all n ∈ N , n 3 − n is divisible by 3. Induction Step. ◮ The sum of the first n odd integers is a perfect square. Is this a proof? It shows that we can always move to the next step. i = 1 i = 1 = ( 1 )( 2 ) Need to start somewhere. ∑ 1 The basic form Base Case. Prove they all fall down; 2 Statement is true for n = 0 ◮ Prove P ( 0 ) . “Base Case”. ◮ P ( 0 ) = “First domino falls” plus inductive step = ⇒ true for n = 1 ◮ P ( k ) = ⇒ P ( k + 1 ) ◮ ( ∀ k ) P ( k ) = ⇒ P ( k + 1 ) : plus inductive step = ⇒ true for n = 2 “ k th domino falls implies that k + 1st domino falls” ◮ Assume P ( k ) , “Induction Hypothesis” ... true for n = k = ⇒ true for n = k + 1 ◮ Prove P ( k + 1 ) . “Induction Step.” ... P ( n ) true for all natural numbers n !!! Predicate True for all natural numbers! Get to use P ( k ) to prove P ( k + 1 ) ! ! ! ! Proof by Induction.
Climb an infinite ladder? Simple induction proof. Four Color Theorem. Theorem: Any map can be colored so that those regions that Theorem: For all natural numbers n , 1 + 2 ··· n = n ( n + 1 ) share an edge have different colors. 2 Base Case: Does 0 = 0 ( 0 + 1 ) ? Yes. 2 Induction Hypothesis: 1 + ··· + n = n ( n + 1 ) 2 P ( · ) n ( n + 1 ) P ( · ) 1 + ··· + n +( n + 1 ) = +( n + 1 ) P ( 0 ) 2 P ( n + 1 ) n 2 + n + 2 ( n + 1 ) P ( k ) = ⇒ P ( k + 1 ) P ( n ) = ( ∀ n ∈ N ) P ( n ) 2 n 2 + 3 n + 2 = 2 P(3) ( n + 1 )( n + 2 ) = P(2) 2 P(1) Induction Hypothesis. P(0) P ( n + 1 ) ! ( ∀ n ∈ N ) ( P ( n ) = ⇒ P ( n + 1 )) . Your favorite example of forever..or the integers... Two color theorem: example. Two color theorem: proof illustration. Tiling Cory Hall Courtyard. Any map formed by dividing the plane into regions by drawing switch colors straight lines can be properly colored with two colors. R R B B C B R R B switch B R B B R R R R B R R B B B B R B switch E R R R R B B R B R B R B C E B R R R R B B B B B B B B B B R R R R R B B R . R B B Base Case. D 1. Add line. R B B R A 2. Get inherited color for split regions R B R B D . 3. Switch on one side of new line. (Fixes conflicts along line, and makes no new ones.) Fact: Swapping red and blue gives another valid colors. Algorithm gives P ( k ) = ⇒ P ( k + 1 ) .
Summary: principle of induction. ( P ( 0 ) ∧ (( ∀ k ∈ N )( P ( k ) = ⇒ P ( k + 1 )))) = ⇒ ( ∀ n ∈ N )( P ( n )) Variations: ( P ( 0 ) ∧ (( ∀ n ∈ N )( P ( n ) = ⇒ P ( n + 1 )))) = ⇒ ( ∀ n ∈ N )( P ( n )) ( P ( 1 ) ∧ (( ∀ n ∈ N )(( n ≥ 1 ) ∧ P ( n )) = ⇒ P ( n + 1 )))) = ⇒ ( ∀ n ∈ N )(( n ≥ 1 ) = ⇒ P ( n )) Statement to prove: P ( n ) for n starting from n 0 Base Case: Prove P ( n 0 ) . Ind. Step: Prove. For all values, n ≥ n 0 , P ( n ) = ⇒ P ( n + 1 ) . Statement is proven!
Recommend
More recommend