ICS141: Discrete Mathematics For Computer Science I
ICS141: Discrete Mathematics For Computer Science I
ICS141: Discrete Mathematics For Computer Science I
ICS141:
Discrete Mathematics for
Computer Science I
Dept. Information & Computer Sci., University of Hawaii
Jan Stelovsky
based on slides by Dr. Baek and Dr. Still
Originals by Dr. M. P. Frank and Dr. J.L. Gross
Provided by McGraw-Hill
Lecture 8
Chapter 2. Basic Structures
2.1 Sets
2.2 Set Operations
n Previously…
n Literal set {a,b,c} and set-builder notation {x |P(x)}
n Today
n ∈ relational operator, and the empty set ∅
Supersets
n S⊂T (“S is a proper subset of T ”) means that
S⊆T but T⊆S. Similar for S ⊃T.
n Example:
{1, 2} ⊂ {1, 2, 3}
S
T
n Formally:
A - B = {x | x∈A ∧ x∉B}
= {x | ¬(x∈A → x∈B)}
n Also called:
The complement of B with respect to A.
n A−B
is what’s left after B “takes a bite out of A”
Chomp!
Set
A-B
Set A Set B
ICS 141: Discrete Mathematics I - Fall 2011 8-22
Set Difference Examples
University of Hawaii
n E.g., If U = N,
{3, 5} = {0,1, 2, 4, 6, 7,...}
ICS 141: Discrete Mathematics I - Fall 2011 8-24
More on Set Complements
University of Hawaii
A
A A
U
n [a, ∞) = {x ∈ R | a ≤ x}
n (a, ∞) = {x ∈ R | a < x}
ICS 141: Discrete Mathematics I - Fall 2011 8-26