# Preimage of a function …

Given a function $f: \mathbf{N}_0 \to \mathbf{N}_0$, defined $$f(x) = \begin{cases} x+3 & \text{if } x \in \mathbf{N}_{\text{even}} \\ x-1 & \text{if } x \in \mathbf{N}_{\text{odd}} \end{cases}$$

How can I find the preimage $f^{-1} ({1,2,3,4})$ ?

Any help would be appreciated

• Compute the first values of $\{ f(x) \mid x \in \mathbb N_0 \}$ and compare them with $1,2,3,4$. – Mauro ALLEGRANZA Jan 14 '18 at 11:23
• @MauroALLEGRANZA what does "compute" mean? – Marco Carta Jan 14 '18 at 11:26
• Just to elaborate: say you take the number $x=5$, then $f(5)=5-1=4$ and so IF this is the only $x$ that $f$ takes to 4, then we say the preimage $f^{-1}\lbrace 4\rbrace=\lbrace 5\rbrace$. – mort Jan 14 '18 at 11:39

From the definition $$f(x) = \begin{cases} x+3 & \text{if } x \in \mathbf{N}_{\text{even}} \\ x-1 & \text{if } x \in \mathbf{N}_{\text{odd}} \end{cases}$$ we get that odd numbers map to even numbers and even numbers map to odd numbers.
Since $f(x)=1$ is odd, $x$ is even. Thus $$f(x)=x+3=1$$ Thus the pre-image of $1$ does not exist in $N$
Similarly we find $$f^{-1}(2)=3, f^{-1}(3)=0 , f^{-1}(4)=5.$$ Therefore,$$f^{-1} ({1,2,3,4})=(?,3,0,5)$$
• The preimage of $1$ does not exist; $f$ is defined only on $\mathbf{N}_0$. – Sangchul Lee Jan 14 '18 at 11:43
• Mind you that $f:\mathbb{N}_0\to \mathbb{N}_0$, so we need to interpret $f^{-1}\lbrace 1\rbrace$ differently. – mort Jan 14 '18 at 11:43