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

mathematical induction krzysztof r apt so not krzystof
SMART_READER_LITE
LIVE PREVIEW

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)


slide-1
SLIDE 1

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

1

slide-2
SLIDE 2

A puzzle Can one be 1/3 Indian?

2

slide-3
SLIDE 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) = 2n. It is true for n = 1, 2, 3, 4. But how to prove it for all n ≥ 1?

3

slide-4
SLIDE 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) = 2n for all n ≥ 1.

4

slide-5
SLIDE 5

Proof f(1) = 2, f(n + 1) = 2 · f(n). f(n) = 2n?

  • 1. It holds for n = 1.
  • 2. Suppose it holds for some n.

Then f(n + 1) = 2 · f(n) = 2 · 2n = 2n+1.

  • 3. Conclusion:

f(n) = 2n holds for all n ≥ 1.

5

slide-6
SLIDE 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

slide-7
SLIDE 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

slide-8
SLIDE 8

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

8

slide-9
SLIDE 9

Wimbledon

  • S. Williams
  • S. Williams
  • S. Williams
  • P. Kvitova
  • V. Zvonareva
  • V. Zvonareva
  • T. Pironkova

4 players, 3 matches. Theorem In a binary tree with n ≥ 1 levels: The number of leaves (players): 2n−1. The number of internal nodes (matches): 2n−1 − 1. Example n = 3. 2n−1 = 4, 2n−1 − 1 = 3. Example n = 8. 2n−1 = 128, 2n−1 − 1 = 127.

9

slide-10
SLIDE 10

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

10

slide-11
SLIDE 11

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

11

slide-12
SLIDE 12

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

12

slide-13
SLIDE 13

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

13

slide-14
SLIDE 14

Hanoi Towers

5 4 3 2 1 14

slide-15
SLIDE 15

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

slide-16
SLIDE 16

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

slide-17
SLIDE 17

Theorem For all n ≥ 1 there is a solution to the towers

  • f 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

slide-18
SLIDE 18

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

slide-19
SLIDE 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

slide-20
SLIDE 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

slide-21
SLIDE 21

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

21

slide-22
SLIDE 22

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

22

slide-23
SLIDE 23

Can one be 1/3 Indian? Theorem

  • 1. For each n ≥ 1 and k ≤ 2n one can be

k/2n Indian.

  • 2. If one is f Indian, then for some n ≥ 1 and

k ≤ 2n we have f = k

2n.

23

slide-24
SLIDE 24

Mixing Paint | | | | | | | | | | | | |_____| |_____| |_____| | | | | | | | B | | W | | R | |_____| |_____| |_____|

24

slide-25
SLIDE 25

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

25

slide-26
SLIDE 26

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

26

slide-27
SLIDE 27

Recursion in Dutch history

27