Question #a6851

2 Answers
Feb 16, 2017

f(n) is not bijective

Explanation:

We have:

f : NN -> NN
f(n) = { ( (n+1)/2, "n is odd"), (n/2, "n is even") :}

Lets tabulate the value of f(n) for the first few Natural numbers to establish the pattern of how f(n) 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(n) 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(n) 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(k) = (k+1)/2 = f(k+1)

Therefore, f is not injective.

Bonus

f is surjective.

For any integer m,

2m is an even integer and f(2m) = m