1. **Problem statement:** We want to find the number of functions $f:\{1,2,\ldots,10\} \to \{1,2,\ldots,10\}$ such that $f(f(i))=i$ for all $i \in \{1,2,\ldots,10\}$.
2. **Understanding the condition:** The condition $f(f(i))=i$ means that applying $f$ twice returns the original input. Such a function is called an involution.
3. **Key property of involutions:** Every involution can be decomposed into disjoint cycles of length 1 or 2 only. This is because if a cycle had length greater than 2, applying $f$ twice would not return to the original element.
4. **Counting involutions:** We need to count the number of ways to partition the set $\{1,2,\ldots,10\}$ into fixed points (1-cycles) and 2-cycles.
5. **Formula for number of involutions:** The number of involutions on a set of size $n$ is given by:
$$
I_n = \sum_{k=0}^{\lfloor n/2 \rfloor} \frac{n!}{k! \, 2^k \, (n-2k)!}
$$
where $k$ is the number of 2-cycles.
6. **Applying the formula for $n=10$:**
Calculate
$$
I_{10} = \sum_{k=0}^5 \frac{10!}{k! \, 2^k \, (10-2k)!}
$$
7. **Calculate each term:**
- For $k=0$: $\frac{10!}{0! \, 2^0 \, 10!} = 1$
- For $k=1$: $\frac{10!}{1! \, 2^1 \, 8!} = \frac{10 \times 9}{2} = 45$
- For $k=2$: $\frac{10!}{2! \, 2^2 \, 6!} = \frac{10 \times 9 \times 8 \times 7}{2 \times 4} = 630$
- For $k=3$: $\frac{10!}{3! \, 2^3 \, 4!} = \frac{10 \times 9 \times 8 \times 7 \times 6 \times 5}{6 \times 8 \times 24} = 3150$
- For $k=4$: $\frac{10!}{4! \, 2^4 \, 2!} = \frac{10 \times 9 \times 8 \times 7 \times 6 \times 5 \times 4 \times 3}{24 \times 16 \times 2} = 4725$
- For $k=5$: $\frac{10!}{5! \, 2^5 \, 0!} = \frac{10 \times 9 \times 8 \times 7 \times 6 \times 5 \times 4 \times 3 \times 2 \times 1}{120 \times 32} = 945$
8. **Sum all terms:**
$$
I_{10} = 1 + 45 + 630 + 3150 + 4725 + 945 = 9496
$$
**Final answer:** There are $\boxed{9496}$ such functions.
Involution Count 3Ec8Dc
Step-by-step solutions with LaTeX - clean, fast, and student-friendly.