Definition:Derangement

A derangement is a permutation $$f: S \to S$$ from a set $$S$$ to itself where $$f(s) \ne s$$ for any $$s \in S$$.

If $$S$$ is finite, the number of derangements is denoted by $$D_n$$ where $$n=|S|$$ (the cardinality of $$S$$.)