Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
L2-1.1September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
Proofsby
Induction
L2-1.2September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
An Example of InductionSuppose we have a property (say color) ofthe natural numbers:
0, 1, 2, 3, 4, 5, …Showing that zero is red, and thatthe successor of any red number is red,
proves that all numbers are red!
L2-1.3September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Induction Rule
0 and (from n to n+1)proves 0, 1, 2, 3,….
R(0), ∀n∈N [R(n)→R(n+1)]∀m∈N R(m)_____
L2-1.4September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
Like Dominos…
L2-1.5September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
Example Induction Proof
Let’s prove:1
2 111
nn rr r r
r
+ −+ + + + =
−L
L2-1.6September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
Proof by InductionStatements in green form a template forinductive proofs:Proof: (by induction on n)
The induction hypothesis:1
2( ) :: 111
nn rr rP r
rn
+ −+ + + + ==
−L
L2-1.7September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
Example Induction ProofBase Case (n = 0):
1 11
rr−
= =−
0 12 0
? 1111
rr r rr
+ −+ + + + =
−L144424443
Wait: divide by zero bug! This is only true for r ≠ 1
L2-1.8September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
An Example Proof
Revised Induction Hypothesis:1
2( 1:: 11)1
nn rr r r
rrP n
+ −+ + + + =∀ ≠
−= L
12 11
1
nn rr r r
r
+ −+ + + + =
−L
Revised Theorem:
r ≠ 1∀
L2-1.9September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
An Example Proof
Induction Step: Assume P(n) forn ≥ 0 to prove P(n + 1):
( 1)1
12 11 1
1
nn rr r r r
r+
++ −∀ ≠ + + + + =
−L
L2-1.10September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
An Example ProofHave P(n) by assumption:
Adding r n+1 to both sides:
12 11
1
nn rr r r
r
+ −+ + + + =
−L
11 1
1 1
111
1 ( 1)1
nn n n
n n
rr r rr
r r rr
++ +
+ +
−+ + + = +
−− + −
=−
L
L2-1.11September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
An Example ProofContinued…
Which is just P(n+1)Therefore theorem is true by induction. QED.
1 1 11
( 1) 1
111
11
n n nn n
n
r r r rr rr
rr
+ + ++
+ +
− + ⋅ + −+ + + =
−−
=−
L
L2-1.12September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
An Aside: EllipsesEllipses (…) mean that the reader issupposed to infer a pattern.• Can lead to confusion • Summation notation gives more precision,
for example:
0
21 nn
i
ir r r r
=
+ + + + =∑L
L2-1.13September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
Class Problem 1
Problems
L2-1.14September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The MIT Stata Center
Copyright © 2003, 2004, 2005 Norman Walsh. This work is licensed under a Creative Commons License.
L2-1.15September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Stata Center Plaza
L2-1.16September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Gehry/Gates PlazaGoal: tile the squares, except one in the middle for Bill.
n2
n2
Photo courtesy of Ricardo Stuckert/ABr.
L2-1.17September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Gehry/Gates PlazaGehry specifies L-shaped tiles covering three squares:
For example, for 8 x 8 plaza might tile for Bill this way:
Photo courtesy of Ricardo Stuckert/ABr.
L2-1.18September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Gehry/Gates PlazaTheorem: For any 2n × 2n plaza, we can make Bill and Frank happy.Proof: (by induction on n)P(n) ::= can tile 2n × 2n with Bill in middle.
Base case: (n=0)
(no tiles needed)Photo courtesy of Ricardo Stuckert/ABr.
L2-1.19September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Gehry/Gates Plaza
n2
Induction step: assume can tile 2n × 2n,prove can handle 2n+1 × 2n+1.
12 +n
Photo courtesy of Ricardo Stuckert/ABr.
L2-1.20September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Gehry/Gates PlazaNow what?
12 +nn2
Photo courtesy of Ricardo Stuckert/ABr.
L2-1.21September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Gehry/Gates Plaza
The fix:
Prove that we can always finda tiling with Bill in the corner.
L2-1.22September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Gehry/Gates PlazaNote: Once have Bill in corner,
can get Bill in middle:
Photo courtesy of Ricardo Stuckert/ABr.
L2-1.23September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Gehry/Gates PlazaMethod: Rotate the squares as indicated.
Photo courtesy of Ricardo Stuckert/ABr.
L2-1.24September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Gehry/Gates PlazaMethod: after rotation have:
Photo courtesy of Ricardo Stuckert/ABr.
L2-1.25September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Gehry/Gates PlazaMethod: Now group the 4 squares together,
and insert a tile.
Done!Bill inmiddle
Photo courtesy of Ricardo Stuckert/ABr.
L2-1.26September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Gehry/Gates PlazaTheorem: For any 2n × 2n plaza, we can put Bill in the corner.Proof: (by induction on n)P(n) ::= can tile 2n × 2n with Bill in corner
Base case: (n=0)
(no tiles needed)Photo courtesy of Ricardo Stuckert/ABr.
L2-1.27September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Gehry/Gates PlazaInduction step:Assume we can get Bill in corner of 2n × 2n.Prove we can get Bill in corner of 2n+1 × 2n+1.
n2
n2
Photo courtesy of Ricardo Stuckert/ABr.
L2-1.28September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Gehry/Gates Plaza
Method: Rotate the squares as indicated.Photo courtesy of Ricardo Stuckert/ABr.
L2-1.29September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Gehry/Gates PlazaMethod: Rotate the squares as indicated.
after rotation have:Photo courtesy of Ricardo Stuckert/ABr.
L2-1.30September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
The Gehry/Gates PlazaMethod: Now group the squares together,
and fill the center with a tile.
Done!
Photo courtesy of Ricardo Stuckert/ABr.
L2-1.31September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
Ingenious Induction Hypotheses
Note 1: To prove“Bill in middle,”
we proved something else: “Bill in corner.”
L2-1.32September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
Ingenious Induction Hypotheses
Note 2: Other times it helps tochoose a stronger hypothesisthan the desired result.
L2-1.33September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
Inductive (Recursive) Procedures
Note 3: The induction proof of“Bill in corner” implicitly definesa recursive procedure forconstructing a 2n+1 × 2n+1 cornertiling from a 2n × 2n corner tiling.
L2-1.34September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
Problems
Class Problem 2
L2-1.35September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
A False ProofTheorem: All horses are the same color. Proof: (by induction on n)Induction hypothesis:P(n) ::= any set of n horses have the same color
Base case (n=0):No horses so vacuously true!
…
L2-1.36September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
A False Proof
(Inductive case) Assume any n horses have the same color.Prove that any n+1 horses have the same color.
…n+1
L2-1.37September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
A False Proof
…First set of n horses have the same color
Second set of n horses have the same color
(Inductive case) Assume any n horses have the same color.Prove that any n+1 horses have the same color.
L2-1.38September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
A False Proof
…Therefore the set of n+1 have the same color!
(Inductive case) Assume any n horses have the same color.Prove that any n+1 horses have the same color.
L2-1.39September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
A False Proof
What is wrong?Proof that P(n) →P(n+1) is false if n = 1, because the two horse groups do not overlap.
First set of n=1 horses
Second set of n=1 horses
n =1
L2-1.40September 21, 2005Copyright © Albert R. Meyer and Ronitt Rubinfeld, 2005.
A False Proof
(But proof works for all n ≠ 1)
Proof that P(n) →P(n+1) is false if n = 1, because the two horse groups do not overlap.
Proofs� by �InductionAn Example of InductionThe Induction RuleLike Dominos…Example Induction Proof Proof by InductionExample Induction ProofAn Example ProofAn Example ProofAn Example ProofAn Example ProofAn Aside: EllipsesProblemsThe MIT Stata CenterThe Stata Center PlazaThe Gehry/Gates PlazaThe Gehry/Gates PlazaThe Gehry/Gates PlazaThe Gehry/Gates PlazaThe Gehry/Gates PlazaThe Gehry/Gates PlazaThe Gehry/Gates PlazaThe Gehry/Gates PlazaThe Gehry/Gates PlazaThe Gehry/Gates PlazaThe Gehry/Gates PlazaThe Gehry/Gates PlazaThe Gehry/Gates PlazaThe Gehry/Gates PlazaThe Gehry/Gates PlazaIngenious Induction HypothesesIngenious Induction HypothesesInductive (Recursive) ProceduresProblemsA False ProofA False ProofA False ProofA False ProofA False ProofA False Proof