Questions tagged [derangements]

For questions on derangements, permutations of a set without fixed points.

A derangement of a set $S$ is a mapping $\sigma:S\to S$ such that $\sigma(x)\neq x$ for all $x\in S$ (or, more briefly, a permutation of $S$ with no fixed points). For example, the mapping $1\mapsto 2,\ 2\mapsto 3,\ 3\mapsto 1$ is a derangement of $\{1,2,3\}$, while $1\mapsto 1,\ 2\mapsto 3,\ 3\mapsto 2$ isn't (since $1$ remains fixed). $S$ may be infinite, but the finite case has been much better studied.

The number of derangements of an $n$-element set is commonly denoted as $!n$ or $D_n$, and called "$n$ subfactorial". In this example, we can easily see that $!3=2$.

There are various formulas for $!n$. By Inclusion-Exclusion, it is possible to prove that

\begin{equation}!n=\sum_{i=0}^n(-1)^i\cdot\frac{n!}{i!}.\tag{1}\label{1}\end{equation}

By then comparing this sum to the Taylor series of $e^x$, we can prove the surprising equality

\begin{equation}!n=\left[\frac{n!}e\right]\quad(n\geq1),\tag{2}\label{2}\end{equation}

where $[x]$ denotes the closest integer to $x$, and $e$ denotes Euler's number.

Other recursive formulas also exist. By a simple counting argument, we may prove

\begin{equation}!n=(n-1)(!(n-1)+!(n-2)).\tag{3}\label{3}\end{equation}

And by making use of $(\ref{1})$, we may also prove that

\begin{equation}!n=n(!(n-1))+(-1)^n.\tag{4}\label{4}\end{equation}

221 questions
4
votes
0 answers

Derangement after derangement

n people can be seated on n chairs in n! different ways. These are permutations. If the people get up and sit down again in such a way that nobody sits on the same chair they sat on before, this can be done in !n different ways. These are…
oz1cz
  • 171
2
votes
1 answer

How to obtain this formulae for derangement using Principle of Inclusion and Exclusion

Let D(n,k) denotes the number of derangement with total of n elements, and having exactly k fixed positions. So, I want to show that $$D(n,k)=\frac{n!}{k!}\sum_{r=0}^{n-k}(-1)^r\frac{1}{r!}$$, using the principle of inclusion and exclusion. So…
Henry Cai
  • 633
2
votes
1 answer

Link between derangement number and Bell polynomial

I have empirical evidence to support the following conjectured identity between the derangement numbers and incomplete Bell polynomials, $!n = \sum_{i=1}^n B_{n,i}(0,1!,2!,\dots, (n-i)!)$, in that it holds for the first 8 or so derangement numbers.…
0
votes
0 answers

Secret Santa problem

I saw this problem on my exams and I just literally wrote down the formula for derangements and derived it but I am not sure if it is the case. This was the problem: Problem: Let there be $n$ number of people and each one of them buys a gift and…
-2
votes
1 answer

The number of one-one functions $f : \{1, 2, 3, 4, 5\} \to \{0, 1, 2, 3, 4, 5\}$ such that $f(1) \neq 0, 1$.

This question was asked in the ISI PGDSMA entrance exam. Can anyone help me in this? I am getting $480$ as answer.