I'm aware that f isn't bijective so it cannot have an inverse function. So g cannot be an inverse function to f. Knowing this, I know some people express such undefined inverses in terms of a piecewise function but I'm not too sure.
Can someone help me out on this please?
I guess if g : Z → Z is defined by $(n-2)/3$ that would be make g ◦ f the identity function on Z, I'm not too sure though.
Edit: I understand that $(n-2)/3$ can't be the inverse to f but how can I work out the title?