Dr Cynthia Bailey Lee Dr Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Lee is licensed under a Creative Commons Attribution ID: 621460
Download Presentation The PPT/PDF document "CSE 20 – Discrete Mathematics" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
CSE 20 – Discrete Mathematics
Dr. Cynthia Bailey LeeDr. Shachar Lovett
Peer Instruction in Discrete Mathematics by
Cynthia
Lee
is
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
.
Slide2
Today’s Topics:
Proof by contrapositionProof by cases
2Slide3
1. Proof by contraposition
3Slide4
Proof by contraposition
To prove a statement of the formYou can equivalently prove its contra-positive formRemember:
(p→q) (q→ p)4Slide5
Contrapositive proof of
p→qProcedure:
Derive contrapositive form: (q→ p)Assume q is false (take it as “given”)Show that p logically follows5Slide6
Truth table for implication
6
pq~p~q~q → ~pTTFFTTFFT
FFTT
F
T
F
F
T
T
T
Rule this row out!Slide7
Example
Thm.: “Let x,y be numbers such that x
0. Then either x+y0 or x-y0.” Proof:Given (contrapositive form): Let WTS (contrapositive form): …Conclusion: …7???Slide8
Example
Thm.: “Let x,y be numbers such that x
0. Then either x+y0 or x-y0.” Proof:Given (contrapositive form): Let …x+y0 or x-y0x+y=0 or x-y=0x+y=0 and x-y=0y0None/more/other8
???Slide9
Example
Thm.: “Let x,y be numbers such that x
0. Then either x+y0 or x-y0.” Proof:Given (contrapositive form): Let x+y=0 and x-y=0WTS (contrapositive form):x0x=0x+y0 or x-y0x+y=0 or x-y=0None/more/other
9
???Slide10
Example
Thm.: “Let x,y be numbers such that x
0. Then either x+y0 or x-y0.” Proof:Given (contrapositive form): Let x+y=0 and x-y=0WTS (contrapositive form): x=0Conclusion: …10Try yourself firstSlide11
Example
Thm.: “Let x,y be numbers such that x
0. Then either x+y0 or x-y0.” Proof:Given (contrapositive form): Let x+y=0 and x-y=0WTS (contrapositive form): x=0Conclusion: x=0, which is what was to be shown, so the theorem is true.11By assumption x+y
=0 and x-y=0. Summing the two equations together gives0=0+0=(x+y)+(x-y)=2xSo, 2x=0. Dividing by 2 gives that x=0.Slide12
When should you use contra-positive proofs?
You want to proveWhich is equivalent to So, it shouldn’t matter which one to prove
In practice, one form is usually easier to prove - depending which assumption gives more information (either P(x) or Q(x))12Slide13
2. Proof by cases
13Slide14
Breaking a proof into cases
Assume any two people either know each other or not (if A knows B then B knows A)We will prove the following theoremTheorem: among any 6 people
, there are 3 who all know each other (a club) OR 3 who don’t know each other (strangers)14Slide15
Breaking a proof into cases
Theorem: Every collection of 6 people includes a club of 3 people or a group of 3 strangersProof: The proof is by case analysis. Let x denote one of the 6 people. There are two cases:
Case 1: x knows at least 3 of the other 5 peopleCase 2: x knows at most 2 of the other 5 peopleNotice it says “there are two cases”You’d better be right there are no more cases!Cases must completely cover possibilitiesTip: you don’t need to worry about trying to make the cases “equal size” or scopeSometimes 99% of the possibilities are in one case, and 1% are in the otherWhatever makes it easier to do each proof15Slide16
Breaking a proof into cases
Theorem: Every collection of 6 people includes a club of 3 people or a group of 3 strangersCase 1:
suppose x knows at least 3 other peopleCases 1.1: No pair among these 3 people met each other. Then these are a group of 3 strangers. So the theorem holds in this subcase.Case 1.2: Some pair among these people know each other. Then this pair, together with x, form a club of 3 people. So the theorem holds in this subcase.Notice it says: “This case splits into two subcases”Again, you’d better be right there are no more than these two!Subcases must completely cover the possibilites within the case16Slide17
Breaking a proof into cases
Theorem: Every collection of 6 people includes a club of 3 people or a group of 3 strangersCase 2:
Suppose x knows at most 2 other people. So he doesn’t know at least 3 people.Cases 2.1: All pairs among these 3 people met each other. Then these are a club of 3. So the theorem holds in this subcase.Case 2.2: Some pair among these people don’t know each other. Then this pair, together with x, form a group of 3 strangers. So the theorem holds in this subcase.17Slide18
Breaking a proof into cases
Theorem: …Proof: There are two cases to considerCase 1: there are two cases to considerCase 1.1: Verify theorem directlyCase 1.2: Verify theorem directlyCase 2: there are two cases to consider
Case 2.1: Verify theorem directlyCase 2.2: Verify theorem directly18Slide19
Perspective:Theorem in language of graphs
Graph: diagram which captures relations between pairs of objectsExample: objects=people, relation=know each other
19AB
CD
A,B know each other
A,C know each other
A,D know each other
B,C know each other
B,D don’t know each other
C,D don’t know each otherSlide20
Perspective:Theorem in language of graphs
Graph terminologyPeople = verticesKnow each other = edgeDon’t know each other = no edge
20AB
CD
A,B know each other
A,C know each other
A,D know each other
B,C know each other
B,D don’t know each other
C,D don’t know each otherSlide21
Perspective:Theorem in language of graphs
21
Theorem: Every collection of 6 people includes a club of 3 people or a group of 3 strangersEquivalently…Theorem: any graph with 6 vertices either contains a triangle (3 vertices with all edges between them) or an empty triangle (3 vertices with no edges between them)
Instance of “Ramsey theory”