Mathematics For Computing
Sets Practice Test
1. U = A ∪ B, A = {1, 2, 5, 7, 9}, B = {3, 4, 5}
What is the output of the following operation?
A’
i) {1, 2, 7, 9}
ii) {}
iii) {3, 4}
iv) {3, 4, 5}
Answer: iii) {3, 4}
2. How many elements are in the set A?
A = {a, b, c, d, c, f}
i) 6
ii) 5
iii) 4
iv) 0
Answer: ii) 5
3. A = {a, b, c}. Cardinality of P(A) =?
i) 3
ii) 6
iii) 8
iv) 2
Answer: iii) 8
4. How many elements are in the set B?
B = {{a, b}, {c, d}}
i) 4
ii) 2
iii) 0
iv) 1
Answer: ii) 2
, 5. How many elements are in the set C?
C = {{}, {}, 10, 11}
i) 4
ii) 2
iii) 3
iv) 1
Answer: iii) 3
6. What is |D|+|E|-|A|?
A = {0, 3}, D = {{}, {}, {4, 5}, 7}, E = {}
i) 4
ii) 5
iii) 2
iv) 1
Answer: iv) 1
7. (A ∪ C) ∪ (D ∪ B) =?
A = {1, 2, 3, 4, 5}, B = {0, 2, 4, 6, 8}, C = {0, 5, 10, 15}, D = {}
i) {0, 1, 2, 3, 4, 5, 10, 15}
ii) {0, 2, 4, 6, 8}
iii) {}
iv) {0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 15}
Answer: iv) {0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 15}
8. (A ∩ B) ∪ (C ∩ B) =?
A = {3, 4, 5}, B = {1, 3, 5}, C = {}
i) {3, 5}
ii) {}
iii) {5}
iv) {1, 3, 4, 5}
Answer: i) {3, 5}