cs70 discrete math and probability
play

CS70: Discrete Math and Probability And we get... Are we done? It - PowerPoint PPT Presentation

Induction Gauss and Induction Child Gauss: ( n N )( n i = 1 i = n ( n + 1 ) ) Proof? 2 Idea: assume predicate P ( n ) for n = k . P ( k ) is k i = 1 i = k ( k + 1 ) . 2 Is predicate, P ( n ) true for n = k + 1? i = 1 i )+( k + 1


  1. Induction Gauss and Induction Child Gauss: ( ∀ n ∈ N )( ∑ n i = 1 i = n ( n + 1 ) ) Proof? 2 Idea: assume predicate P ( n ) for n = k . P ( k ) is ∑ k i = 1 i = k ( k + 1 ) . 2 Is predicate, P ( n ) true for n = k + 1? i = 1 i )+( k + 1 ) = k ( k + 1 ) + k + 1 = ( k + 1 )( k + 2 ) ∑ k + 1 i = 1 i = ( ∑ k . Principle of Induction. 2 2 How about k + 2. Same argument starting at k + 1 works! P ( 0 ) ∧ ( ∀ n ∈ N ) P ( n ) = ⇒ P ( n + 1 ) Induction Step. P ( k ) = ⇒ P ( k + 1 ) . CS70: Discrete Math and Probability And we get... Are we done? It shows that we can always move to the next step. June 22, 2016 i = 0 i = 1 = ( 0 )( 0 + 1 ) ( ∀ n ∈ N ) P ( n ) . Need to start somewhere. P ( 0 ) is ∑ 0 Base Case. 2 ...Yes for 0, and we can conclude Yes for 1... Statement is true for n = 0 P ( 0 ) is true plus inductive step = ⇒ true for n = 1 ( P ( 0 ) ∧ ( P ( 0 ) = and we can conclude Yes for 2....... ⇒ P ( 1 ))) = ⇒ P ( 1 ) plus inductive step = ⇒ true for n = 2 ( P ( 1 ) ∧ ( P ( 1 ) = ⇒ P ( 2 ))) = ⇒ P ( 2 ) ... true for n = k = ⇒ true for n = k + 1 ( P ( k ) ∧ ( P ( k ) = ⇒ P ( k + 1 ))) = ⇒ P ( k + 1 ) ... Predicate, P ( n ) , True for all natural numbers! Is this a proof? Not really. Just an idea, not formal enough to be a proof yet 1 2 Induction Notes visualization Climb an infinite ladder? The canonical way of proving statements of the form ( ∀ k ∈ N )( P ( k )) Note’s visualization: an infinite sequence of dominos. • For all natural numbers n , 1 + 2 ··· n = n ( n + 1 ) . 2 • For all n ∈ N , n 3 − n is divisible by 3. P ( n + 3 ) • The sum of the first n odd integers is a perfect square. P ( n + 2 ) P ( 0 ) P ( n + 1 ) The basic form ∀ k , P ( k ) = ⇒ P ( k + 1 ) P ( 0 ) = ⇒ P ( 1 ) = ⇒ P ( 2 ) = ⇒ P ( 3 ) ... P ( n ) • Prove P ( 0 ) . “Base Case”. ( ∀ n ∈ N ) P ( n ) Prove they all fall down; • P ( k ) = ⇒ P ( k + 1 ) • P ( 0 ) = “First domino falls” • Assume P ( k ) , “Induction Hypothesis” P(3) • Prove P ( k + 1 ) . “Induction Step.” • ( ∀ k ) P ( k ) = ⇒ P ( k + 1 ) : “ k th domino falls implies that k + 1st domino falls” P(2) P ( n ) true for all natural numbers n !!! P(1) Get to use P ( k ) to prove P ( k + 1 ) ! ! ! ! P(0) 3 4 5

  2. Again: Simple induction proof. Try it yourself! Homework, Exam For all natural numbers n , 0 2 + 1 2 + 2 2 ··· n 2 = 1 6 n ( n + 1 )( 2 n + 1 ) Define predicate p ( n ) as 0 2 + 1 2 + 2 2 ··· n 2 = 1 6 n ( n + 1 )( 2 n + 1 ) for n ∈ N Theorem: For all natural numbers n , 0 + 1 + 2 ··· n = n ( n + 1 ) 2 Base case: For n = 0, 0 2 = 1 6 ∗ 0 ∗ 1 ∗ 1 = 0, p ( 0 ) is true. Base Case: Does 0 = 0 ( 0 + 1 ) ? Yes. 2 Induction hypothesis: assume p ( k ) is true for some natural number k . Induction Hypothesis: P ( k ) is true: 1 + ··· + k = k ( k + 1 ) 2 Inductive steps: need to prove p ( k ) = ⇒ p ( k + 1 ) Induction Step: Show ∀ k ≥ 0 , P ( k ) = ⇒ P ( k + 1 ) We will use some problems from homework in our exams, 0 2 + 1 2 + 2 2 ··· + k 2 +( k + 1 ) 2 ( 0 2 + 1 2 + 2 2 ··· + k 2 )+( k + 1 ) 2 k ( k + 1 ) = 1 + ··· + k +( k + 1 ) = +( k + 1 ) 2 with some modifications like the question we just saw. 1 6 k ( k + 1 )( 2 k + 1 )+( k + 1 ) 2 = k 2 + k + 2 ( k + 1 ) = Take homework seriously, and study the solutions carefully after we release them. 2 ( k + 1 )( 1 = 6 k ( 2 k + 1 )+( k + 1 )) k 2 + 3 k + 2 = 2 1 6 ( k + 1 )( 2 k 2 + k + 6 k + 6 ) = ( k + 1 )( k + 2 ) = 2 1 = 6 ( k + 1 )( k + 2 )( 2 k + 3 ) 1 P ( k + 1 ) !. By principle of induction... = 6 ( k + 1 )( k + 2 )( 2 ( k + 1 )+ 1 ) p ( k + 1 ) is true.By principle of induction... 6 7 8 Another Induction Proof. Four Color Theorem. Two color theorem: example. Any map formed by dividing the plane M into regions by drawing straight lines can be colored with two colors so that those regions share an edge have different colors. Theorem: For every n ∈ N , n 3 − n is divisible by 3. (3 | ( n 3 − n ) ). Theorem: Any map can be 4-colored so that those regions that share an edge have different colors. B R Proof: By induction. Base Case: P ( 0 ) is “ ( 0 3 ) − 0” is divisible by 3. Yes! Induction Hypothesis: k 3 − k is divisible by 3. R B or k 3 − k = 3 q for some integer q . Induction Step: ( ∀ k ∈ N ) , P ( k ) = ⇒ P ( k + 1 ) B R B R R B ( k + 1 ) 3 − ( k + 1 ) = k 3 + 3 k 2 + 3 k + 1 − ( k + 1 ) = k 3 + 3 k 2 + 2 k = ( k 3 − k )+ 3 k 2 + 3 k Subtract/add k R B = 3 q + 3 ( k 2 + k ) Induction Hyp. Factor. = 3 ( q + k 2 + k ) (Un)Distributive + over × R B Or ( k + 1 ) 3 − ( k + 1 ) = 3 ( q + k 2 + k ) . ( q + k 2 + k ) is integer (closed under addition and multiplication). R B R B ⇒ ( k + 1 ) 3 − ( k + 1 ) is divisible by 3. = R B R B Thus, ( ∀ k ∈ N ) P ( k ) = ⇒ P ( k + 1 ) Not gonna prove it. . Thus, theorem holds by induction. Fact: Swapping red and blue gives another valid colors. 9 10 11

  3. Two color theorem: proof illustration. Strenthening Induction Hypothesis. Tiling Cory Hall Courtyard. s Use these L -tiles. C A r o l o B R B R c h c Theorem: The sum of the first n odd numbers is a perfect square. t i w Theorem: The sum of the first n odd numbers is n 2 . s To Tile this 4 × 4 courtyard. B R s w i t c k th odd number is 2 ( k − 1 )+ 1. B B R R B R R h R B B R R B B B E Base Case 1 (1th odd number) is 1 2 . switch R R R R Alright! C E Induction Hypothesis Sum of first k odds is perfect square a 2 = k 2 . B B Tiled 4 × 4 square with 2 × 2 L -tiles. B Induction Step 1. The ( k + 1)st odd number is 2 k + 1. R B R R R B with a center hole. 2. Sum of the first k + 1 odds is B B B B B B B R R R R R B a 2 + 2 k + 1 = k 2 + 2 k + 1 B Base Case. 3. k 2 + 2 k + 1 = ( k + 1 ) 2 1. Add line. D ... P(k+1)! 2. Get inherited color for split regions A 3. Switch on one side of new line. D (Fixes conflicts along line, and makes no new ones.) Algorithm gives P ( k ) = ⇒ P ( k + 1 ) . Can we tile any 2 n × 2 n with L -tiles (with a hole) for every n ! 12 13 14 Hole have to be there? Maybe just one? Hole in center? Hole can be anywhere! Theorem: Can tile the 2 n × 2 n to leave a hole adjacent anywhere. Theorem: Can tile the 2 n × 2 n square to leave a hole adjacent to the center. Theorem: Any tiling of 2 n × 2 n square has to have one hole. Proof: Better theorem ...better induction hypothesis! Proof: The remainder of 2 2 n divided by 3 is 1. Base case: A single tile works fine. Base case: Sure. A tile is fine. The hole is adjacent to the center of the 2 × 2 square. Base case: true for k = 0. 2 0 = 1 Induction Hypothesis: Flipping the orientation can leave hole anywhere. Any 2 n × 2 n square can be tiled with a hole at the center. Ind Hyp: 2 2 k = 3 a + 1 for integer a . Induction Hypothesis: “Any 2 n × 2 n square can be tiled with a hole anywhere. ” 2 n + 1 Consider 2 n + 1 × 2 n + 1 square. 2 2 k ∗ 2 2 2 2 ( k + 1 ) = 4 ∗ 2 2 k = = 4 ∗ ( 3 a + 1 ) = 12 a + 3 + 1 2 n + 1 What to do now??? Use induction hypothesis in each. = 3 ( 4 a + 1 )+ 1 2 n a integer = ⇒ ( 4 a + 1 ) is an integer. 2 n Use L-tile and ... we are done. 15 16 17

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend