Back to Relations and Functions

Exercise 10

Avg difficulty 2.5

Consider the function f:Z→Zf:\Z \to \Z given by f(n)={n+1 if n is evenn−3 if n is odd.f(n) = \begin{cases}n+1 & \text{ if }n\text{ is even} \\ n-3 & \text{ if }n\text{ is odd} . \end{cases}

  1. Is ff injective? Prove your answer.

  2. Is ff surjective? Prove your answer.

Hammond, Discrete Math for Shockers, §1.3 Relations and Functions, Exercise 10

AI Tutor

Adapted from Discrete Math for Shockers © 2021 John Hammond. Licensed under CC BY-SA 4.0. Source: Discrete Math for Shockers. Imported at revision 2538beb.