E N D
Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative Commons Attribution-NonCommercial-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
Today’s Topics: • Finish up Knights and Knaves (Proof by Contradiction) • Fibonacci numbers (Proof by Induction)
Proof by Contradiction Steps • 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.
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!
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.
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. But all three are knavesand zero are knaves is a contradiction. 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. We didn’t need this step because we had already reached a contradiction.
2. Fibonacci numbers Verifying a solution
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? • YES!
Fibonacci numbers • Rule: F1=1, F2=1, Fn=Fn-2+Fn-1. • We will prove an upper bound: • Proof by strong induction. • Base case: n=1 n=2 n=1 and n=2 n=1 and n=2 and n=3 Other
Fibonacci numbers • Rule: F1=1, F2=1, Fn=Fn-2+Fn-1. • We will prove an upper bound: • Proof by strong induction. • Base case: n=1, n=2. Verify by direct calculation
Fibonacci numbers • Rule: F1=1, F2=1, Fn=Fn-2+Fn-1. • Theorem: • Base cases: n=1,n=2 • Inductive step: show… Fn=Fn-1+Fn-2 FnFn-1+Fn-2 Fn=rn Fn rn Other
Fibonacci numbers • Inductive step: need to show , • What can we use? • Definition of Fn: • Inductive hypothesis: • That is, we need to show that
Fibonacci numbers • Finishing the inductive step. • Need to show: • Simplifying, need to show: • Choice of actually satisfied (this is why we chose it!) QED
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 Fnand the inductive hypothesis • Simplified algebraic inequality • Proved the simplified version