Subjects discrete mathematics

Relation Composition

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Search Solutions

Relation Composition


1. Given sets and relations: \(R = \{(1,2),(1,3),(2,3),(3,1),(3,3)\}\) \(S = \{(1,1),(1,3),(2,1),(2,3),(3,2)\}\) 2. First, find the complement of \(R\) over the set \(\{1,2,3\}\times\{1,2,3\}\) The universal set \(U = \{1,2,3\} \times \{1,2,3\} = \{(x,y) \mid x,y \in \{1,2,3\}\}\) with 9 elements. 3. The complement of \(R\), denoted \(\overline{R}\), is all pairs in \(U\) that are not in \(R\): \[ \overline{R} = U \setminus R = \{(1,1), (2,1), (2,2), (3,2)\} \] 4. Compute the composition \(S \circ \overline{R}\): By definition, \(S \circ \overline{R} = \{(a,c) \mid \exists b: (a,b) \in \overline{R} \text{ and } (b,c) \in S\}\). 5. Find all such pairs: - For \(a=1\), check \((1,b) \in \overline{R}\): \((1,1)\) only. Find \((1,c) \in S\) where \(b=1\): \((1,1), (1,3)\). So pairs \((1,1), (1,3)\) in composition. - For \(a=2\), check \((2,b) \in \overline{R}\): \((2,1), (2,2)\). For \(b=1\), \(S\) has \((1,1), (1,3)\). For \(b=2\), \(S\) has none (since no \((2,c)\) present in S? Actually, \(S\) has \((2,1), (2,3)\), so we should correct that). For \(b=1\), pairs: \( (2,1) \to (1,1), (1,3) \Rightarrow (2,1), (2,3) \) For \(b=2\), pairs: \( (2,2) \in \overline{R} \) and \((2,1), (2,3) \in S\) so \((2,1), (2,3)\) also in composition. Wait, the composition requires \((a,b) \in \overline{R}\) and \((b,c) \in S\). So for \(a=2\), \(b=1\) or \(2\). \((1,c) \in S\) are \((1,1), (1,3)\); \((2,c) \in S\) are \((2,1), (2,3)\). So from \(b=1\): \((2,1)\) implies \((2,1), (2,3)\) composition pairs. From \(b=2\): \((2,1), (2,3)\) composition pairs. Actually, for \(b=1\), \(S\) maps to \(c=1,3\) so \((2,1), (2,3)\) included. For \(b=2\), \(S\) maps to \(1,3\) as well. So from \((2,2)\) in \(\overline{R}\), composing with \(S\) gives \((2,1), (2,3)\). So total for \(a=2\): \((2,1), (2,3)\). - For \(a=3\), \(\overline{R}\) pairs: \((3,2)\). \(S\) pairs starting with \(2\): \((2,1), (2,3)\). So composition pairs: \((3,1), (3,3)\). 6. So \(S \circ \overline{R} = \{(1,1), (1,3), (2,1), (2,3), (3,1), (3,3)\}\). 7. Finally, find the inverse \(T = (S \circ \overline{R})^{-1} = \{(y,x) \mid (x,y) \in S \circ \overline{R} \}\): \[ T = \{(1,1), (3,1), (1,2), (3,2), (1,3), (3,3)\} \] 8. Writing \(T\) in Python set notation: \texttt{T = \{(1,1), (3,1), (1,2), (3,2), (1,3), (3,3)\}}