Relations
Study binary relations and their properties, from equivalence relations that partition sets to partial orders that organize elements hierarchically.
- Define and represent binary relations
- Identify relation properties
- Understand equivalence relations and classes
- Define partial and total orders
- Draw Hasse diagrams
- Compute closures of relations
1. Binary Relations
A binary relation R from set A to set B is a subset of .
If , we write .
- Reflexive: for all
- Symmetric:
- Antisymmetric:
- Transitive:
2. Equivalence Relations
A relation R on set A is an equivalence relation if it is reflexive, symmetric, and transitive.
The equivalence class of element a is:
The equivalence classes of an equivalence relation form a partition of the set.
3. Partial Orders
A relation R on set A is a partial order if it is reflexive, antisymmetric, and transitive.
A set with a partial order is called a poset.
- - integers with ≤
- - power set with subset relation
- - positive integers with "divides"
A partial order is a total order if every two elements are comparable.
4. Closures
The closure of R with respect to property P is the smallest relation containing R that has property P.
- Reflexive closure: Add all
- Symmetric closure: Add for each
- Transitive closure: Add pairs connected by paths
Practice Quiz
Frequently Asked Questions
What's the difference between symmetric and antisymmetric?
Symmetric: If aRb then bRa.
Antisymmetric: If aRb AND bRa, then a = b.
How do equivalence relations differ from partial orders?
Both are reflexive and transitive. Equivalence relations are symmetric; partial orders are antisymmetric.
What are relations used for in CS?
Databases (tables are relations), graphs (edge sets), type systems (subtyping), dependency analysis.