17.2: Operations on Relations
( \newcommand{\kernel}{\mathrm{null}\,}\)
Viewing relations as subsets of Cartesian products suggests ways to build new relations from old.
the relation where a(R1∪R2)b means that at least one of aR1b or aR2b is true
the relation where a(R1∩R2)b means that both aR1b and aR2b are true
the relation where aRCb means that aRb is not true
alternative notation for aRCb
Considering relations as subsets of Cartesian products, the above relation operations mean precisely the same thing as the corresponding set operations.
Consider the relations < and = on R, and let R be the union <∪=. Then xRy means that at least one of x<y or x=y is true. That is, R is the same as the relation ≤.
Let H represent the set of all living humans. Let relations RF,RM⊆H×H be defined by
- aRFb if a,b have the same father; and
- aRMb if a,b have the same mother.
Set RP=RF∩RM. Then aRPb means that a,b have the same parents.
Let U be a universal set and consider the relation ⊆ on P(U). Then A⊆CB means that A is not a subset of B, which can only happen if some elements of A are not in B. In other words, A⊆CB means that A∩BC≠∅.
- Careful.
-
Relation A⊆CB does not (necessarily) mean A⊆BC. Draw a representative Venn diagram to see why.
Unlike functions, which can only be reversed if bijective, every relation can be reversed by simply stating the relationship in the reverse order.
the relation where bR−1a means that aRb is true
- As subsets of Cartesian products, if R⊆A×B, then R−1⊆B×A, and (a,b)∈R if and only if (b,a)∈R−1.
- A relation R and its inverse R−1 express the same relationship between elements of two sets A and B, just phrased in the opposite order. In logical terms, bR−1a⇒aRb.
Let H represent the set of all living humans, and let R represent the relation on H where h1Rh2 means human h1 is the parent of human h2. Then h2R−1h1 means human h2 is the child of human h1. Both relations express the same information, but in a different order.
Recall that ∣ is a relation on N>0 where m∣n means that m divides n. Then for the inverse relation, n∣−1m means n is a multiple of m. Both relations express the same information, but in a different order.
Let L represent the set of all possible logical statements. We have a relation ≡ on L, where A≡B means that logical statement A involves the same statement variables and has the same truth table as logical statement B. Since A≡B if and only if B≡A, we conclude that the logical equivalence relation on L is its own inverse.
There are two more set-theoretic ideas we can reinterpret as relations.
the relation between sets A and B corresponding to the empty subset ∅⊆A×B, so that a∅b is always false
the relation between sets A and B corresponding to the full subset U=A×B⊆A×B, so that aUb is always true.