I stumbled upon a funny fact:
Let $\mathbf{Bool} = \{0, 1 \}$. For all functions $f: \mathbf{Bool} \to \mathbf{Bool}$ it is the case that $f^3 = f$.
This got me excited and I was wondering whether there's anything similar for endofunctions on finite sets, but I quickly realised it does not generalise (at least in the straightforward way) to any larger cases.
So, I have two questions:
- Does this generalise in some way to endomorphisms on larger finite sets?
- Is there any "deeper" reason why the fact holds for boolean endomorphisms?
Thanks!
If we restrict our attention to bijections $f: S\rightarrow S$ of a set $S$ of size $n$, then elementary group theory tells us that $f^{n!+1} = f$.
While it is not true that for every function $f:S\rightarrow S$ there is some $m$ such that $f^m = f$, it is true that for every such function there are some $m \neq k$ and $k < n$ so that $f^m = f^k$. The reason for this is that $f^k$ must be a bijection on $f^k(S)$ for some $k < n$ (because $f^{p+1}(S) \subseteq f^p(S)$, and this can only be decreasing for so long before it is constant). Then apply the above observation to $f^k$.