Skip to main contentSkip to solution

Let N be set of natural numbers, then the function f:N→Nf: \mathbb{N} \rightarrow \mathbb{N}, defined by

f(x)={n+12, if n is oddn2, if n is evenf(x) = \begin{cases} \frac{n+1}{2} & \text{, if } n \text{ is odd} \\ \frac{n}{2} & \text{, if } n \text{ is even} \end{cases}, is

Solution

✅ Correct Option: 2

The function takes a natural number and:

  • If nn is odd: f(n)=n+12f(n) = \frac{n+1}{2}
  • If nn is even: f(n)=n2f(n) = \frac{n}{2}

Examples:

f(1)=1+12=1f(1) = \frac{1+1}{2} = 1

f(2)=22=1f(2) = \frac{2}{2} = 1

f(3)=3+12=2f(3) = \frac{3+1}{2} = 2

f(4)=42=2f(4) = \frac{4}{2} = 2

f(5)=5+12=3f(5) = \frac{5+1}{2} = 3


To check if the function is injective, consider whether different inputs can produce the same output.

f(1)=1f(1) = 1

f(2)=1f(2) = 1

Since f(1)=f(2)f(1) = f(2) but 1≠21 \neq 2, the function is not injective.


To check if the function is surjective, determine whether every natural number kk can be reached as an output.

For any natural number kk, let n=2kn = 2k.

Then f(2k)=2k2=kf(2k) = \frac{2k}{2} = k

Examples:

For k=1k = 1: f(2)=1f(2) = 1

For k=5k = 5: f(10)=5f(10) = 5

For k=100k = 100: f(200)=100f(200) = 100

Every natural number is reachable as an output, so the function is surjective.


The function is surjective but not injective.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question