Chapter 3 Sets and Boolean Algebra

advertisement
Chapter 3 Sets and Boolean Algebra
Special Sets
Z=
N=
Z+ =
Q=
R
Methods of describing sets:
Notational conventions:
1. The notation x  A
2. A is a subset of B (written A  B)
2 ½. A is a proper subset of B written A  B
3. A = B if A  B and B  A
Proving sets equal
4. The empty set denoted { } or  is the set with no elements
Example: Let S be any set.
SS
SS
ØS
ØS
5. Universal set
Sets containing other sets. Let C = {a, b, Ø, {e, f} }.
Which of the following statements are true:
{e, f}  C
{e, f}  C
The power set of a set A is
Notation:
The cardinality of size of a set A
Notation:
A set if finite iff
Example: Find smallest set S such that {1, 2} is both an element
of S and a subset of S.
Set Operations
Complement of A
Alternate notations:
union:
Intersection:
Two sets A and B are disjoint if
set difference:
symmetric difference:
Set Identities
Union
Intersection
Name
AB=BA
AB=BA
(A B)  C = A  (B  C)
(AB)  C = A  (B  C) Associative
A (B  C) =
(A  B)  (A  C)
A (B  C) =
(A  B)  (A  C)
A   = A, A  U = U
A  A' = U
A   = , A  U = A
A  A' = 
(A  B)' = A'  B'
(A  B)' = A'  B'
Commutative
Distributive
Idempotent,
Domination
Laws
Complement
DeMorgan's
Laws
A'  B' if and only if B  A
A  B if and only if A  B = B
A  B if and only if A  B = A
Identities for Other Set Operations
A'' = A
A B = (A  B) - (A  B)
A A = 
' = U, U' = 
A A' = U
A B = (A - B)  (B - A)
(A B) C = A B C)
A  (A  B) = A
A  (A  B) = A
The Inclusion Exclusion Principle
Theorem 2 (Inclusion-Exclusion Principle) Let A, B, and C be sets
1. n(A  B) =
Let A = {1, 3, 5, 7, 9} and let B = {4, 5, 6, 7, 8}
Two special cases:
2. n(A  B  C) =
Example
The students in a class of size 50 were asked to tell which of three
kinds of pies they liked—apple, cherry or banana cream. The
following results were obtained:
20 liked apple
28 liked cherry
16 liked banana cream
13 liked both apple and cherry
6 liked both apple and banana cream
11 liked both cherry and banana cream
4 liked all three
How many liked none of the three kinds of pies?
How many liked exactly one kind?
How many liked two kinds?
How many liked cherry or banana cream
Proving Set Identities
Example: Proof of one of DeMorgan's Laws: A  B = A  B
1st part: Prove (A  B)'  A' B'
Let x  (A  B)'
2nd part: Prove A'  B'  (A  B)'
Let y  A'  B'
Download