Maths WorkshopMaths problems with full solutions
Exercise 1623Combinatorics › Counting principlesL1Added 3 Nov 2026

Permutations with fixed points

#fixed points#permutations#inclusion-exclusion

Statement

Count permutations of {1,…,n}\{1,\ldots,n\} that fix at least one element.

Hint

Complement of derangements: n!−Dnn!-D_n.

Show solutionHide solution

Solution

Complement. Permutations with at least one fixed point = total −- derangements:
n!−Dn=n!−n!∑k=0n(−1)kk!=n!(1−∑k=0n(−1)kk!).n!-D_n=n!-n!\sum_{k=0}^n\frac{(-1)^k}{k!}=n!\left(1-\sum_{k=0}^n\frac{(-1)^k}{k!}\right).

Simplification. =n!∑k=1n(−1)k+1k!=n!\sum_{k=1}^n\frac{(-1)^{k+1}}{k!}.

Conclusion. Number of permutations with at least one fixed point =n!−Dn=n!-D_n.