Download presentation

Presentation is loading. Please wait.

Published byKasey Rutledge Modified over 2 years ago

1
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett 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 Permissions beyond the scope of this license may be available at LeeCreative Commons Attribution- NonCommercial-ShareAlike 4.0 International Licensehttp://peerinstruction4cs.org

2
Todays Topics: 1. Finish up Knights and Knaves (Proof by Contradiction) 2. Fibonacci numbers (Proof by Induction) 2

3
1. Knights and Knaves 3

4
Proof by Contradiction Steps What are they? A. 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). B. 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). C. 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). D. Other/none/more than one. 4

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! 5

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. 6

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. Then A is a knave. So what A says is false, and so there are zero knaves. But all three are knaves and 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. 7 We didnt need this step because we had already reached a contradiction.

8
2. Fibonacci numbers Verifying a solution 8

9
Fibonacci numbers 1,1,2,3,5,8,13,21,… Rule: F 1 =1, F 2 =1, F n =F n-2 +F n-1. Question: can we derive an expression for the n-th term? YES! 9

10
Fibonacci numbers Rule: F 1 =1, F 2 =1, F n =F n-2 +F n-1. We will prove an upper bound: Proof by strong induction. Base case: 10 A.n=1 B.n=2 C.n=1 and n=2 D.n=1 and n=2 and n=3 E.Other

11
Fibonacci numbers Rule: F 1 =1, F 2 =1, F n =F n-2 +F n-1. We will prove an upper bound: Proof by strong induction. Base case: n=1, n=2. Verify by direct calculation 11

12
Fibonacci numbers Rule: F 1 =1, F 2 =1, F n =F n-2 +F n-1. Theorem: Base cases: n=1,n=2 Inductive step: show… 12 A.F n =F n-1 +F n-2 B.F n F n-1 +F n-2 C.F n =r n D.F n r n E.Other

13
Fibonacci numbers Inductive step: need to show, What can we use? Definition of F n : Inductive hypothesis: That is, we need to show that 13

14
Fibonacci numbers Finishing the inductive step. Need to show: Simplifying, need to show: Choice of actually satisfied (this is why we chose it!) QED 14

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 F n and the inductive hypothesis Simplified algebraic inequality Proved the simplified version 15

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google