1 / 17

CS 173: Discrete Mathematical Structures

CS 173: Discrete Mathematical Structures. Cinda Heeren heeren@cs.uiuc.edu Rm 2213 Siebel Center Office Hours: M 4:30p, T 1:30p. CS 173 Discrete Mathematical Structures. Announcements: Hwk #1 available now, due 9/14 in class. Reading should include 1.1-1.4 of text POD? Blues? Quizzes?.

Download Presentation

CS 173: 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. CS 173:Discrete Mathematical Structures Cinda Heeren heeren@cs.uiuc.edu Rm 2213 Siebel Center Office Hours: M 4:30p, T 1:30p

  2. CS 173 Discrete Mathematical Structures Announcements: • Hwk #1 available now, due 9/14 in class. • Reading should include 1.1-1.4 of text • POD? • Blues? • Quizzes? Cs173 - Spring 2004

  3. CS 173 Discrete Mathematical Structures • Class: • Sec M: TTh 11a, 1320 DCL • Sec N: TTh 12:30p, 1310 DCL • My Office Hours: M 4:30-5:30p, T 1:30-2:30p ** • Grading: • Attendance (5%) - Starting Sept 7. • POD (10%) - Starting Sept 6 (beta testing this week). • Online weekly quiz (10%) - Starting 9/6-9/10. • Biweekly written hwk (10%) - Hwk #1 due 9/14. • Midterm exams 1 and 2 (20% each) • Final exam (25%) Cs173 - Spring 2004

  4. CS 173 Discrete Mathematical Structures • Text: Rosen • Infrared devices: (in bookstores by Thur) • Automated attendance • Class participation • Class keys: • Section M S3395Z353 • Section N W5657S385 • Register for course at www.einstruction.com • Web: www-courses.cs.uiuc.edu/~cs173 Cs173 - Spring 2004

  5. CS 173 Discrete Mathematical Games What’s That On My Head? • In each group there is at least 1 red card. • When you know your color, you get a prize. • Inquisitor repeatedly queries “do you know what’s on your head?” • How many queries until everyone knows what they have? Cs173 - Spring 2004

  6. Table entries: # of queries required to deduce # of red cards. 1 2 3 4 1 2 3 4 CS 173 Discrete Mathematical Games What’s That On My Head? # red cards 1 2 Group size 1 2 3 Cs173 - Spring 2004

  7. not both! CS 173 Propositional Logic A proposition is a declarative statement that is either TRUE or FALSE. Examples: • CS173 is Ed’s favorite class. • 3 + 2 = 5 • 3 + 2 = 32 • The Earth is flat. • The Earth is an oblate spheroid. • There is no gravity. Non-Examples: • Study hard!! • Will you meet me for coffee? • 3 + 2 • x + y = z Cs173 - Spring 2004

  8. CS 173 Propositional Logic - negation Suppose p is a proposition. The negation of p is written p and has meaning: “It is not the case that p.” • Ex. It is not the case that cs173 is Ed’s favorite class. Truth table for negation: Cs173 - Spring 2004

  9. CS 173 Propositional Logic - more operators Conjunction: p  q corresponds to English “and.” Proposition p  q is true when p and q are both true. • Ex. Maria is brave and clever. Truth table for conjunction: Cs173 - Spring 2004

  10. CS 173 Propositional Logic - more operators Disjunction: p  q corresponds to English “or.” Proposition p  q is true when p or q (or both) is true. • Ex. Maria is brave or nuts. Truth table for disjunction: T T T F Cs173 - Spring 2004

  11. CS 173 Propositional Logic - more operators Exclusive Or: p  q corresponds to English “either…or…” Proposition p  q is true when p or q (not both) is true. • Ex. You will eat either pizza or a burrito for lunch. Truth table for exclusive or: F T T F Cs173 - Spring 2004

  12. CS 173 Propositional Logic - more operators Implication: p  q corresponds to English “if…then…” • Ex. If it is raining, then it is cloudy. • Ex. If there are 200 students in the room then I am the Easter Bunny. • Ex. If p then 2 + 2 = 4. (always true…why?) Truth table for implication: T F T T Cs173 - Spring 2004

  13. CS 173 Propositional Logic - more operators Biconditional: p  q corresponds to English “if and only if…then…” • Ex. If and only if it is raining, then it is cloudy. • Ex. If and only if there are 200 students in the room then I am the Easter Bunny. Truth table for biconditional: T F F T Cs173 - Spring 2004

  14. 16 CS 173 Propositional Logic - more operators? • How many of these could we do? • How many of them do we need? To answer, we need a notion of “logical equivalence.” If p and q are propositions, then p q if their truth tables are the same. If p q, we say “p is equivalent to q.” Cs173 - Spring 2004

  15. CS 173 Propositional Logic - logical equivalence • Ex. p  q  p  q Cs173 - Spring 2004

  16. CS 173 Propositional Logic - special definitions • Contrapositives: p  q and q  p Ex. “If it is noon, then I am hungry.” “If I am not hungry, then it is not noon.” • Converses: p  q and q  p Ex.“If it is noon, then I am hungry.” “If I am hungry, then it is noon.” • Inverses: p  q and p  q Ex.“If it is noon, then I am hungry.” “If it is not noon, then I am not hungry.” Cs173 - Spring 2004

  17. YES NO NO CS 173 Propositional Logic - special  • Contrapositives: p  q  q  p ? Ex. “If it is noon, then I am hungry.” “If I am not hungry, then it is not noon.” • Converses: p  q  q  p ? Ex.“If it is noon, then I am hungry.” “If I am not hungry, then it is not noon.” • Inverses: p  q  p  q ? Ex.“If it is noon, then I am hungry.” “If it is not noon, then I am not hungry.” Cs173 - Spring 2004

More Related