If $f: \mathbb{Z\to Z}$ and $G: \mathbb{Z\to Z}$, find $f$, and $g$ such that $f(g(x))=x\neq g(f(x))$.
I can find lots of $f$ and $g$ that aren't equal when composed with each other, but I have no idea how to proceed. A hint would be helpful.
Thanks in advance.
E.g. $\ g(n):=2n$, $f(2n):=n$ and you can do anything on the odds...
Note that we won't have $x\ne g(f(x))$ for all $x$ as, if $x=g(y)$ for some $y$, then $g(f(x))=g(f(g(y)))=g(\,y\,)=x$.