Give an example of a function from N to N which is (a) one-to-one but not onto (b) onto but not one-to-one (c) both one-to-one and onto (d) neither one-to-one nor onto. Solution a) & c ) : y = x , b ) y = 1 + | x-2| , x in N a) f(x) = x+5 b) f(x) = 1, for x= 1, 2, 3 = x - 1, for x > 3 c) f(x) = x+5 d) f(x) = 3.