retagged by
383 views
5 votes
5 votes

The below function is defined from a set of all positive integers to a set of all integers.

$f(n) = \left\{\begin{matrix} (n-1)/2\;;& \text{if}\; n \;\text{is odd} \\ -n/2\;;& \text{if}\; n\;\text{is even} \end{matrix}\right.$             

Which of the following statements is true?

  1. It is one to one but not onto
  2. It is onto but not one-one
  3. It is bijection
  4. It is neither One-One nor Onto
retagged by

1 Answer

Best answer
4 votes
4 votes
$f(n)$ is : $Z^+\rightarrow Z$
$0$ is neither positive nor negative. Hence, $0 \notin  Z^+$

$f(1) = 0; \hspace{0.5cm} f(3) = 1;\hspace{0.5cm}  f(5) = 2;$ and so on…
$f(2) = -1;\hspace{0.5cm}  f(4) = -2;\hspace{0.5cm}  f(6) = -3;$ and so on…

We can see, $f(n)$ is One to One and Onto $\implies$ bijection.
selected by
Answer:

Related questions