CS311: Discrete Math For Computer Science, Spring 2015 Additional Exercises, With Solutions
CS311: Discrete Math For Computer Science, Spring 2015 Additional Exercises, With Solutions
Solution:
(a) |A ∪ C| = |{1, 2, . . . , 9, 10, 12, 14, 16, 18, 20}| = 15.
(b) |A ∩ C| = |{2, 4, 6, 8, 10}| = 5.
(c) |(A ∪ B) \ C| = |{1, 3, 5, . . . , 19}| = 10.
(d) |(A ∩ B) \ C| = |∅| = 0.
(e) |(A ∩ B) × C| = |A ∩ B| · |C| = 1 · 10 = 10.
Solution: Denote
the set {1, 2, . . . , 100} × {1, 2, . . . , 101} by X,
the set {1, 2, . . . , 101} × {1, 2, . . . , 100} by Y.
Set X consists of the pairs hm, ni such that m is between 1 and 100, and n is between 1
and 101; there are 10,100 such pairs. Such a pair hm, ni belongs to Y if n is between 1 and
100; there are 10,000 such pairs. Consequently the cardinality of X\Y is 10, 100−10, 000,
which equals 100.
3. Find sets A and B such that
A \ B = {1, 5, 7, 8},
B \ A = {2, 10},
A ∩ B = {3, 6, 9}.
Answer: A = {1, 3, 5, 6, 7, 8, 9}, B = {2, 3, 6, 9, 10}.
4. Can you conclude that A = B if A, B, C are sets such that
(a) A ∪ C = B ∪ C?
(b) A ∩ C = B ∩ C?
xRy ↔ x = 2y + 1.
This relation is not reflexive, because the condition 1R1 does not hold.
This relation is not symmetric, because the condition 1R3 holds, but the condition
3R1 doesn’t.
This relation is not transitive, because the conditions 1R3 and 3R7 hold, but the
condition 1R7 doesn’t.
7. What is the total number of binary relations on the set {1, . . . , 10}? How many of
them are reflexive?
Solution: A binary relation is an arbitrary subset of the set {1, . . . , 10} × {1, . . . , 10}.
So the total number of binary relations is 2100 . Such a subset is a reflexive relation if it
contains 10 pairs of the form hn, ni. So the number of reflexive relations is 290 .