A function f from the set of natural numbers to integers defined by

f(n) = (n-1)/2, when n is odd

f(n) = -n/2, when n is even

- one-one and onto both
- one-one and but not onto
- neither one-one nor onto
- onto but not one-one

**Solution**

If n is odd, let n = 2k - 1

f(2k_{1} - 1) = f(2k_{2} - 1)

2k_{1} - 1 + 1/2 = 2k_{2} - 1 + 1/2

k_{1} = k_{2}

f(n) is one-one function, if n is odd.

If n is even, let n = 2k

f(2k_{1}) = f(2k_{2})

k_{1} = k_{2}

f(n) is one-one function, if n is even.

Also, f'(n) is increasing, when n is odd and f'(n) is decreasing, when n is even.

**The correct option is A.**