-1

Let $X$ be a set consisting of 5 elements. Let $$A = \{f : X \to X; f(f(x)) = x, \forall x \in X\}.$$ Compute the number of elements of $A$.

To count the number of functions in $A$, we can use the following method:

Pick an element $x$ in $X$. There are $5$ choices for $f(x)$ (it can be any of the $5$ elements in $X$). Once $f(x)$ is chosen, we know that $f(f(x)) = x$, so there are only two choices for $f(f(x))$: it can either be x $(if f(x) = x)$ or one of the $4$ remaining elements in $X$ (if $f(x)$ is one of the other $4$ elements in X)$.

Let's consider the two cases separately:

Case $1: f(x) = x$ In this case, we know that $f(f(x)) = x$, so $f(x)$ must be one of the fixed points of the function (i.e., one of the elements in $X$ that satisfies $f(x) = x)$. There are $5$ choices for $x$ and once $x$ is chosen, there are $4$ choices for $f(f(x))$ (it can be any of the $4$ remaining elements in $X$). For the remaining $3$ elements in $X$, there are $4$ choices for each element, since each element can be mapped to any of the $4$ remaining elements in X. Therefore, there are $5 * 4 * 4 * 4 = 320$ functions in $A$ that have a fixed point.

Case 2: $f(x) ≠ x$ In this case, we know that $f(f(x)) ≠ x$, so $f(f(x))$ must be one of the $3$ remaining elements in $X$ (since $f(x)$ cannot be one of the $2$ elements that are already determined). There are $5$ choices for $x$, and once $x$ is chosen, there are $4$ choices for $f(x)$ (it can be any of the $4$ remaining elements in $X)$. Then there are $3$ choices for $f(f(x))$, and $3$ choices for $f(f(f(x)))$, since f(f(x)) cannot be $x$ or $f(x)$. For the remaining element in $X$, there are $4$ choices for where to map it. Therefore, there are $5 * 4 * 3 * 3 * 4 = 720$ functions in $A$ that do not have a fixed point.

Putting the two cases together, we see that the total number of functions in $A$ is $320 + 720 = 1040$. Therefore, there are $1040$ functions in $A$ that satisfy the condition $f(f(x)) = x$ for each $x ∈ X$.

Right?

Robert Z
  • 147,345
Abcd
  • 447
  • Solution verification questions need context on what part of the argument presented the user is unsure of and why. You have been told this before. – Shaun May 11 '23 at 19:31
  • Use $\times$ for $\times$. – Shaun May 11 '23 at 19:32
  • 1
    First of all, such functions must be invertible. You should know that the set of invertible functions over a set with 5 elements has exactly $5!=120$ functions. Evidently 1040 is too big. – Crostul May 11 '23 at 19:38

1 Answers1

1

The condition implies $f$ is a permutation of order $\leqslant 2$. So number of elements in $A$ equals number of elements of order 2 in $S_{5}$ plus the number of elements of order 1 in $S_{5}$. The number of elements of order 2 in $S_{5}$ is 25 and the identity element is the only element of order 1 in $S_{5}$, hence a total of 26.

Arghan
  • 581
  • 1
    This question seems not to meet the standards for the site. Instead of answering it, it would be better to look for a good duplicate target, or help the user by posting comments suggesting improvements. Please also read the meta announcement regarding quality standards. – Shaun May 11 '23 at 19:42