Calculus

Set Theory

Set Theory Logo

Operations on Relations

Solved Problems

Example 1.

The relations \(R = \left\{ {\left( {0,2} \right),\left( {1,0} \right),\left( {1,2} \right),\left( {2,0} \right)} \right\}\) and \(S = \left\{ {\left( {1,0} \right),\left( {1,1} \right),\left( {1,2} \right),\left( {2,2} \right)} \right\}\) are defined on the set \(A = \left\{ {0,1,2} \right\}.\) Find the union of \(R\) and \(S\) in matrix form.

Solution.

First we convert the relations \(R\) and \(S\) from roster to matrix form:

\[R = \left\{ {\left( {0,2} \right),\left( {1,0} \right),\left( {1,2} \right),\left( {2,0} \right)} \right\},\;\; \Rightarrow {M_R} = \left[ {\begin{array}{*{20}{c}} 0&0&1\\ 1&0&1\\ 1&0&0 \end{array}} \right];\]
\[S = \left\{ {\left( {1,0} \right),\left( {1,1} \right),\left( {1,2} \right),\left( {2,2} \right)} \right\},\;\; \Rightarrow {M_S} = \left[ {\begin{array}{*{20}{c}} 0&0&0\\ 1&1&1\\ 0&0&1 \end{array}} \right].\]

By adding the matrices \(M_R\) and \(M_S\) we find the matrix of the union of the binary relations:

\[{M_{R \cup S}} = {M_R} + {M_S} = \left[ {\begin{array}{*{20}{c}} 0&0&1\\ 1&0&1\\ 1&0&0 \end{array}} \right] + \left[ {\begin{array}{*{20}{c}} 0&0&0\\ 1&1&1\\ 0&0&1 \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} 0&0&1\\ 1&1&1\\ 1&0&1 \end{array}} \right].\]

The answer can be represented in roster form:

\[R \cup S = \left\{ {\left( {0,2} \right),\left( {1,0} \right),\left( {1,1} \right),\left( {1,2} \right),\left( {2,0} \right),\left( {2,2} \right)} \right\}.\]

Example 2.

The relations \(R = \left\{ {\left( {a,a} \right),\left( {b,a} \right),}\right.\) \(\left.{\left( {c,c} \right),\left( {b,d} \right),} \right.\) \(\left.{\left( {c,d} \right),\left( {d,a} \right),\left( {d,c} \right)} \right\}\) and \(S = \left\{ {\left( {a,b} \right),\left( {b,a} \right),\left( {c,a} \right),} \right.\) \(\left.{\left( {c,d} \right),\left( {d,a} \right),\left( {d,b} \right)} \right\}\) are defined on the set \(B = \left\{ {a,b,c,d} \right\}.\) Find the intersection of \(R\) and \(S\) in matrix form.

Solution.

The relations \(R\) and \(S\) are represented in matrix form as follows:

\[R = \left\{ {\left( {a,a} \right),\left( {b,a} \right),\left( {b,d} \right),\left( {c,c} \right),\left( {c,d} \right),\left( {d,a} \right),\left( {d,c} \right)} \right\},\;\; \Rightarrow {M_R} = \left[ {\begin{array}{*{20}{c}} 1&0&0&0\\ 1&0&0&1\\ 0&0&1&1\\ 1&0&1&0 \end{array}} \right];\]
\[S = \left\{ {\left( {a,b} \right),\left( {b,a} \right),\left( {c,a} \right),\left( {c,d} \right),\left( {d,a} \right),\left( {d,b} \right)} \right\},\;\; \Rightarrow {M_S} = \left[ {\begin{array}{*{20}{c}} 0&1&0&0\\ 1&0&0&0\\ 1&0&0&1\\ 1&1&0&0 \end{array}} \right].\]

To find the intersection \(R \cap S,\) we multiply the corresponding elements of the matrices \(M_R\) and \(M_S\). This operation is called Hadamard product and it is different from the regular matrix multiplication. So, we have

\[{M_{R \cap S}} = {M_R} * {M_S} = \left[ {\begin{array}{*{20}{c}} 1&0&0&0\\ 1&0&0&1\\ 0&0&1&1\\ 1&0&1&0 \end{array}} \right] * \left[ {\begin{array}{*{20}{c}} 0&1&0&0\\ 1&0&0&0\\ 1&0&0&1\\ 1&1&0&0 \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} 0&0&0&0\\ 1&0&0&0\\ 0&0&0&1\\ 1&0&0&0 \end{array}} \right].\]

Converting back to roster form, we obtain

\[R \cap S = \left\{ {\left( {b,a} \right),\left( {c,d} \right),\left( {d,a} \right)} \right\}.\]

Example 3.

Let \(A = \left\{ {1,2,3} \right\}.\) The relation \(R\) on set \(A\) is defined by the digraph.

Digraph of a relation on a set of 3 elements.

Find the combined relation \(\overline {R^T} \backslash R,\) where \(\overline {R^T}\) denotes the complement of the converse relation.

Solution.

To get the converse relation \(R^T,\) we reverse the edge directions.

Converse of the relation R with edges in the opposite direction.

The complementary relation \(\overline{R^T}\) can be determined as the difference between the universal relation \(U\) and the converse relation \(R^T:\)

\[\overline{R^T} = U\backslash {R^T}.\]
Complementary relation for the converse relation of R.

Now we can find the difference of the relations \(\overline {{R^T}} \backslash R:\)

An example of combined relation on a set of 3 elements.

In roster form, the answer is written as

\[\overline {{R^T}} \backslash R = \left\{ {\left( {1,1} \right),\left( {2,3} \right),\left( {3,2} \right)} \right\}.\]

Example 4.

Let \(B = \left\{ {a,b,c,d} \right\}.\) The relation \(S\) on set \(B\) is defined by the digraph.

Digraph of a relation on a set of 4 elements.

Find the combined relation \(\overline {S \cap {S^T}},\) where \({S^T}\) denotes the converse relation of \(S.\)

Solution.

The converse relation \(S^T\) is represented by the digraph with reversed edge directions.

Converse relation S^T - example 2

Find the intersection of \(S\) and \(S^T:\)

Intersection of the original relation S and its converse S^

The complementary relation \(\overline {S \cap {S^T}} \) has the form

The complement of the intersection of two relations.

Example 5.

Prove that the symmetric difference of two reflexive relations is irreflexive.

Solution.

Let \(R\) and \(S\) be relations defined on a set \(A.\)

Since \(R\) and \(S\) are reflexive we know that for all \(a \in A,\) \(\left( {a,a} \right) \in R\) and \(\left( {a,a} \right) \in S.\)

The difference of the relations \(R \backslash S\) consists of the elements that belong to \(R\) but do not belong to \(S\). Hence, \(R \backslash S\) does not contain the diagonal elements \(\left( {a,a} \right),\) i.e. it is irreflexive.

Similarly, we conclude that the difference of relations \(S \backslash R\) is also irreflexive.

By definition, the symmetric difference of \(R\) and \(S\) is given by

\[R \,\triangle\, S = \left( {R \backslash S} \right) \cup \left( {S \backslash R} \right).\]

So we need to prove that the union of two irreflexive relations is irreflexive. Suppose that this statement is false. If the union of two relations is not irreflexive, its matrix must have at least one \(1\) on the main diagonal. This is only possible if either matrix of \(R \backslash S\) or matrix of \(S \backslash R\) (or both of them) have \(1\) on the main diagonal. However this contradicts to the fact that both differences of relations are irreflexive. Thus the proof is complete.

We conclude that the symmetric difference of two reflexive relations is irreflexive.

Example 6.

Prove that the union of two antisymmetric relations need not be antisymmetric.

Solution.

We can prove this by means of a counterexample.

Consider the set \(A = \left\{ {0,1} \right\}\) and two antisymmetric relations on it:

\[R = \left\{ {\left( {1,2} \right),\left( {2,2} \right)} \right\},\;\;S = \left\{ {\left( {1,1} \right),\left( {2,1} \right)} \right\}.\]

Compose the union of the relations \(R\) and \(S:\)

\[R \cup S = \left\{ {\left( {1,2} \right),\left( {2,2} \right)} \right\} \cup \left\{ {\left( {1,1} \right),\left( {2,1} \right)} \right\} = \left\{ {\left( {1,1} \right),\left( {1,2} \right),\left( {2,1} \right),\left( {2,2} \right)} \right\}.\]

We get the universal relation \(R \cup S = U,\) which is always symmetric on an non-empty set. Hence, \(R \cup S\) is not antisymmetric.

Page 1 Page 2