How many relations are there on a set with 3 elements?
- 2⁹.
Binary relations and how to write them (roster, set-builder, graph, table), relations on a set, reflexive / irreflexive, symmetric / antisymmetric and transitive relations, combining and composing relations, zero-one matrices and digraphs, closures, and equivalence relations.
Every original slide is shown unchanged. Yellow marks on a slide point to a numbered note: hover or tap a mark to jump to its note, and hover a note to see its marks. Questions tagged Past exam appeared on a real paper; Prediction questions are likely angles, not confirmed. Pick an answer to each question: a wrong pick tells you why it is wrong, so you can try again.
A relation on A is a subset of A × A. There are 2^(n²) relations on a set with n elements.
How many relations are there on a set with 3 elements?
Trap Not reflexive just needs ONE missing loop; irreflexive needs ALL loops missing.
A relation that is not reflexive must be irreflexive.
Symmetric: aRb ⇒ bRa. Antisymmetric: aRb and bRa ⇒ a = b.
A relation can be both (e.g. equality) or neither.
R = 1,1), (1,2), (2,1 on {1, 2} is:
A relation can be both symmetric and antisymmetric.
Transitive: aRb and bRc ⇒ aRc.
R = 1,2), (2,3 on {1, 2, 3} is not transitive because it lacks:
Composite S ∘ R = {(a, c) | ∃b: (a, b) ∈ R and (b, c) ∈ S}: R first, then S.
R = 1,2, S = 2,3. S ∘ R =
Powers: R¹ = R, Rⁿ⁺¹ = Rⁿ ∘ R. R is transitive iff Rⁿ ⊆ R for all n.
Reflexive ⇔ all 1s on the diagonal; symmetric ⇔ M = Mᵗ; antisymmetric ⇔ no pair of 1s mirrored off the diagonal.
In the matrix of a reflexive relation:
M_(S∘R) = M_R ⊙ M_S (Boolean product, R’s matrix on the left).
M_(Rⁿ) = M_R ⊙ … ⊙ M_R (n times).
Digraph: an edge a → b for each (a, b); a loop at a for (a, a).
Digraph test: reflexive = loop at every vertex; symmetric = every edge has a reverse edge; antisymmetric = no two-way edges between distinct vertices; transitive = every 2-step path has a shortcut.
Reflexive closure: R ∪ Δ (add all missing loops).
The reflexive closure of R = 1,2 on {1, 2} is:
Symmetric closure: R ∪ R⁻¹ (add the reverse of every pair).
Transitive closure R*: R ∪ R² ∪ … ∪ Rⁿ (keep adding shortcuts until nothing changes).
Find the transitive closure of R = 1,2), (2,3), (3,4 on {1, 2, 3, 4}.
R ∪ R² ∪ R³ = 1,2), (2,3), (3,4), (1,3), (2,4), (1,4.
Equivalence relation: reflexive + symmetric + transitive (e.g. congruence mod m). Its equivalence classes partition the set.
Memory trick Equivalence = RST: Reflexive, Symmetric, Transitive.
Which is an equivalence relation on ℤ?
A partial order is reflexive, transitive and: