Correct Answer is (D) many - one and onto.
f(1) = 1
f(2) = 1
f(3) = 2
f(4) = 2
f(5) = 3
f(6) = 3
Since at different values of x we get same value of y ∴f(n) is many –one
And range of f(n) = N = N(codomain)
∴ the function f: N → Z, defined by
\(f:N→N:f(x)=\begin{cases}\frac{1}{2}(n+1), \text{ when n is odd}\\ \frac{n}{2},\text{when n is even}\end{cases}\)
is both many - one and onto.