Ch6_Sets and Counting
Ch6_Sets and Counting
A B x | x A and x B
Ex. Given the sets:
U m, a, t , h, r , u , l , e, s
A m, a, t , h
B a, h, u , e
Find A B and A B.
A B a, h Overlap of
the sets
Venn Diagrams
– visual representation of sets
U Rectangle =
A B Universal Set
Sets are
represented
by circles
AB AB
Venn Diagrams
U
A B
A B C
U
A B
A B C
C
Complement of a Set: If U is a universal set and
A is a subset of U, then the set of all elements in U
that are not in A is called the complement of A,
written AC.
AC x | x U and x A
Set Complementation
U c c U
A
C
C
A
A AC U A AC
Set Operations
Commutative Laws
A B B A
A B B A
Associative Laws
A B C A B C
A B C A B C
Distributive Laws
A B C A B A C
A B C A B A C
De Morgan’s Laws
Let A and B be sets, then
C
A B C
A B C
C
A B C
A B C
A B A B
C C
A B A B
C C
A B AC
B C
Ex. Given the sets:
U m, a, t , h, r , u , l , e, s
A m, a, t , h
B a, h, u , e
C C
Find A and A B .
AC r , u , l , e, s Elements not in A.
A B m, t
C Elements in A and
not in B.
Venn Diagrams
U
AC A
U
C A B
AB
The Number of Elements in a Set
The number of elements in a set A is denoted n(A).
Ex. Given A m, a, t , h
B a, h, u , e
n(A) = 4 Since the union doesn’t
Notice n A B 6 count a and h twice
This leads to n A B n A n B n A B
Overlap is
subtracted
Venn Diagram – number of elements
22 U
A B
5
12 31
Which leads to n A B
C
22
Survey
In a survey of 100 people at a carnival:
40 like cotton candy
30 like popcorn
45 like lemonade
15 like lemonade and popcorn
10 like cotton candy and lemonade
12 like cotton candy and popcorn
5 like all three
How many people don’t like lemonade, popcorn, or cotton candy?
How many people only like popcorn?
Survey
set C: cotton candy, set P: popcorn, set L: lemonade
n L P C 5 U
n L P 15, n C L 10, P 10 L
8 25
n C P 12 7 5 5
n(C) = 40, n(P) = 30, 23
n(L) = 45 C 17
n(U) = 100
6 possibilities 2 possibilities
Combinations
A combination is a selection of r objects from a set of
n objects where order is not important r n .
n–Factorial
For any natural number n,
n ! n(n 1)(n 2) ... 3 2 1
0! 1
Ex. 5! = 5(4)(3)(2)(1) = 120
Ex. 7! 7 6 5! 7 6 42
5! 5!
n!
P n, r where r n
n r !
6! 6 5 4 3!
Ex. P 6,3 6 5 4 120
6 3! 3!
Ex. A boy has 4 beads – red, white, blue, and
yellow. In how many different ways can three of
the beads be strung together in a row?
n!
n1 !n2 !...nr !
Ex. How many distinguishable arrangements are
there of the letters of the word initializing?
n!
C n, r where r n
r !n r !
4! 4!
C 4,3 4
3!4 3! 3!