Cardinality of a set
Cardinality of a finite set, the sum and product rules, inclusion-exclusion for two and three sets, the cardinality of a complement and the pigeonhole principle.
- 23 cards
- 5 topics
- Free
The outline, topic by topic
Each topic is weighted the way the exam weighs it.
- Concepts
- Questions
- Sort and link
- The numbers
- Understand
A few cards from the deck
Sum rule: what is it?
Show the answer
If two sets have no element in common, the number of elements of their union is the sum of their sizes.
It assumes disjoint cases: 4 desserts or 3 fruits give 7 choices only if no dessert is also a fruit.
What does this program print?
```python
A = {1, 2, 3, 4}
B = {3, 4, 5}
print(len(A | B))`5726
Show the answer
5A | B = {1, 2, 3, 4, 5}. Inclusion-exclusion confirms it: 4 + 3 − 2 = 5. The 7 comes from forgetting that 3 and 4 were counted twice.
The cardinality of a finite set is its …, written |A|.
Show the answer
The cardinality of a finite set is its number of elements, written |A|.
|{a, b, c}| = 3 and |∅| = 0. A set does not count duplicates: |{1, 1, 2}| = 2.
Product rule: what is it?
Show the answer
When a choice is made in several independent steps, the number of outcomes is the product of the number of options at each step.
3 starters and 4 mains give 3 × 4 = 12 menus: each starter pairs with each of the mains.