Problem:
Let A={1,2,3,4,5,6,7}, and let N be the number of functions f from set A to set A such that f(f(x)) is a constant function. Find the remainder when N is divided by 1000.
Solution:
Suppose that f is a function from A to A such that f(f(x)) is constant. Let aβA be the constant value of f(f(x)). Suppose that S={xβAβ£f(x)=a} has k elements. Note that aβS, and for xβ/S, f(x)βSβ{a}. It follows that one can choose such a function f by selecting a in one of 7 ways, selecting the other elements of S in (kβ16β) ways, and selecting values for f(x) for each xβ/S in (kβ1)7βk ways. Thus the number of functions is
k=1β7β7ββ
(kβ16β)β
(kβ1)7βk=0+7β
6+7β
240+7β
540+7β
240+7β
30+7β
1=7β
1057β
The requested remainder is then 7β
57=399β.
The problems on this page are the property of the MAA's American Mathematics Competitions