mathematical induction krzysztof r apt so not krzystof
play

Mathematical Induction Krzysztof R. Apt (so not Krzystof and - PDF document

Mathematical Induction Krzysztof R. Apt (so not Krzystof and definitely not Krystof ) CWI, Amsterdam UvA 1 A puzzle Can one be 1 / 3 Indian? 2 Mathematical Induction and Functions f (1) = 2 , f ( n + 1) = 2 f ( n ) . So f (2) = 2 f (1)


  1. Mathematical Induction Krzysztof R. Apt (so not Krzystof and definitely not Krystof ) CWI, Amsterdam UvA 1

  2. A puzzle Can one be 1 / 3 Indian? 2

  3. Mathematical Induction and Functions f (1) = 2 , f ( n + 1) = 2 · f ( n ) . So f (2) = 2 · f (1) = 4 , f (3) = 2 · f (2) = 8 , f (4) = 2 · f (3) = 16 , and so on. It looks that f ( n ) = 2 n . It is true for n = 1 , 2 , 3 , 4 . But how to prove it for all n ≥ 1 ? 3

  4. Principle of mathematical induction: • First we prove the property for n = 1 . So-called induction base. • Subsequently we assume that it is true for n and prove the property for n + 1 . So-called induction step. If we prove these two facts, then we proved f ( n ) = 2 n for all n ≥ 1 . 4

  5. Proof f (1) = 2 , f ( n + 1) = 2 · f ( n ) . f ( n ) = 2 n ? 1. It holds for n = 1 . 2. Suppose it holds for some n . Then f ( n + 1) = 2 · f ( n ) = 2 · 2 n = 2 n +1 . 3. Conclusion: f ( n ) = 2 n holds for all n ≥ 1 . 5

  6. Hugs Hugs> :load f.hs Main> f(10) 1024 where f.hs is simply the definition of f : f(1) = 2 f(n+1) = 2*f(n). 6

  7. Mathematical Induction and Relations Note: 1 = 1 1 + 3 = 4 1 + 3 + 5 = 9 1 + 3 + 5 + 7 = 16 1 + 3 + 5 + 7 + 9 = 25 7

  8. Theorem The sum of the first n odd numbers = n 2 . Proof Denote this sum by S ( n ) . Induction step. Note: S ( n + 1) = S ( n ) + 2 n + 1 . But S ( n ) = n 2 , so S ( n + 1) = n 2 + 2 n + 1 = ( n + 1) 2 . 8

  9. Wimbledon S. Williams S. Williams V. Zvonareva S. Williams P. Kvitova V. Zvonareva T. Pironkova 4 players, 3 matches. Theorem In a binary tree with n ≥ 1 levels: The number of leaves (players): 2 n − 1 . The number of internal nodes (matches): 2 n − 1 − 1 . Example n = 3 . 2 n − 1 = 4 , 2 n − 1 − 1 = 3 . Example n = 8 . 2 n − 1 = 128 , 2 n − 1 − 1 = 127 . 9

  10. Question Suppose there are 107 players. How many matches are needed to select a winner? 10

  11. Sometimes we start with n = 5 Prove n 2 < 2 n . n left right side side 1 1 2 2 4 4 3 9 8 4 16 16 5 25 32 Theorem n 2 < 2 n holds for n ≥ 5 . 11

  12. Homework 1 Prove that for n ≥ 1 the last digit of 6 n is 6 . 12

  13. Homework 2 Prove that for n ≥ 1 the last digit of 7 n is not 5 . 13

  14. Hanoi Towers 1 2 3 4 5 14

  15. 1 2 3 2 3 1 3 1 2 1 3 2 15

  16. 1 3 2 3 1 2 2 1 3 1 2 3 16

  17. Theorem For all n ≥ 1 there is a solution to the towers of Hanoi puzzle. Proof • We first prove the property for n = 1 . Induction base: n = 1 . Move a disk from A to B. • Induction step: from n to n + 1 . – move the upper n disks from A to C using B. – move the largest disk from A to B, – move the upper n disks from C to B using A. 17

  18. 1 2 3 4 5 1 2 3 5 4 1 2 3 5 4 1 2 3 4 5 18

  19. Prolog Program in Prolog: move(1,A,B,C) :- write(’move top disk from ’), write(A), write(’ to ’), write(B), nl. % newline move(M,A,B,C) :- M>1, N is M-1, move(N,A,C,B), move(1,A,B,C), move(N,C,B,A). 19

  20. Prolog move(3,A,B,C). move top disk from A to B move top disk from A to C move top disk from B to C move top disk from A to B move top disk from C to A move top disk from C to B move top disk from A to B 20

  21. Triomina Question: Is it possible to cover an arbitrary chessboard with one field removed? 21

  22. Yes Theorem (Golomb) For each n ≥ 1 it is possible to cover an ar- bitrary chessboard of size 2 n by 2 n with one field removed. 22

  23. Can one be 1 / 3 Indian? Theorem 1. For each n ≥ 1 and k ≤ 2 n one can be k/ 2 n Indian. 2. If one is f Indian, then for some n ≥ 1 and k ≤ 2 n we have f = k 2 n . 23

  24. Mixing Paint | | | | | | | | | | | | |_____| |_____| |_____| | | | | | | | B | | W | | R | |_____| |_____| |_____| 24

  25. Theorem For each paint in each bucket there is k/ 2 n litre of this paint, for some k ≤ 2 n . If k/ 2 n = 1 / 3 , then 3 k = 2 n , which can’t be true. 25

  26. Mixing Drinks Can one get gin and tonic with 1 / 3 gin? | | | | | | | | |_____| | T | | | | | | G | | | |_____| |_____| 26

  27. Recursion in Dutch history 27

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