Skip to main content
1 of 6
Patricia Hersh
  • 3.5k
  • 1
  • 30
  • 34

You can use inclusion-exclusion to show that the number of permutations in $S_m$ having at least $n$ fixed points is $$\sum_{k=n}^m (-1)^{k-n}{k\choose n-1}{m\choose k}(m-k)! $$

The ${m\choose k}$ comes from choosing $k$ fixed points, the $(m-k)!$ counts permutations in $S_m$ having these $k$ fixed points, and then $(-1)^{k-n}{k\choose n-1}$ is an inclusion-exclusion counting coefficient, namely the M"obius function $\mu (\hat{0},\hat{1})$ on the subposet of the Boolean algebra of subsets of $\{ 1,\dots ,k \} $ where we exclude the subsets having size $1\le i \le k-1$.

One way to calculate this Moebius function is to use that each rank-selection of the Boolean algebra is lexicographically shellable. The desired Moebius function will be $(-1)^{k-n}$ multiplied by the number of so-called ``descending chains'' in the lexicographic shelling, which in this case is the number of permutations in $S_k$ that are ascending in the first $m$ letters and then descending after that, which in particular forces the letter $k$ to be the $m$-th letter in the permutation (in one-line notation).

This includes the well-known special case (usually phrased in terms of derangements) that the number of permutations in $S_m$ with at least one fixed point is $\sum_{k \ge 1} (-1)^{k-1} {m\choose k}(m-k)! $ which equals $ - (-m! + \sum_{k\ge 0}(-1)^k {m\choose k}(m-k)!) = -m!(-1 + 1/e) = m!(1-1/e)$. A good reference for the $k=0$ case is chapter 2 of Enumerative Combinatorics, Volume 1, by Richard Stanley. The original source for lexicographic shellability is Anders Bj"orner's paper ``Shellable and Cohen-Macaulay partially ordered sets''.

Patricia Hersh
  • 3.5k
  • 1
  • 30
  • 34