Discrete Mathematics for Computer Science - Proof Techniques and Examples

cse 20 discrete mathematics for computer science n.w
1 / 23
Embed
Share

Explore proof techniques such as proof by contraposition and proof by cases in the context of discrete mathematics for computer science. Learn how to derive and apply contrapositive forms, understand truth tables for implications, and see examples illustrating the application of these concepts in proving mathematical theorems involving numbers. Dive into the world of logical reasoning and proofs with Prof. Shachar Lovett.

  • Discrete Mathematics
  • Computer Science
  • Proof Techniques
  • Contraposition
  • Mathematical Theorems

Uploaded on | 1 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett

  2. 2 Today s Topics: 1. Proof by contraposition 2. Proof by cases

  3. 3 1. Proof by contraposition

  4. 4 Proof by contraposition To prove a statement of the form )( ( ) ( x P x ( )) Q x You can equivalently prove its contra-positive form )( ( ) ( x Q x ( )) P x Remember: (p q) ( q p)

  5. 5 Truth table for implication p T T F F q T F T F p q T F T T Rule this row out!

  6. 6 Contrapositive proof of p q Procedure: 1. Derive contrpositive form: ( q p) 2. Assume q is false (take it as given ) 3. Show that p logically follows

  7. 7 Example Thm.: Let x,y be numbers such that x 0. Then either x+y 0 or x-y 0. Proof: Given (contrapositive form): Let WTS (contrapositive form): ??? Conclusion:

  8. 8 Example Thm.: Let x,y be numbers such that x 0. Then either x+y 0 or x-y 0. Proof: Given (contrapositive form): Let A. x+y 0 or x-y 0 B. x+y=0 or x-y=0 C. x+y=0 and x-y=0 D. y 0 E. None/more/other ???

  9. 9 Example Thm.: Let x,y be numbers such that x 0. Then either x+y 0 or x-y 0. Proof: Given (contrapositive form): Let x+y=0 and x-y=0 WTS (contrapositive form): A. x 0 B. x=0 C. x+y 0 or x-y 0 D. x+y=0 or x-y=0 E. None/more/other ???

  10. 10 Example Thm.: Let x,y be numbers such that x 0. Then either x+y 0 or x-y 0. Proof: Given (contrapositive form): Let x+y=0 and x-y=0 WTS (contrapositive form): x=0 Try yourself first Conclusion:

  11. 11 Example Thm.: Let x,y be numbers such that x 0. Then either x+y 0 or x-y 0. Proof: Given (contrapositive form): Let x+y=0 and x-y=0 WTS (contrapositive form): x=0 By assumption x+y=0 and x-y=0. Summing the two equations together gives 0=0+0=(x+y)+(x-y)=2x So, 2x=0. Dividing by 2 gives that x=0. Conclusion: x=0

  12. 12 When should you use contra- positive proofs? ( x P x )( ( ) ( )) Q x You want to prove ( x Q x )( ( ) ( )) P x Which 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))

  13. 13 2. Proof by cases

  14. 14 Breaking a proof into cases Theorem: for any integer n, there exists an integer m such that n(n+1)=2m Proof by cases: n is even or n is odd

  15. 15 Breaking a proof into cases Theorem: for any integer n, there exists an integer m such that n(n+1)=2m Proof by cases: n is even or n is odd Case 1: n is even. By definition, n=2k for some integer k. Then n(n+1)=2k(n+1) and the theorem holds with m=k(n+1). Case 2: n is odd. By definition, n=2k+1 for some integer k. Then n+1=2k+2=2(k+1) and n(n+1)=2(k+1)n and the theorem holds with m=(k+1)n.

  16. 16 Breaking a proof into cases We will see a more complicated example Assume any two people either know each other or not (if A knows B then B knows A) We will prove the following theorem Theorem: among any 6 people, there are 3 who all know each other (a club) OR 3 who don t know each other (strangers)

  17. 17 Breaking a proof into cases Theorem: Every collection of 6 people includes a club of 3 people or a group of 3 strangers Proof: 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 people Case 2: x knows at most 2 of the other 5 people Notice it says there are two cases You d better be right there are no more cases! Cases must completely cover possibilities Tip: you don t need to worry about trying to make the cases equal size or scope Sometimes 99% of the possibilities are in one case, and 1% are in the other Whatever makes it easier to do each proof

  18. 18 Breaking a proof into cases Theorem: Every collection of 6 people includes a club of 3 people or a group of 3 strangers Case 1: suppose x knows at least 3 other people Cases 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 case

  19. 19 Breaking a proof into cases Theorem: Every collection of 6 people includes a club of 3 people or a group of 3 strangers Case 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.

  20. 20 Breaking a proof into cases Theorem: Proof: There are two cases to consider Case 1: there are two cases to consider Case 1.1: Verify theorem directly Case 1.2: Verify theorem directly Case 2: there are two cases to consider Case 2.1: Verify theorem directly Case 2.2: Verify theorem directly

  21. 21 Perspective: Theorem in language of graphs Graph: diagram which captures relations between pairs of objects Example: objects=people, relation=know each other 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 other A C B D

  22. 22 Perspective: Theorem in language of graphs Graph terminology People = vertices Know each other = edge Don t know each other = no edge 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 other A C B D

  23. 23 Perspective: Theorem in language of graphs Theorem: Every collection of 6 people includes a club of 3 people or a group of 3 strangers Equivalently 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)

More Related Content