Ciaran said:
It's the conditions that are proving to be tricky to me- for the surjective function, does it mean my function can only generate integer values ?
Not precisely.
The fact that we're limiting ourselves to functions from Z to N, respectively N to Z, implies that the function can only generate integer values.
As yet that is unrelated to whether it is surjective or not.
Ciaran said:
I'm pretty sure g(x)= x! and f(x)=x^2 are injective and surjective, respectively
Sorry, but no.
For starters, I assume you are talking about functions from Z to N.
If so, then g is then undefined for negative values, meaning it is not a function from Z to N (depending on the definition of function you're using).
Another problem with g is the g(x)=1 has 2 originals, and is therefore not injective (see below).
And the problem with f is that f(x)=3 has no originals, and is therefore not surjective.
To be clear, injective means that every element in the codomain has
at most 1 original.
And surjective means that every element in the codomain has
at least 1 original.