1 / 28

CS173 Discrete Mathematical Structures

CS173 Discrete Mathematical Structures. Cinda Heeren Siebel Center rm 2213 heeren@cs.uiuc.edu Ofc hr: Wednesday, 9:30a-11:30a. Announcements. How did hwk #1 go? Anyone want to share? Hwk #2 available. Due Sun, 1/29, 8a. Sections start this week! See course website for locations.

tyne
Download Presentation

CS173 Discrete Mathematical Structures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS173Discrete Mathematical Structures Cinda Heeren Siebel Center rm 2213 heeren@cs.uiuc.edu Ofc hr: Wednesday, 9:30a-11:30a

  2. Announcements • How did hwk #1 go? Anyone want to share? • Hwk #2 available. Due Sun, 1/29, 8a. • Sections start this week! See course website for locations. • Look at hwk #2 before you go to section. • Be prepared to work in groups…social problem solving.

  3. Miscellaneous • Text: Rosen • RF devices: (in bookstores) • Automated attendance • Class participation (for fun and feedback) • Class keys: • Section M: J16787I481 • Register for course at http://www.einstruction.com • Web: http://www.cs.uiuc.edu/class/cs173 • IRC chat room: http://www.quickfire.org/cs173 • Class wiki: https://www-s.cs.uiuc.edu/wiki/cs173/

  4. x (L(x)  F(x)) Universe of discourse is all creatures. x (L(x)  C(x)) x (F(x)  C(x)) Predicates - more examples L(x) = “x is a lion.” F(x) = “x is fierce.” C(x) = “x drinks coffee.” All lions are fierce. Some lions don’t drink coffee. Some fierce creatures don’t drink coffee.

  5. Predicates - quantifier negation So, x P(x) is the same as x P(x). So, x P(x) is the same as x P(x). General rule: to negate a quantifier, move negation to the right, changing quantifiers as you go.

  6. What’s wrong with this proof? Predicates - quantifier negation No large birds live on honey.

  7. Reminder: in a proposition, all variables must be bound. Predicates - free and bound variables A variable is bound if it is known or quantified. Otherwise, it is free. Examples: P(x) x is free P(5) x is bound to 5 x P(x) x is bound by quantifier

  8. True proposition • False proposition • Not a proposition • No clue c) b) a) b) Predicates - multiple quantifiers To bind many variables, use many quantifiers! Example: P(x,y) = “x > y” • x P(x,y) • xy P(x,y) • xy P(x,y) • x P(x,3)

  9. P(x,y) true for all x, y pairs. For every value of x we can find a (possibly different) y so that P(x,y) is true. P(x,y) true for at least one x, y pair. There is at least one x for which P(x,y) is always true. quantification order is not commutative. Suppose P(x,y) = “x’s favorite class is y.” Predicates - the meaning of multiple quantifiers • xy P(x,y) • xy P(x,y) • xy P(x,y) • xy P(x,y)

  10. False True? True False Predicates - the meaning of multiple quantifiers N(x,y) = “x is sitting by y” • xy N(x,y) • xy N(x,y) • xy N(x,y) • xy N(x,y)

  11. How do we know it? Proofs - how do you know? The following statements are true: If I am Mila, then I am a great swimmer. I am Mila. What do we know to be true? I am a great swimmer!

  12. Axiom, postulates, hypotheses and previously proven theorems. Rules of inference Proof Proofs - how do you know? A theorem is a statement that can be shown to be true. A proof is the means of doing so.

  13. What rule of inference can we use to justify it? Proofs - how do you know? The following statements are true: If I am Mila, then I am a great swimmer. I am Mila. What do we know to be true? I am a great swimmer!

  14. p p  q Tautology: (p  (p  q))  q  q CS 173 Proofs - Modus Ponens I am Mila. If I am Mila, then I am a great swimmer.  I am a great swimmer! Inference Rule: Modus Ponens

  15. q p  q Tautology: (q  (p  q))  p  p CS 173 Proofs - Modus Tollens I am not a great skater. If I am Erik, then I am a great skater.  I am not Erik! Inference Rule: Modus Tollens

  16. p Tautology: p  (p  q)  p  q CS 173 Proofs - Addition I am not a great skater.  I am not a great skater or I am tall. Inference Rule: Addition

  17. p  q Tautology: (p  q) p  p CS 173 Proofs - Simplification I am not a great skater and you are sleepy.  you are sleepy. Inference Rule: Simplification

  18. p  q q Tautology: ((p  q)  q)  p  p CS 173 Proofs - Disjunctive Syllogism I am a great eater or I am a great skater. I am not a great skater.  I am a great eater! Inference Rule: Disjunctive Syllogism

  19. p  q q  r Tautology: ((p  q)  (q  r))  (p  r)  p  r CS 173 Proofs - Hypothetical Syllogism If you are an athlete, you are always hungry. If you are always hungry, you have a snickers in your backpack.  If you are an athlete, you have a snickers in your backpack. Inference Rule: Hypothetical Syllogism

  20. Addition Modus Tollens CS 173 Proofs - A little quiz… Amy is a computer science major.  Amy is a math major or a computer science major. If Ernie is a math major then Ernie is geeky. Ernie is not geeky!  Ernie is not a math major.

  21. CS 173 Proofs - A little proof… Here’s what you know: Ellen is a math major or a CS major. If Ellen does not like discrete math, she is not a CS major. If Ellen likes discrete math, she is smart. Ellen is not a math major. Can you conclude Ellen is smart? M  C D  C D  S M

  22. Ellen is smart! CS 173 Proofs - A little proof… 1. M  C Given 2. D  C Given 3. D  S Given 4. M Given 5. C DS (1,4) 6. D MT (2,5) 7. S MP (3,6)

  23. Ellen is smart! CS 173 Proofs - A little proof… 1. M  C Given 2. D  C Given 3. D  S Given 4. M Given 5. C Disjunctive Syllogism (1,4) 6. C  D Contrapositive of 2 7. C  S Hypothetical Syllogism (6,3) 8. S Modus Ponens (5,7)

  24. HUH? 7 = 3 mod 4 37 = 1 mod 4 94 = 2 mod 4 16 = 0 mod 4 7 = 111 mod 4 37 = 61 mod 4 94 = 6 mod 4 16 = 1024 mod 4 CS 173 Proof Techniques - direct proofs A totally different example: Prove that if n = 3 mod 4, then n2 = 1 mod 4.

  25. CS 173 Proof Techniques - direct proofs A totally different example: Prove that if n = 3 mod 4, then n2 = 1 mod 4. If n = 3 mod 4, then n = 4k + 3 for some int k. But then, n2 = (4k + 3)(4k + 3) = 16k2 + 24k + 9 = 16k2 + 24k + 8 + 1 = 4(4k2 + 6k + 2) + 1 = 4j + 1 for some int j = 1 mod 4.

  26. CS 173 Proofs - Fallacies Rules of inference, appropriately applied give valid arguments. Mistakes in applying rules of inference are called fallacies.

  27. If I am Bonnie Blair, then I skate fast I skate fast! If you don’t give me $10, I bite your ear. I bite your ear!  I am Bonnie Blair  You didn’t give me $10. I’m Eric Heiden I’m just mean. Affirming the conclusion. ((p  q)  q)  p Not a tautology. CS 173 Proofs - valid arg or fallacy?

  28. If it rains then it is cloudy. It does not rain. If it is a car, then it has 4 wheels. It is not a car.  It is not cloudy  It doesn’t have 4 wheels. February! ATV Denying the hypothesis. ((p  q)  p)  q Not a tautology. CS 173 Proofs - valid arg or fallacy?

More Related