Let X= {1, 2, 3, 4} and define f : X → X by
\begin{cases} f(x) = x + l & \quad x\leq 3, \\ f(4) = 1.\end{cases}Show that there is only one mapping g : X → X with the property that g(1) = 3 and f o g = g o f. Find g. Is it true that there is only one mapping h :X → X with h(1) = 1 and f o h = h o f ?
Suppose that g(1) = 3 and that f\circ g=g\circ f. Then we have f[g(1)]=f(3) = 4 and hence g[f(1)]=4, i.e.g(2) = 4. Now f[g(2)] =f(4)= 1 so g[f(2)] = 1, i.e. g(3) = 1. Finally, f[g(3)] =f(1) = 2 so g[f(3)] = 2, i.e. g(4) = 2. Thus we see that g is determined uniquely and is given by
g(x) = x + 2 (mod 4).
A similar argument shows that if h(l) = 1 then h is uniquely determined, and h=\operatorname{id}_{X}.