We have a deck with $n$ cards enumerated $1,2,\ldots,n$. The deck is shuffled. What is the probability of exactly one card to remain on its original position? What is the limit as $n$ rises to infinity?

$$ \begin{array}{rcl} \{1\} & : & \dfrac 11 \\[6pt] \{12,21\} & : & \dfrac 02 \\[6pt] \{123,132,213,231,312,321\} & : & \dfrac 36 \\[6pt] & \vdots \end{array} $$

At $n = 100 0$ and $10 000$ trials:

$$ \begin{array}{rcl} \text{value of }n & & \text{probability} \\ \hline 1000 & & 0.3739 \\ 1001 & & 0.3689 \\ 1002 & & 0.3722 \\ 1003 & & 0.3638 \\ 1004 & & 0.3707 \\ 1005 & & 0.3664 \\ 1006 & & 0.3616 \\ 1007 & & 0.3728 \\ 1008 & & 0.3702 \\ 1009 & & 0.3801 \end{array} $$

At $n = 100 000$ and $10 000$ trials:

$\text{value of } n \quad \text{probability}$

$\quad 100000 \quad \quad 0.3659$

$\quad 100001 \quad \quad 0.3552$

$\quad 100002 \quad \quad 0.356$

$\quad 100003 \quad \quad 0.367$

$\quad 100004 \quad \quad 0.3738$

$\quad 100005 \quad \quad 0.3647$

$\quad 100006 \quad \quad 0.3654$

$\quad 100007 \quad \quad 0.3637$

$\quad 100008 \quad \quad 0.3718$

$\quad 100009 \quad \quad 0.3708$

Apparently, probability approaches $0.36-0.38$, but how can one derive it analytically?

share|cite|improve this question
    
Looks like you were in the a very similar boat as me: math.stackexchange.com/q/6140/2333 – corsiKa 4 hours ago
up vote 11 down vote accepted

To find the number of "good" permutations fix one card and derange the rest $(n-1)$ cards. This can be done in $!n$ ways. ($!n$ is the number of derangements of $n$ objects). Then the number of "good" permutations is $n\cdot !(n-1)$. Hence we have:

$$\lim_{n \to \infty} p_n = \lim_{n \to \infty} \frac{n\cdot !(n-1)}{n!} = \lim_{n \to \infty} \frac{!(n-1)}{(n-1)!} = e^{-1}$$

The last limit can be seen in the link I added above.

share|cite|improve this answer

By the inclusion-exclusion principle, in the symmetric group $S_n$ there are $$ n!\sum_{k=0}^{n}\frac{(-1)^k}{k!} $$ permutations without fixed points (see derangements). It follows that in the same group there are $$ n\cdot (n-1)!\sum_{k=0}^{n-1}\frac{(-1)^k}{k!} $$ elements with exactly one fixed point, and the limit probability is $\color{red}{\large\frac{1}{e}}$ in both cases.

share|cite|improve this answer
    
Then the limit probability of at most one fixed point is $\frac{1}{e}+\frac{1}{e}=\frac{2}{e}$. And for two fixed points? – Jeppe Stig Nielsen 8 hours ago
    
@JeppeStigNielsen: correct. The probability of having exactly two fixed points is given by $$\frac{1}{n!}\binom{n}{2}(n-2)!\sum_{k=0}^{n-2}\frac{(-1)^k}{k!}\to\color{red}{\frac{1}{2e}}$$ and the limit probability of having exactly $k$ fixed points is $\frac{1}{k! e}$. – Jack D'Aurizio 8 hours ago
    
Yes, I was just realizing that. Thanks. – Jeppe Stig Nielsen 8 hours ago
1  
In other words, as $n \to \infty$ the number of fixed points of a random permutation of $n$ elements converges in distribution to a Poisson(1) random variable. – Michael Lugo 6 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.