Answer
Give an explicit formula for a function from the set of
integers to the set of positive integers that is:
a)one-to-one, but not onto:
f(x) = 3x+3 if x>=0
3|x|+1 if x<0
b)onto, but not one-to-one
f(n) = |n|
or
f(n) = |n| +1
c) one-to-one and onto
f(n) = { 2n if n >=0
2|n|+1 if n<0
d) neither one to one or onto
f(x) = x^{2} + 1
Work Step by Step
Give an explicit formula for a function from the set of
integers to the set of positive integers that is:
a)one-to-one, but not onto:
f(x) = 3x+3 if x>=0
3|x|+1 if x<0
obviously every element will be unique and will map to a different image, but not all Z+ will be included in the range.
b)onto, but not one-to-one
f(n) = |n|
or
f(n) = |n| +1
Evey positive and negative element will map to the same number making the function not one-to-one, but every element in the Z+ will be included
c) one-to-one and onto
f(n) = { 2n if n >=0
2|n|+1 if n<0
this one to one and onto, every element that is positive will map to a 2 multiply while every negative element will map to any number in the range that is not a 2 multiply
d) neither one to one or onto
f(x) = x^{2} + 1
this is neither one to one or onto since not all the range is included and the every negative and positive element will map to the same value