Practice question · Select all that apply
The universe is {1, 2, ..., 10}, A = {1, 2, 3, 4} and B = {3, 4, 5, 6}. Select every number that lies in the complement of A union B.
Hints
- Work out A union B first, then ask which numbers of the universe are left over.
- By De Morgan's law the same set is the intersection of the two complements, which is a useful cross-check.
Show the answer
- A. 7
- C. 10
- E. 8
Why
A union B is {1,2,3,4,5,6}, so its complement within {1,...,10} is {7,8,9,10}, of the options that means 7, 8 and 10. Cross-checking with De Morgan: the complement of A is {5,...,10} and the complement of B is {1,2,7,8,9,10}; their intersection is {7,8,9,10}, the same answer. Taking the union of the complements instead would wrongly give almost everything.
Practise Sets and Set Operations
The app has 5 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.
More questions on Sets and Set Operations
- De Morgan’s laws appear in set theory as A ∪ B = A ∩ B and in logic as lnot(p ∨ q) = lnot p ∧ lnot q. Why is…
- A database JOIN, a Venn diagram and a bitwise AND on two bit-vectors all compute the same thing. What is the…
- Set operations mirror boolean logic exactly. Sort each description under the connective it behaves like.