Back to Functions

Exercise 12

Avg difficulty 2.5

For each function given below, determine whether or not the function is injective and whether or not the function is surjective.

  1. f:N→Nf:\N \to \N given by f(n)=n+4f(n) = n+4.
  2. f:Z→Zf:\Z \to \Z given by f(n)=n+4f(n) = n+4.
  3. f:Z→Zf:\Z \to \Z given by f(n)=5n−8f(n) = 5n - 8.
  4. f:Z→Zf:\Z \to \Z given by f(n)={n/2 if n is even(n+1)/2 if n is odd.f(n) = \begin{cases}n/2 & \text{ if } n \text{ is even} \\ (n+1)/2 & \text{ if } n \text{ is odd} . \end{cases}

Levin, Discrete Mathematics: An Open Introduction (3rd ed.), §1.4 Functions, Exercise 12

AI Tutor

Adapted from Discrete Mathematics: An Open Introduction © 2013–2019 Oscar Levin. Licensed under CC BY-SA 4.0. Source: Discrete Mathematics: An Open Introduction. Imported at revision 1e2e26b.