# Question a6851

Feb 16, 2017

$f \left(n\right)$ is not bijective

#### Explanation:

We have:

$f : \mathbb{N} \to \mathbb{N}$
$f \left(n\right) = \left\{\begin{matrix}\frac{n + 1}{2} & \text{n is odd" \\ n/2 & "n is even}\end{matrix}\right.$

Lets tabulate the value of $f \left(n\right)$ for the first few Natural numbers to establish the pattern of how $f \left(n\right)$ works.

 {: ( n, "even/odd", "mapping", f(n)), ( 1, "odd", (1+1)/2, 1 ), ( 2, "even", 2/2, 1 ), ( 3, "odd", (3+1)/2, 2 ), ( 4, "even", 4/2, 2 ), ( 5, "odd", (5+1)/2, 3 ), ( 6, "even", 6/2, 3 ) :} #

And so the pattern is quite clear.

The definition of a bijective function (or one-to-one function) is that each element of the domain set is paired with exactly one element of the range set and vice versa.

We can see that the function $f \left(n\right)$ maps each consecutive pairs of natural numbers in the range set to a single number in the domain set, and therefore we concluse that:

$f \left(n\right)$ is not bijective

Feb 16, 2017

No it is not a bijection.

#### Explanation:

If $k$ is an odd integer, then $k + 1$ is even,

and $f \left(k\right) = \frac{k + 1}{2} = f \left(k + 1\right)$

Therefore, $f$ is not injective.

Bonus

$f$ is surjective.

For any integer $m$,

$2 m$ is an even integer and $f \left(2 m\right) = m$