Skip to main content

2026 AIME I Problem 7

Problem 7 of 15IntermediateCombinatoricsProblem-Solving Techniques

Find the number of functions π\pi mapping the set A={1,2,3,4,5,6}A = \{1, 2, 3, 4, 5, 6\} onto AA such that for every a∈A,a \in A, π(π(π(π(π(π(a))))))=a.\pi(\pi(\pi(\pi(\pi(\pi(a)))))) = a.

Your answer

Integer from 0 to 999
Show solution

Solution

A function from a finite set onto itself is a bijection, so π\pi is a permutation of six elements, and the condition says π6\pi^6 is the identity. A permutation satisfies π6=id\pi^6 = \mathrm{id} exactly when every cycle in its cycle decomposition has length dividing 6.6. Among the possible lengths 11 through 6,6, only 44 and 55 fail to divide 6.6. We subtract the permutations containing a 44-cycle or a 55-cycle from 6!=720.6! = 720. Cycle type 4+1+14+1+1 gives 6!4⋅2!=90,\frac{6!}{4 \cdot 2!} = 90, type 4+24+2 gives 6!4⋅2=90,\frac{6!}{4 \cdot 2} = 90, and type 5+15+1 gives 6!5=144,\frac{6!}{5} = 144, for 90+90+144=32490 + 90 + 144 = 324 excluded permutations. The count is 720−324=396.720 - 324 = 396.
AoPS wiki

Tagged: permutations · complementary counting · casework

More practice