IMO 1987 · Problem 1

Let \(p_n(k)\) be the number of permutations of the set \(\{1,\ldots,n\}\), \(n\geq 1\), which have exactly \(k\) fixed points. Prove that \[ \sum_{k=0}^{n} k\cdot p_n(k)=n!. \]

(Remark: A permutation \(f\) of a set \(S\) is a one-to-one mapping of \(S\) onto itself. An element \(i\) in \(S\) is called a fixed point of the permutation \(f\) if \(f(i)=i\).)

Official text of the problem. Official problem paper (PDF)

Solution

We count in two ways the pairs \((f,i)\), where \(f\) is a permutation of \(\{1,\ldots,n\}\) and \(i\) is a fixed point of \(f\).

A permutation with exactly \(k\) fixed points occurs in exactly \(k\) such pairs. Since there are \(p_n(k)\) such permutations, the total number of pairs is \[ \sum_{k=0}^{n} k\,p_n(k). \]

Alternatively, choose \(i\) first, in \(n\) ways. A permutation fixing \(i\) restricts to a permutation of the remaining \(n-1\) elements. Conversely, every permutation of those remaining elements extends uniquely to a permutation fixing \(i\). Thus there are exactly \((n-1)!\) choices for \(f\), giving \[ n(n-1)!=n! \] pairs. This also holds for \(n=1\), since the empty set has exactly one permutation and \(0!=1\).

Equating the two counts proves \[ \boxed{\sum_{k=0}^{n} k\,p_n(k)=n!}. \]

The solution was checked against John Scholes' IMO solution archive (Kalva).