2013 AIME II Problem 11

Attempt Problem 11 of the 2013 AIME II below, then check your answer against the professionally curated solution from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 2013 AIME II solutions, or check the answer key.

All problems are used with official legal permission of the Mathematical Association of America (MAA).

11.

Let A={1,2,3,4,5,6,7},A = \{1, 2, 3, 4, 5, 6, 7\}, and let NN be the number of functions ff from set AA to set AA such that f(f(x))f(f(x)) is a constant function. Find the remainder when NN is divided by 1000.1000.
Answer: 399
Concepts:functioncombinationscasework
Small hint:
If f(f(x))=af(f(x)) = a always, let SS be the set of elements that ff sends to a.a. Show f(a)=af(a) = a and every element outside SS maps into S∖{a}S \setminus \{a\}
Big hint:
With ∣S∣=k:|S| = k: choose a,a, choose the rest of S,S, then send each of the 7−k7 - k outside elements anywhere in S∖{a},S \setminus \{a\}, and sum over kk
Solution:
Say f(f(x))=af(f(x)) = a for all x,x, and let S={x:f(x)=a}.S = \{x : f(x) = a\}. Picking any t∈S,t \in S, we get a=f(f(t))=f(a),a = f(f(t)) = f(a), so a∈S.a \in S. Every xx satisfies f(x)∈Sf(x) \in S (because f(f(x))=af(f(x)) = a), and if x∉Sx \notin S then f(x)≠a,f(x) \ne a, so ff maps the complement of SS into S∖{a}.S \setminus \{a\}. Conversely, any ff built this way works.
If ∣S∣=k,|S| = k, we choose the constant aa in 77 ways, the remaining k−1k - 1 elements of SS in (6k−1)\binom{6}{k-1} ways, and an image in S∖{a}S \setminus \{a\} for each of the 7−k7 - k other elements in (k−1)7−k(k-1)^{7-k} ways. Hence N=7∑k=17(6k−1)(k−1)7−k=7(0+6+240+540+240+30+1)=7⋅1057=7399. \begin{aligned} N &= \scriptsize 7\sum_{k=1}^{7} \binom{6}{k-1}(k-1)^{7-k} \\ &\scriptsize = 7\,(0 + 6 + 240 + 540 + 240 + 30 + 1) \\ &= 7 \cdot 1057 = 7399. \end{aligned}
The remainder when NN is divided by 10001000 is 399.399.
LIVE by Po-Shen Loh
Programs

LIVE Classes

Self-Paced Classes

Stars

Scholarship

About Us

Who Is Po-Shen Loh?

Email Contact

Newsletter

Jobs

Become a Star

For a more Thought Full world.

© 2026 Expii, Inc.