The Timpson Lyceum seal

The Timpson Lyceum · Discrete Math (2025)

Set Operations and Combinatorial Proofs - Lecture 6 (Discrete Math)

Overview

This lecture moves from set relations (which return true or false) to set operations (which take sets and return new sets), then uses those operations to count. We define intersection, union, difference, symmetric difference, and the Cartesian (cross) product, and we collect the core algebraic laws — commutativity, associativity, identity with the empty set, distributivity, and De Morgan's laws — all of which follow directly from the corresponding rules of propositional logic. We then introduce the inclusion–exclusion principle for the size of a union and prove it by counting, applying it to a divisibility problem. The lecture closes with two combinatorial (counting) proofs of summation identities, illustrating the general technique of showing that both sides of an equation count the same thing.

Key Concepts

Relations vs. operations. A relation on sets (e.g. x∈Ax \in A, A⊆BA \subseteq B, A=BA = B) is a predicate that returns true or false. A set operation (intersection, union, difference, …) takes sets and returns a new set, just as ++ and ×\times take numbers and return numbers.

Subset review.

The set operations. For all xx:

Commutativity. A∩B=B∩AA \cap B = B \cap A and A∪B=B∪AA \cup B = B \cup A (because "and"/"or" are commutative). But A−B≠B−AA - B \neq B - A in general — difference and the cross product are the two operations here that are not commutative.

Concrete computation. For A={1,2,3,4}A = \{1,2,3,4\}, B={1,4,7,11}B = \{1,4,7,11\}:

Algebra of sets (Theorem 12.3). For sets A,B,CA, B, C:

Each law mirrors a propositional-logic identity: union/intersection are defined by "or"/"and," so any property of "or"/"and" transfers directly to the corresponding set operation (verifiable by a truth table).

Inclusion–exclusion (two sets). For finite sets, ∣A∣+∣B∣=∣A∪B∣+∣A∩B∣|A| + |B| = |A \cup B| + |A \cap B|, equivalently ∣A∪B∣=∣A∣+∣B∣−∣A∩B∣.|A \cup B| = |A| + |B| - |A \cap B|. Adding ∣A∣|A| and ∣B∣|B| counts the overlap twice, so subtract ∣A∩B∣|A \cap B| once. Forgetting to subtract the intersection is the classic error.

Disjoint and pairwise disjoint.

Cartesian (cross) product. A×B={ (a,b):a∈A, b∈B }A \times B = \{\,(a,b) : a \in A,\ b \in B\,\} — ordered pairs with first coordinate from AA, second from BB. Size: ∣A×B∣=∣A∣⋅∣B∣|A \times B| = |A| \cdot |B|. Like difference, it is not commutative: A×B≠B×AA \times B \neq B \times A in general (the pairs have their coordinates swapped).

De Morgan's laws for sets. A−(B∪C)=(A−B)∩(A−C)A - (B \cup C) = (A - B) \cap (A - C) and A−(B∩C)=(A−B)∪(A−C)A - (B \cap C) = (A - B) \cup (A - C). Distributing a "minus" over a union flips it to an intersection (and vice versa) — the set-theory image of the logical ¬(α∨β)=¬α∧¬β\lnot(\alpha \lor \beta) = \lnot\alpha \land \lnot\beta.

Combinatorial proof technique. To prove an identity, find a collection of objects that both sides count; if they count the same set of objects, they are equal. Useful facts: 2n2^n counts all subsets of an nn-element set, and n!n! counts the arrangements (orderings) of nn distinct objects.

Worked Example

Inclusion–exclusion applied to divisibility. How many integers in {1,2,…,1000}\{1, 2, \dots, 1000\} are divisible by 22 or 55?

Let AA = multiples of 22 and BB = multiples of 55 in that range. Numbers divisible by both 22 and 55 are exactly the multiples of 1010. Then

∣A∪B∣=∣A∣+∣B∣−∣A∩B∣=500+200−100=600.\begin{aligned} |A \cup B| &= |A| + |B| - |A \cap B| \\ &= 500 + 200 - 100 = 600. \end{aligned}

So 600 integers from 11 to 10001000 are divisible by 22 or 55. (Naively answering 500+200=700500 + 200 = 700 double-counts the 100100 multiples of 1010.)

Combinatorial proof that   20+21+⋯+2 n−1=2n−1\;2^0 + 2^1 + \cdots + 2^{\,n-1} = 2^n - 1.

Let A={1,2,…,n}A = \{1, 2, \dots, n\}, so ∣A∣=n|A| = n. Since AA has 2n2^n subsets, it has 2n−12^n - 1 non-empty subsets (all subsets except ∅\varnothing) — that is the right-hand side.

Now count the non-empty subsets a second way, by their maximum element kk. A subset whose largest element is kk consists of kk together with any subset of {1,2,…,k−1}\{1, 2, \dots, k-1\}, and there are 2 k−12^{\,k-1} such choices. Summing over every possible maximum k=1,2,…,nk = 1, 2, \dots, n:

#{non-empty subsets of A}=∑k=1n2 k−1=20+21+22+⋯+2 n−1.\begin{aligned} \#\{\text{non-empty subsets of } A\} &= \sum_{k=1}^{n} 2^{\,k-1} \\ &= 2^0 + 2^1 + 2^2 + \cdots + 2^{\,n-1}. \end{aligned}

Both expressions count the non-empty subsets of AA, so they are equal: 20+21+⋯+2 n−1=2n−12^0 + 2^1 + \cdots + 2^{\,n-1} = 2^n - 1. (Check n=4n=4: 1+2+4+8=15=24−11+2+4+8 = 15 = 2^4 - 1.)

Summary