Derangement formula

wolf

New member
Joined
Nov 28, 2013
Messages
29
A derangement is a type of combination where each element is not in its original position.
For example how many ways can 1 2 3 be arranged so that 1 isn't first 2 isn't second and 3 isn't third?
For small values of 'n' it is easy just to list all of them:
2 3 1 and 3 1 2
So when n=3, there are 2 possible derangements.
When n = 4 there are 9 derangements.

There is a formula for calculating derangements:
n! * (1 - 1/1! +1/2! - 1/3! + 1/4! ..... +- 1/n!)

Is there another formula for this?
Thank you.
 
A derangement is a type of combination where each element is not in its original position.
For example how many ways can 1 2 3 be arranged so that 1 isn't first 2 isn't second and 3 isn't third?
For small values of 'n' it is easy just to list all of them:
2 3 1 and 3 1 2
So when n=3, there are 2 possible derangements.
When n = 4 there are 9 derangements.
There is a formula for calculating derangements:
n! * (1 - 1/1! +1/2! - 1/3! + 1/4! ..... +- 1/n!)
Is there another formula for this?

Yes there is. Because the number e1=k=0(1)k(k!)1\displaystyle e^{-1} = \sum\limits_{k = 0}^\infty {{{\left( { - 1} \right)}^k}{{\left( {k!} \right)}^{ - 1}}} we can use Dn=n!e+0.5\displaystyle {D_n} = \left\lfloor {\dfrac{{n!}}{e} + 0.5} \right\rfloor .

Also here is an online calculator. (change the number)
 
Last edited:
You mean 1e=e1=n=0(1)n/n!\displaystyle \frac{1}{e}= e^{-1}= \sum_{n=0}^\infty (-1)^n/n!, don't you?
 
Top