Let $f :A \to A$, where $A=\{1,2,3,4,5,6,7\}$. Then number of functions such that $f(f(f(x)))= x$, for all $x$ belonging to $A$.
I could understand that $f(f(x))$ would be inverse of $f(x)$. But then how to do counting?
Let $f :A \to A$, where $A=\{1,2,3,4,5,6,7\}$. Then number of functions such that $f(f(f(x)))= x$, for all $x$ belonging to $A$.
I could understand that $f(f(x))$ would be inverse of $f(x)$. But then how to do counting?
That is equivalent to find elements of order $3$ in the symmetric group $S_7$ because all of the functions we want are bijective (and so permutations).
If $f$ represents a $3$-cycle, then there are $2{7\choose 3} = 70$ elements. (e.g. $(123),(132)$.)
If $f$ represents a product of two disjoint $3$-cycles, then there are $2{7\choose 3}\cdot 2{4\choose 3}/2 = 280$ such elements. (e.g. $(123)(456)$.)
The trivial $f$ is also an element.
Hence there are $351$ such functions in total.