Discrete Mathematics
Lesson 2 of 3 10 min +70 XP

Sets & Counting

Combine and count without listing everything.

What you'll learn

  • Use union, intersection, and complement
  • Apply the multiplication principle
  • Distinguish permutations from combinations
The overlapping club rosters

Some students are in choir, some in band, a few in both — draw two overlapping circles and you can count everyone without listing names twice. Set theory and counting let you combine and tally groups cleverly instead of listing every member.

Collections and how to count them

A set is an unordered collection of distinct elements. The union A ∪ B holds everything in either set; the intersection A ∩ B holds only what's in both. Counting problems ask 'how many arrangements?' without listing them all.

The multiplication principle: if one choice has m options and a second has n, the pair has m × n outcomes. Order matters for permutations (n!/(n−r)!) but not for combinations (n choose r).

Choosing 2 of 4 people for a line (order matters): 4 × 3 = 12 permutations.
Choosing 2 of 4 for a team (order doesn't): 12 / 2 = 6 combinations.
Lab · Order matters or not?
  1. List the ways to pick 2 letters from {A, B, C} as an ordered pair.
  2. Now list them as unordered pairs.
  3. Count each and compare.

What you should see: Ordered: AB, BA, AC, CA, BC, CB = 6 permutations. Unordered: AB, AC, BC = 3 combinations. Removing order halves the count here.

Knowledge Check

+18 XP / correct

1. A menu has 3 mains and 4 drinks. How many main-and-drink combos?

2. Choosing a committee of 2 from 5 people (order doesn't matter) is a…