Union Examples: 42 Problems with Answers
Worked examples of Union to try before you open each solution, then practice problems with answers.
Worked Examples
Example 1
easyShow solution
Answer
First step
Full solution
- 2. List all elements from and , including each at most once: 1 (from ), 2 (from ), 3 (in both), 4 (from ), 5 (from ).
- 3. Therefore . Notice , confirming the inclusion-exclusion principle.
Example 2
mediumExample 3
mediumExample 4
hardPractice Problems
Try each one, then open the solution to compare your method.
Example 1
easyExample 2
easyExample 3
easyExample 4
easyExample 5
easyExample 6
easyExample 7
easyExample 8
easyExample 9
easyExample 10
easyExample 11
mediumExample 12
mediumExample 13
mediumExample 14
mediumExample 15
mediumExample 16
mediumExample 17
mediumExample 18
challengeExample 19
challengeExample 20
challengeExample 21
mediumExample 22
mediumExample 23
easyExample 24
mediumExample 25
mediumExample 26
mediumExample 27
mediumExample 28
easyExample 29
hardExample 30
hardExample 31
hardExample 32
easyExample 33
mediumExample 34
hardExample 35
hardExample 36
mediumExample 37
challengeExample 38
mediumWhat to focus on
Core idea: The union gathers all elements in A, in B, or in both, into one set.
Common stuck point: The procedure for union is the easy part; the trap is writing a shared element twice in the union. Asking "Does an item belong as long as it is in at least one of the sets?" first is what keeps a correct-looking calculation from being attached to the wrong concept.
Ask yourself: Does an item belong as long as it is in at least one of the sets?
Concept recap
The union of sets and is the set of all elements that belong to , to , or to both, written .
Forming a union is like merging two playlists into one library with duplicates removed: every song from either playlist is in, and a song on both appears once. The picture predicts the count too: two 10-song playlists that share 3 songs merge into 17 songs, not 20.
Read the full lesson on UnionRelated concepts
Background knowledge
These ideas may be useful before you work through the harder examples.