CSCI 301 L20 Worksheet

Lecture 20 - Exercises

Part A - Functions: Domain, Range, and Codomain

  1. There are four diļ¬€erent functions \(f: \{a, b\} \rightarrow \{0, 1\}\). Draw a diagram for each one.
  2. 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 B - 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\).

Part C - Inverse Functions

  1. Prove that \(f: \mathbb{R} - \{2\} \rightarrow \mathbb{R} - \{5\}\) defined by \(f(x) = \frac{5x + 1}{x - 2}\) is bijective.
  2. Find the inverse \(f^{-1}\) of the function \(f\) from the prior problem.