Math for CS: Section 8.2 Review

Properties of Relations: Reflexive, Symmetric, & Transitive

Question 1

Define the Reflexive property for a relation \(R\) on a set \(A\) using formal notation.

Answer 1

A relation \(R\) on \(A\) is reflexive if: \[\forall x \in A, (x, x) \in R\] In a directed graph, this means every vertex has a self-loop.

Question 2

Define the Symmetric property for a relation \(R\) on a set \(A\).

Answer 2

A relation \(R\) on \(A\) is symmetric if: \[\forall x, y \in A, \text{ if } (x, y) \in R, \text{ then } (y, x) \in R\] In a directed graph, if there is an arrow from \(x\) to \(y\), there must be a return arrow from \(y\) to \(x\).

Question 3

Define the Transitive property for a relation \(R\) on a set \(A\).

Answer 3

A relation \(R\) on \(A\) is transitive if: \[\forall x, y, z \in A, \text{ if } (x, y) \in R \text{ and } (y, z) \in R, \text{ then } (x, z) \in R\] In a directed graph, if you can go from \(x\) to \(y\) and \(y\) to \(z\), there must be a direct shortcut from \(x\) to \(z\).

Question 4

Let \(A = \{1, 2, 3\}\). Is \(R = \{(1, 1), (2, 2)\}\) reflexive on \(A\)?

Answer 4

No. For \(R\) to be reflexive on \(A\), every element in \(A\) must be related to itself. Since \((3, 3) \notin R\), the relation is not reflexive.

Question 5

Consider \(A = \{1, 2, 3\}\) and \(R = \{(1, 2), (2, 1), (1, 1)\}\). Is \(R\) symmetric?

Answer 5

Yes. - For \((1, 2)\), the reverse \((2, 1)\) is in \(R\). - For \((2, 1)\), the reverse \((1, 2)\) is in \(R\). - For \((1, 1)\), the reverse is itself, which is in \(R\).

Question 6

Let \(R\) be the relation on \(\mathbb{Z}\) defined by \(xRy \iff x < y\). Is \(R\) reflexive?

Answer 6

No. For any \(x \in \mathbb{Z}\), it is never true that \(x < x\). Therefore, \((x, x) \notin R\) for any \(x\).

Question 7

Let \(R\) be the relation on \(\mathbb{Z}\) defined by \(xRy \iff x \le y\). Is \(R\) transitive?

Answer 7

Yes. If \(x \le y\) and \(y \le z\), then by the transitive property of real numbers, \(x \le z\). Thus, if \((x, y) \in R\) and \((y, z) \in R\), then \((x, z) \in R\).

Question 8

What is the transitive closure of the relation \(R = \{(1, 2), (2, 3)\}\)?

Answer 8

The transitive closure \(R^t\) is the smallest transitive relation containing \(R\). We must add \((1, 3)\) to satisfy transitivity. \[R^t = \{(1, 2), (2, 3), (1, 3)\}\]

Question 9

In a directed graph, how do you visually identify a symmetric relation?

Answer 9

Every edge between two distinct vertices must be “double-headed” (or have two arrows, one in each direction). If there is an arrow from \(u\) to \(v\), there must be one from \(v\) to \(u\).

Question 10

Is the relation \(R = \{(1, 2), (2, 1)\}\) transitive on the set \(A = \{1, 2\}\)?

Answer 10

No. Since \((1, 2) \in R\) and \((2, 1) \in R\), transitivity requires that \((1, 1)\) must be in \(R\). Since \((1, 1) \notin R\), it is not transitive. (Similarly, \((2, 2)\) is also missing).

Question 11

Prove that \(xRy \iff 3 \mid (x - y)\) is symmetric.

Answer 11

  1. Assume \((x, y) \in R\). Then \(3 \mid (x - y)\), so \(x - y = 3k\) for some integer \(k\).
  2. Then \(y - x = -(x - y) = -3k = 3(-k)\).
  3. Since \(-k\) is an integer, \(3 \mid (y - x)\).
  4. Thus, \((y, x) \in R\).

Question 12

Let \(R\) be a relation on \(A = \{a, b, c\}\) represented by this matrix:

# Rows/Cols: a, b, c
matrix = [
    [1, 0, 0],
    [0, 1, 0],
    [0, 0, 1]
]

Is this relation reflexive, symmetric, and/or transitive?

Answer 12

All three. - Reflexive: Diagonal is all 1s. - Symmetric: The matrix is equal to its transpose. - Transitive: If \(xRy\) and \(yRz\), then \(x=y\) and \(y=z\), so \(x=z\). (This is the Equality relation).

Question 13

If a relation is symmetric, does it have to be reflexive?

Answer 13

No. Example: \(A = \{1, 2\}\) and \(R = \{(1, 2), (2, 1)\}\). It is symmetric, but not reflexive because \((1, 1)\) and \((2, 2)\) are missing.

Question 14

Determine if \(aRb \iff a+b\) is even is transitive on \(\mathbb{Z}\).

Answer 14

Yes. \(a+b\) is even \(\implies a, b\) have the same parity (both even or both odd). If \(a, b\) same parity and \(b, c\) same parity, then \(a, c\) must have the same parity. Therefore \(a+c\) is even.

Question 15

True or False: A relation that is not symmetric must be “anti-symmetric.”

Answer 15

False. Symmetry and Anti-symmetry are not opposites. A relation can be: - Both (e.g., \(\{(1, 1)\}\)) - Neither (e.g., \(\{(1, 2), (2, 1), (2, 3)\}\)) - Just one or the other.