29
Mathematical Mathematical induction induction Isaac Fung Isaac Fung

Mathematical induction

Embed Size (px)

DESCRIPTION

Mathematical induction. Isaac Fung. Announcement. Homework 1 released Due on 6 Oct 2008 (in class). Overview. Induction equation divisibility inequality Strong induction Well ordering principle. Principle of induction. - PowerPoint PPT Presentation

Citation preview

Mathematical Mathematical inductioninduction

Isaac FungIsaac Fung

AnnouncementAnnouncement

► Homework 1 releasedHomework 1 released

► Due on 6 Oct 2008 (in class) Due on 6 Oct 2008 (in class)

OverviewOverview

► InductionInduction equationequation divisibilitydivisibility inequalityinequality

► Strong inductionStrong induction►Well ordering Well ordering

principleprinciple

Principle of inductionPrinciple of induction

► Last time, we saw how to prove some predicate P(n) is true Last time, we saw how to prove some predicate P(n) is true for all integers n by showing that P(n) is true for arbitrary nfor all integers n by showing that P(n) is true for arbitrary ne.g. e.g. If n is any integer that is not a perfect square, then is If n is any integer that is not a perfect square, then is irrationalirrational

► But this does not always work But this does not always work e.g. e.g.

► We may not know how to build a tower with n floors directly, We may not know how to build a tower with n floors directly, yet knowing how to build the ground floor and how to build yet knowing how to build the ground floor and how to build one new floor on top of it, we can build a tower with any one new floor on top of it, we can build a tower with any number of floors as we likenumber of floors as we like

► Advantage of induction: Advantage of induction: usually easy to build the ground floorusually easy to build the ground floor easy to build a new floor on top of anothereasy to build a new floor on top of another

n

Principle of inductionPrinciple of induction

► Suppose the followings are true, for what values of Suppose the followings are true, for what values of n is P(n) true?n is P(n) true?

P(1) and P(n)=>P(n+1)P(1) and P(n)=>P(n+1) P(3) and P(n)=>P(n+1)P(3) and P(n)=>P(n+1) P(1) and P(n)=>P(n+2)P(1) and P(n)=>P(n+2) P(1), P(2) and P(n)=>P(n+2)P(1), P(2) and P(n)=>P(n+2) P(1) and P(n)=>P(2n)P(1) and P(n)=>P(2n) P(1) and P(n)^P(n+1)=>P(n+2)P(1) and P(n)^P(n+1)=>P(n+2) P(1), P(2) and P(1), P(2) and

P(n)^P(n+1)=>P(n+2)P(n)^P(n+1)=>P(n+2) P(1) and P(1)^P(1) and P(1)^……^P(n)=>P(n+1)^P(n)=>P(n+1)

1, 2, 3, 4, 5, 1, 2, 3, 4, 5, …… 3, 4, 5, 6, 7, 3, 4, 5, 6, 7, …… 1, 3, 5, 7, 9 1, 3, 5, 7, 9 …… 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, …… 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, …… 11 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, …… 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, ……

Induction (Proving equation)Induction (Proving equation)

► For any integer n>=0,For any integer n>=0,

► Proof:Proof:

► We prove by induction on n .We prove by induction on n .

► Let P(n) be the proposition that Let P(n) be the proposition that

222 21

1

nn

i

i ni

222 21

1

nn

i

i ni

► Base case, n=0:Base case, n=0:

So P(n) is true for n=0.So P(n) is true for n=0.

► Inductive step: Suppose that P(n) is true for some Inductive step: Suppose that P(n) is true for some n>=0,n>=0,

that is .that is .

220212 20110

1

i

ii

222 21

1

nn

i

i ni Can we change some n to all n?

► Then, for n>=0,Then, for n>=0,

► By induction, P(n) is true for all integers By induction, P(n) is true for all integers n>=0. n>=0.

By the inductive hypothesis

21

1

1)1(

1

222

2

n

n

i

i

n

i

i

ni

i

22 2222 nn nn

221

222221

2

n

n

n

n

Induction (Proving equation)Induction (Proving equation)

► For any integer n>=2,For any integer n>=2,

► Proof:Proof:► We prove by induction on n .We prove by induction on n .

► Let P(n) be the proposition thatLet P(n) be the proposition that

n

n

n 2

111

3

11

2

11

222

n

n

n 2

111

3

11

2

11

222

► Base case, n=2:Base case, n=2:

So P(2) is true.So P(2) is true.

► Inductive step:Inductive step:

Suppose that P(n) is true for some n>=2. So,Suppose that P(n) is true for some n>=2. So,

22

12

4

3

2

11

2

n

n

n 2

111

3

11

2

11

222

► Then, for n>=2,Then, for n>=2,

► By induction, P(n) is true for all integers By induction, P(n) is true for all integers n>=2. n>=2.

2222 1

11

11

3

11

2

11

nn

21

11

2

1

nn

n

2

2

1

2

2

1

n

nn

n

n

1

2

2

1

n

n

By the inductive hypothesis

Induction (Divisibility)Induction (Divisibility)

► For any integer n>=1, is divisible by 6For any integer n>=1, is divisible by 6

► Proof:Proof:

► We prove by induction on n .We prove by induction on n .

► Base case, n=1:Base case, n=1:

is divisible by 6.is divisible by 6.

So it is true for n=1.So it is true for n=1.

52 nn

6511 2

► Inductive step: Suppose that for some n>=1,Inductive step: Suppose that for some n>=1,

is divisible by 6is divisible by 6

► Then,Then,

► Either n+1 or n+2 is even, so the last term is divisible by 6.Either n+1 or n+2 is even, so the last term is divisible by 6.

Therefore is divisible by 6.Therefore is divisible by 6.

► By induction, is divisible by 6 for all integers n>=1 By induction, is divisible by 6 for all integers n>=1

52 nn

511 2 nn

621 2 nnn 6262 223 nnnnn

683 23 nnn )633(5 23 nnnn

knnk integer somefor )633(6 2

2136 nnk

By the inductive assumption

511 2 nn

52 nn

Induction (Proving inequality)Induction (Proving inequality)

► For any integer n>=4,For any integer n>=4,

► Proof:Proof:► We prove by induction on n .We prove by induction on n .

► Base case, n=4:Base case, n=4:

So the claim is true for n=4.So the claim is true for n=4.

2! nn

2416244321!4

► Inductive step:Inductive step:

Assume that for some n>=4Assume that for some n>=4

► Then,Then,

► By induction, for all integer n>=4. By induction, for all integer n>=4.

2! nn

21!1! 1 nnnnn

nn 21

21 n

By the inductive hypothesis

By assumption, n>=2By assumption, n>=1

2 ! nn

Induction (Alternative proof of Induction (Alternative proof of infinitude of primes)infinitude of primes)

► For any integer n>=1, is divisible by at least For any integer n>=1, is divisible by at least n distinct primes n distinct primes

► Proof:Proof:► We prove by induction on n .We prove by induction on n .

► Base case, n=1:Base case, n=1:

is divisible by 3.is divisible by 3.

So the claim is true for n=1.So the claim is true for n=1.

122 n

3141212

► Inductive step: Assume that for some n>=1, Inductive step: Assume that for some n>=1, is divisible by n distinct prime numbers.is divisible by n distinct prime numbers.

► Then, Then,

► Let andLet and

► By the inductive assumption, q has n distinct prime factors.By the inductive assumption, q has n distinct prime factors.

► Also, note that the p, q differ by 2, so they can have no common Also, note that the p, q differ by 2, so they can have no common factors except 2. But both of them are odd, so they are factors except 2. But both of them are odd, so they are relatively prime.relatively prime.

► Since p has at least 1 prime factor and it is not a factor of q, p*q Since p has at least 1 prime factor and it is not a factor of q, p*q has at least n distinct prime factors.has at least n distinct prime factors.

► By induction, is divisible by n distinct primes for all By induction, is divisible by n distinct primes for all n>=1n>=1

122 n

12122

22 1

nn

1212 22 nn

122 n

p 122 n

q

122 n

x2-1=(x+1)(x-1)

Strong inductionStrong induction

► If sequence {aIf sequence {ann} is defined as follows} is defined as follows

then athen ann <= (7/4) <= (7/4)nn for all integers n>=1 for all integers n>=1

► Proof:Proof:► We proceed by strong induction.We proceed by strong induction.

► Let P(n) be the proposition that aLet P(n) be the proposition that ann <= (7/4) <= (7/4)nn

2121 ,3,1 kkk aaaaa

Can we use weak induction?

► Base case, n=1, 2:Base case, n=1, 2:

By definition, aBy definition, a1 1 = 1 <= (7/4)= 1 <= (7/4)11, a, a22 = 3 <=(7/4) = 3 <=(7/4)22

► Inductive step:Inductive step:

Assume that P(k) is true for 1 <= k <=n for some Assume that P(k) is true for 1 <= k <=n for some n>=2n>=2

► aan+1n+1 = a = ann + a + an-1n-1

<= (7/4)<= (7/4)nn + (7/4) + (7/4)n-1n-1

= (7/4)= (7/4)n-1n-1 (7/4+1) (7/4+1)

<= (7/4)<= (7/4)n-1n-1 (7/4) (7/4)22

= (7/4)= (7/4)n+1n+1

► By the principle of strong induction, P(n) is true for all By the principle of strong induction, P(n) is true for all n>=1n>=1

by the inductive assumption

Can we assume P(n)^P(n+1) and then derive P(n+2)?

Why we can’t just check the case n=1?

Strong inductionStrong induction

► If sequence {aIf sequence {ann} is defined as follows} is defined as follows

then for any integer n>=0then for any integer n>=0► Proof:Proof:► We proceed by strong induction.We proceed by strong induction.

► Let P(n) be the proposition that Let P(n) be the proposition that

1

01

1n

i in aa

nna 2

nna 2

for n = 0

for n > 0

► Base case, n=0: By definition, aBase case, n=0: By definition, a00 = 1 = 1

► Inductive step:Inductive step:

Suppose that P(k) is true for 0<=k<=n, for some Suppose that P(k) is true for 0<=k<=n, for some n>=0n>=0

► Consider aConsider an+1n+1

► By induction, P(n) is true for all integers n>=0By induction, P(n) is true for all integers n>=0

n

i in aa01 1

n

i

n

021

12

121

1

n

12 n

by the inductive hypothesis

GP sum

Strong inductionStrong induction

► Every integer n>=1 can be expressed as the sum Every integer n>=1 can be expressed as the sum of distinct Fibonacci numbersof distinct Fibonacci numbers

► Proof:Proof:► We proceed by strong inductionWe proceed by strong induction

► Let P(n) be the statement that Let P(n) be the statement that ““n can be written as n can be written as the sum of distinct Fibonacci numbersthe sum of distinct Fibonacci numbers””

► Base case, n=1: 1 is a Fibonacci number, so P(1) is Base case, n=1: 1 is a Fibonacci number, so P(1) is truetrue

► Inductive step:Inductive step:

Assume that P(k) holds for 1 <= k <= n for some n>=1Assume that P(k) holds for 1 <= k <= n for some n>=1

► Consider n+1.Consider n+1.

If n+1 is a Fibonacci number, then we are doneIf n+1 is a Fibonacci number, then we are done

If not, we have, for some m>=1If not, we have, for some m>=1

ffmm < n+1 < f < n+1 < fm+1m+1

► This givesThis gives

n+1 = fn+1 = fmm + (n+1-f + (n+1-fmm))

► Now n+1-fNow n+1-fmm < n+1, so by the inductive hypothesis, < n+1, so by the inductive hypothesis,

n + 1 - fn + 1 - fmm = f = fj1j1 + f + fj2j2 + f + fj3j3 + + …… for some distinct f for some distinct fj1j1, f, fj2j2, , ……

► (cont)(cont)► Now n+1-fNow n+1-fmm < n+1, so by the inductive hypothesis, < n+1, so by the inductive hypothesis,

n + 1 - fn + 1 - fmm = f = fj1j1 + f + fj2j2 + f + fj3j3 + + …… for some distinct f for some distinct fj1j1, f, fj2j2, , ……

► Moreover, none of these fMoreover, none of these fjiji is f is fmm as f as fm+1m+1 < 2f < 2fm .m .

If some fIf some fjiji=f=fmm, then 2f, then 2fmm<=n+1 and f<=n+1 and fmm cannot be the cannot be the largest Fibonacci number <=n+1largest Fibonacci number <=n+1

► Therefore, n + 1 = fTherefore, n + 1 = fmm + f + fj1j1 + f + fj2j2 + f + fj3j3 + + ……So P(n+1) is true.So P(n+1) is true.

► By the principle of strong induction, P(n) is true for By the principle of strong induction, P(n) is true for all integers n>=1all integers n>=1

Strong inductionStrong induction

► To divide a chocolate bar with m × n squares into unit squares, we need mn − 1 cuts

► Proof:► Let A = m × n

► We prove by strong induction on A.

► Base case, A=1: 0 cut is needed

Should we induct on m or n?

► Inductive step:Inductive step:► Assume that a chocolate bar of area B needs B-1 cuts Assume that a chocolate bar of area B needs B-1 cuts

for 1<=B<=A for some A>=1for 1<=B<=A for some A>=1

► Consider a chocolate bar of area A+1Consider a chocolate bar of area A+1► We can cut it once and divide it into two pieces of We can cut it once and divide it into two pieces of

area Aarea A11 and A and A22, where A, where A11+A+A22 = A+1 = A+1

► By the inductive hypothesis, we need ABy the inductive hypothesis, we need A11-1 and A-1 and A22-1 -1 cuts to divide them. So in total, we need Acuts to divide them. So in total, we need A11-1 + A-1 + A22-1 -1 + 1 = A cuts+ 1 = A cuts

► By the principle of strong induction, we By the principle of strong induction, we need mn − 1 cuts to divide a chocolate bar with m × n squares

Well ordering principleWell ordering principle

► The equation has no non-zero The equation has no non-zero integer solutioninteger solution

► Proof:Proof:► Assume to the contrary that there are non-zero Assume to the contrary that there are non-zero

integers u, v, w and z satisfying this equationintegers u, v, w and z satisfying this equation

► By the well ordering principle, there are non-zero By the well ordering principle, there are non-zero integers u, v, w and z satisfying this equation, such integers u, v, w and z satisfying this equation, such that they do not share any common prime factorsthat they do not share any common prime factors

4444 248 xwvu

► Since the left hand side is even, x is also even, Since the left hand side is even, x is also even,

i.e. x = 2k for some integer ki.e. x = 2k for some integer k

► This implies w is even, i.e. w = 2l for some integer lThis implies w is even, i.e. w = 2l for some integer l

► Repeat the same argument, we can deduce thatRepeat the same argument, we can deduce that

u and v are also evenu and v are also even

► This contradicts our assumption that u, v, x and w This contradicts our assumption that u, v, x and w do not have common prime factorsdo not have common prime factors

44444 162248 kkwvu 4444 824 kwvu

Additional referencesAdditional references

► http://hkn.eecs.berkeley.edu/~min/cs70/sect2/solution2a.pdf► http://hkn.eecs.berkeley.edu/~min/cs70/sect3/solution3.pdfhttp://hkn.eecs.berkeley.edu/~min/cs70/sect3/solution3.pdf► http://www.math.northwestern.edu/~mlerma/http://www.math.northwestern.edu/~mlerma/

problem_solving/putnam/training-induc.pdfproblem_solving/putnam/training-induc.pdf► http://ocw.mit.edu/NR/rdonlyres/Electrical-Engineering-and-http://ocw.mit.edu/NR/rdonlyres/Electrical-Engineering-and-

Computer-Science/6-042JSpring-2005/8C9DC16C-1328-4DA2-Computer-Science/6-042JSpring-2005/8C9DC16C-1328-4DA2-B58E-850E90431AE1/0/rec5.pdfB58E-850E90431AE1/0/rec5.pdf

► http://ocw.mit.edu/NR/rdonlyres/Electrical-Engineering-and-http://ocw.mit.edu/NR/rdonlyres/Electrical-Engineering-and-Computer-Science/6-042JSpring-2005/F592ADD6-24E6-4797-Computer-Science/6-042JSpring-2005/F592ADD6-24E6-4797-800C-A12A545EB2FB/0/rec4.pdf800C-A12A545EB2FB/0/rec4.pdf

► http://www.math.udel.edu/~lazebnik/papers/invariants.pdfhttp://www.math.udel.edu/~lazebnik/papers/invariants.pdf