CSCI 301 L19 Worksheet

Lecture 19 - Exercises

Part A - Equivalence Relations and Equivalence Classes

Let \(A = \{-1, 1, 2, 3, 4\}\).

  1. Consider the relation \(R_1 = \{(-1, 1), (1,1), (2, 2), (3, 3), (4, 4)\}\). Notice that this is the “equals” (\(=\)) relation.
    1. Give the members of each of the following equivalence classes:
      • \([-1]\)
      • \([2]\)
      • \([4]\)
    2. How many equivalence classes does \(R_1\) have over \(A\)?
  2. Consider the relation \(R_2\), which is “has the same parity as” on the set \(A\).
    1. Draw the relationship in diagram form.
    2. Give the members of each of the following equivalence classes:
      • \([-1]\)
      • \([2]\)
      • \([4]\)
    3. How many equivalence classes does \(R_2\) have over \(A\)?
    4. What are the equivalence classes?
  3. Describe (in words is fine) the equivalence classes of the equivalence relation \(\equiv \pmod{3}\).
  4. Let \(A=\{a,b,c,d,e\}\). Suppose \(R\) is an equivalence relation on \(A\). Suppose \(R\) has two equivalence classes, and we know that \(aRd\), \(bRc\) and \(eRd\). Write out \(R\) as a set.
  5. Define a relation \(R\) on \(\mathbb{Z}\) such that \(xRy\) if and only if \(3x−5y\) is even. Prove \(R\) is an equivalence relation. Describe its equivalence classes.

Part B - Functions

  1. For the five relations pictured in each of the following diagrams, determine whether it’s a function or not.

  2. There are four different functions \(f: \{a, b\} \rightarrow \{0, 1\}\). Draw a diagram for each one. Diagrams will suffice.

  3. Let the function \(f : \{a, b, c\} \rightarrow \{1, 2, 3\}\) be \(\{(a, 1), (b, 1), (c, 2)\}\). What are the domain, codomain, and range of \(f\)?

Part C - Properties of Functions

  1. Let \(A=\{1,2,3,4\}\) and \(B=\{a,b,c,d\}\). Give an example of a function \(f: A \rightarrow B\) that is bijective.
  2. If \(A=\{1,2,3,4\}\) and \(B=\{a,b,c,\}\), how many bijective functions \(f: A \rightarrow B\) are there? Consider drawing a diagram.
  3. Verify whether each of the following functions is injective and whether it is surjective.
    1. A function \(f: \mathbb{Z} \rightarrow \mathbb{Z}\) defined by \(f(n) = 2n + 1\).
    2. A function \(f: \mathbb{Z} \times \mathbb{Z} \rightarrow \mathbb{Z}\) defined by \(f((m, n)) = 2n - 4m\).
    3. A function \(f: \mathbb{Z} \times \mathbb{Z} \rightarrow \mathbb{Z}\) defined by \(f((m, n)) = 3n - 4m\).