Download Lecture22 – Finish Knaves and Fib

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

History of mathematics wikipedia , lookup

Large numbers wikipedia , lookup

Ethnomathematics wikipedia , lookup

Law of large numbers wikipedia , lookup

Brouwer–Hilbert controversy wikipedia , lookup

List of important publications in mathematics wikipedia , lookup

Fermat's Last Theorem wikipedia , lookup

Arithmetic wikipedia , lookup

Foundations of mathematics wikipedia , lookup

Addition wikipedia , lookup

Wiles's proof of Fermat's Last Theorem wikipedia , lookup

Theorem wikipedia , lookup

Four color theorem wikipedia , lookup

Elementary mathematics wikipedia , lookup

Georg Cantor's first set theory article wikipedia , lookup

Mathematical proof wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Transcript
Peer Instruction in Discrete
Mathematics by Cynthia Leeis licensed
under a Creative Commons AttributionNonCommercial-ShareAlike 4.0
International License.
Based on a work
at http://peerinstruction4cs.org.
Permissions beyond the scope of this
license may be available
at http://peerinstruction4cs.org.
CSE 20 –
Discrete
Mathematics
Dr. Cynthia Bailey Lee
Dr. Shachar Lovett
2
Today’s Topics:
1.
2.
Finish up Knights and Knaves (Proof by
Contradiction)
Fibonacci numbers (Proof by Induction)
3
1. Knights and Knaves
4
Proof by Contradiction Steps

A.
B.
C.
D.
What are they?
1. Assume what you are proving, 2. plug in
definitions, 3. do some work, 4. show the
opposite of what you are proving (a
contradiction).
1. Assume the opposite of what you are
proving, 2. plug in definitions, 3. do some work,
4. show the opposite of your assumption (a
contradiction).
1. Assume the opposite of what you are
proving, 2. plug in definitions, 3. do some work,
4. show the opposite of some fact you already
showed (a contradiction).
Other/none/more than one.
5
A: “At least one of us is a knave.”
B: “At most two of us are knaves.”
[C doesn't say anything]
Thm. B is a knight.
Proof (by contradiction):
Assume not, that is, assume B is a knave.
Try it yourself first!
6
A: “At least one of us is a knave.”
B: “At most two of us are knaves.”
[C doesn't say anything]
Thm. B is a knight.
Proof (by contradiction):
Assume not, that is, assume B is a knave.
Then what B says is false, so it is false that at most two are knaves.
So it must be that all three are knaves.
Then A is a knave.
So what A says is false, and so there are zero knaves.
So B must be a knight, but we assumed B was a knave, a
contradiction.
So the assumption is false and the theorem is true. QED.
7
A: “At least one of us is a knave.”
B: “At most two of us are knaves.”
[C doesn't say anything]
Thm. B is a knight.
Proof (by contradiction):
Assume not, that is, assume B is a knave.
Then what B says is false, so it is false that at most two are knaves.
So it must be that all three are knaves.
We didn’t
Then A is a knave.
need this step
So what A says is false, and so there are zero knaves.
because we
But all three are knaves and zero are knaves is a contradiction.
had already
So B must be a knight, but we assumed B was a knave, a
reached a
contradiction.
contradiction.
So the assumption is false and the theorem is true. QED.
8
2. Fibonacci numbers
Verifying a solution
9
Fibonacci numbers
 1,1,2,3,5,8,13,21,…
 Rule:
F1=1, F2=1, Fn=Fn-2+Fn-1.
 Question:
can we derive an expression for the
n-th term?
n
 YES!
1  1 5 
1  1 5 
Fn 

 


2
2
5
5


n
10
Fibonacci numbers
 Rule:
F1=1, F2=1, Fn=Fn-2+Fn-1.
 We will prove an upper bound:
1 5
Fn  r , r 
2
n
 Proof
by strong induction.
 Base case:
A. n=1
B.
C.
D.
E.
n=2
n=1 and n=2
n=1 and n=2 and n=3
Other
11
Fibonacci numbers
 Rule:
F1=1, F2=1, Fn=Fn-2+Fn-1.
 We will prove an upper bound:
1 5
Fn  r , r 
2
n
 Proof
by strong induction.
 Base case: n=1, n=2. Verify by direct
calculation
F1  1  r
F2  1  r 2
12
Fibonacci numbers
 Rule:
F1=1, F2=1, Fn=Fn-2+Fn-1.
 Theorem:
 Base
Fn  r n , r 
1 5
2
cases: n=1,n=2
 Inductive
step: show…
A.
B.
C.
D.
E.
Fn=Fn-1+Fn-2
FnFn-1+Fn-2
Fn=rn
Fn rn
Other
13
Fibonacci numbers
 Inductive
 What


step: need to show Fn  r n, , r  12 5
can we use?
Definition of Fn: Fn  Fn2  Fn1
Inductive hypothesis: Fn 1  r n 1 , Fn 2  r n  2
 That
is, we need to show that
r n2  r n1  r n
14
Fibonacci numbers
 Finishing
the inductive step.
n2
 Need to show: r
 r n1  r n
 Simplifying,
need to show: 1  r  r
2
of r  12 5 actually satisfied 1  r  r 2
(this is why we chose it!)
 Choice
QED
15
Fibonacci numbers - recap
 Recursive
definition of a sequence
 Base case: verify for n=1, n-2
 Inductive step:



Formulated what needed to be shown as
an algebraic inequality, using the definition
of Fn and the inductive hypothesis
Simplified algebraic inequality
Proved the simplified version