1 / 14

CMSC 203 / 0201 Fall 2002

CMSC 203 / 0201 Fall 2002. Week #2 – 4/6 September 2002 Prof. Marie desJardins. TOPICS. Predicate logic and quantifiers Sets and set operations. WED 9/4 PREDICATES AND QUANTIFIERS (1.3). ** Homework #0 due today! **. CONCEPTS / VOCABULARY. Predicate (a.k.a. propositional function)

Download Presentation

CMSC 203 / 0201 Fall 2002

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. CMSC 203 / 0201Fall 2002 Week #2 – 4/6 September 2002 Prof. Marie desJardins

  2. TOPICS • Predicate logic and quantifiers • Sets and set operations

  3. WED 9/4PREDICATES AND QUANTIFIERS (1.3) ** Homework #0 due today! **

  4. CONCEPTS / VOCABULARY • Predicate (a.k.a. propositional function) • Arguments (n-tuple) • Universe of discourse, syntax vs. semantics • Universal quantification  • Existential quantification  • Nesting of quantifiers • Binding variables, propositions • Negated quantifiers / equivalences

  5. Examples • H(x) = Happy(x). Which are equivalent? Negations? • x H(x) x H(x) x H(x) • x H(x) x H(x) x H(x) • Compare and contrast: • x y Likes (x,y) • x y Likes (x,y) • x y Likes (x,y) • x y Likes (x,y)

  6. Examples II • Exercise 1.3.11: use L(x,y) (“x loves y”) to express: • Everybody loves Jerry. • Everybody loves somebody. • There is somebody whom everybody loves. • Nobody loves everybody. • There is somebody whom Lydia does not love. • There is somebody whom no one loves. • There is exactly one person whom everybody loves. • There are exactly two people whom Lynn loves. • Everyone loves himself or herself. • There is someone who loves no one besides himself or herself.

  7. Examples III • Exercise 1.3.35: Show that the statements x y P(x,y) and x y P(x,y) have the same truth value. • Exercise 1.3.39: Establish the following equivalences: • (x P(x))  A  x (P(x)  A) • (x P(x))  A  x (P(x)  A)

  8. An additional exercise • Consistency: Exercise 1.1.35: Are the following specifications consistent? • Definition of consistency: A set of propositions is consistent if there is an assignment of truth values to the variables that makes each expression true. • “The system is in multiuser state if and only if it is operating normally. If the system is operating normally, the kernel is functioning. The kernel is not functioning or the system is in interrupt mode. If the system is not in multiuser state, then it is in interrupt mode. The system is not in interrupt mode.”

  9. FRI 9/6SETS AND SET OPERATIONS (1.4-1.5)

  10. CONCEPTS / VOCABULARY • Sets, elements, members • N, Z, Z+, R • Set equality • Intensional (set builder) vs. extensional (enumerated) set definitions • Universal set • Empty/null set (), subset, proper subset, power set • Infinite sets, finite sets, cardinality • Ordered n-tuples, Cartesian product

  11. CONCEPTS / VOCABULARY • Venn diagram • Union, intersection, difference (complement), symmetric difference • Disjoint sets • Principle of inclusion-exclusion • Set identities (Table 1.5.1: identity, domination, idempotent, complementation, commutative, associative, distributive, and De Morgan’s laws)

  12. Examples • Exercise 1.4.23: How many different elements does A x B have if A has m elements and B has n elements? • Example 1.5.10: Prove that A  B = A  B. • Exercise 1.5.15: Let A, B, and C be sets. Show that • (a) A  (B  C) = (A  B)  C • (c) A  (B  C) = (A  B)  (A  C)

  13. Examples II • Exercise 1.5.19: What can you say about the sets A and B if the following are true? • A  B = A • A  B = A • A – B = A • A  B = B  A • A – B = B – A

  14. Examples III • Exercise 1.5.23: Find the symmetric difference of the set of computer science majors at a school and the set of mathematics majors at this school. • Exercise 1.5.39: Using the universal set U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, find the set specified by each of the following bit strings: • 11 1100 1111 • 01 0111 1000 • 10 0000 0001

More Related