Composed function ..

48 Views Asked by At

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} $$

Is the composed function $f o f = x + 2$ if $x ∈ {N}_0$ ?

2

There are 2 best solutions below

2
On

The answer is yes. If you want to justify it, simply note that for $x$ even and $y$ odd we always have $x+y$ is odd.

0
On

There are two cases to consider:

  • If $x$ is even, then $f(x) = x+3$ will give us an odd number and $f(f(x)) = (x+3)-1 = x+2$.

  • If $x$ is odd, then $f(x) = x-1$ will give us an even number and $f(f(x)) = (x-1)+3 = x+2$.

Therefore, in general, $f\circ f = x+2$. So you're correct.