Download presentation
Presentation is loading. Please wait.
Published byJessica Nash Modified over 6 years ago
1
Week #2 – 4/6 September 2002 Prof. Marie desJardins
CMSC 203 / 0201 Fall 2002 Week #2 – 4/6 September 2002 Prof. Marie desJardins
2
TOPICS Predicate logic and quantifiers Sets and set operations
3
WED 9/4 PREDICATES 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 : Show that the statements x y P(x,y) and x y P(x,y) have the same truth value. Exercise : 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 : 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/6 SETS 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 : How many different elements does A x B have if A has m elements and B has n elements? Example : Prove that A B = A B. Exercise : 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 : 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 : Find the symmetric difference of the set of computer science majors at a school and the set of mathematics majors at this school. Exercise : 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:
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.