Relations in Discrete Math Tutorial
Relations in Discrete Math Tutorial
A relation is an equivalence relation if it is reflexive, symmetric, and transitive. For the given matrix 0 1 1 1 1 0 1 0 1, this relation lacks reflexivity as not all diagonal entries are 1, proven by the absence of (0, 0) and (3, 3). Symmetry may hold, but without reflexivity, this criterion is irrelevant for equivalence, and the relation's composition fails to satisfy necessary comprehensive transitive checks, excluding it from equivalence classification .
The union of two relations R1 and R2 is computed using the element-wise logical OR operation on their matrices. For example, if MR1 = 0 1 0 1 1 1 1 0 0 and MR2 = 0 1 0 0 1 1 1 1 1, then the union MR1 ∪ MR2 = 0 1 0 1 1 1 1 1 1 . The intersection is computed using element-wise logical AND: MR1 ∩ MR2 = 0 1 0 0 1 1 1 0 0 .
A relation is transitive if whenever (a, b) and (b, c) are in the relation, (a, c) must also be in the relation. To check transitivity using a matrix, for any pair of entries (i, j) and (j, k) that are 1, the entry (i, k) should also be 1. The matrix's Boolean product with itself should maintain ones where transitivity exists. This is illustrated in matrix R2 where the composition R2 = R * R results in additional ones indicating transitive pairs .
A symmetric relation is one where for every (a, b) in the relation, (b, a) is also present, as seen in matrix 1 1 1 1 0 1 1 1 1 where if (1, 2) is present, (2, 1) is too . An antisymmetric relation, however, allows (a, b) and (b, a) only if a equals b, meaning no distinct (a, b) can have its symmetric pair also present; for instance, in matrix 0 1 0 0 1 0 0 1 0, distinct (a, b) and (b, a) pairs are missing .
A relation on a set is irreflexive if no element is related to itself, meaning for matrix entries where the row index equals the column index (main diagonal), all entries are 0. If all diagonal entries are 0, the relation is irreflexive; if any diagonal entry is 1, the relation is not irreflexive .
Reflexive closure of a relation involves adding pairs so that every element is related to itself, ensuring reflexivity. Given a set of ordered pairs, like {(0, 1), (1, 1), (1, 2), (2, 0), (3, 0)}, the reflexive closure is achieved by including missing self-pairs, resulting in new pairs such as (0, 0) and (3, 3) being added to make it reflexive, leading to the relation: {(0, 0), (0, 1), (1, 1), (1, 2), (2, 0), (2, 2), (3, 0), (3, 3)} .
Examining the main diagonal of a relation matrix checks for reflexivity because the diagonal contains entries (a, a) for each element in the set. If all diagonal entries are 1, it confirms that every element has a self-loop, and thus the relation is reflexive . If any diagonal entry is 0, the relation is not reflexive because at least one element does not relate to itself .
Antisymmetric relations require that if (a, b) is present and a is not equal to b, then (b, a) cannot be present. In a matrix, this is seen where both (i, j) and (j, i) having 1s only coincide with i = j. For example, matrix 0 1 0 0 1 0 0 1 0 has no such pairs—it's antisymmetric . Asymmetric relations demand that if (a, b) is present, (b, a) is not, and vice-versa, and (a, a) pair is impossible. This distinction is evident if a matrix has no symmetric entries and no diagonal 1s, again shown in matrix form .
The Boolean product is significant in determining the composition of relations because it effectively combines two matrices to check which pairs continue through a middle element. For example, when using MR2 = MR * MR, the Boolean product involves computing each entry as 1 if any logical AND across a row and column sums to a non-zero value, creating new pairs that satisfy transitivity in a relation's context. This is a cornerstone for applications needing transitive closure of a relation .
The symmetric closure of a relation is formed by adding pairs such that if (a, b) is in the relation, then (b, a) must also be included. For example, given the relation on the set {(0, 1), (1, 1), (1, 2), (2, 0), (2, 2), (3, 0)}, its symmetric closure would include additional pairs {(1, 0), (2, 1), (0, 2), (0, 3)}, resulting in a symmetric set {(0, 1), (1, 0), (1, 1), (1, 2), (2, 1), (2, 0), (0, 2), (2, 2), (3, 0), (0, 3)} .