Anzeige


Calculator for several combinatorics and statistics functions:

Factorial | Subfactorial | Binomial Coefficient | Central Binomial Coefficient | Repetition | Catalan Number | Lah Number | Odds Ratio



Calculate the Subfactorial

The subfactorial, sometimes also called derangement, indicates how many ways there are to rearrange distinguishable objects so that none of these objects remains in its original place. In mathematical language, this means the number of permutations without fixed points. Permutations are combinations where the order is important; without fixed point means that no point remains where it was. The notation is !n, so unlike the factorial, the exclamation mark comes before and not after the value. The subfactorial of a value is always smaller than the factorial of a value, since the definition of the subfactorial allows for fewer possible arrangements. The formula for calculating the subfactorial is considerably more complicated than the one for calculating the factorial. In addition to the factorial, this formula contains the summation function Σ. There is also an exponential function, which simply changes the sign of each term of the summation.

!n = n! n  
(-1)k
k!
Σ
k=0

Enter a positive integer and press Calculate, to determine the subfactorial.

n: !


The subfactorial is:

This is:

The notation xe+y stands for x*10y

There is also a recursive formula for calculating subfactorials, which is often more convenient for calculations than the sum formula above. This is !0=1, !1=0, !n=(n−1)(!(n−1)+!(n−2)) for n≥2.
For large n, !n≈n!/e holds, where large here means starting at about 10. At n=20, the deviation is already vanishingly small. Euler's number e is found here, since the above sum without the leading n! is the series expansion of 1/e. The probability that, given a reasonably large number of elements randomly mixed together, none is in its original position is therefore 1/e, which is 0.367879, or about 36.79 percent. This applies to 10 as well as to one million objects.



Combinatorics and Statistics Functions and Formulas © Jumk.de Webprojects | Imprint & Privacy | German: Kombinatorik- und Statistik-Funktionen

See also Statistics Calculator

big.js Script Copyright (c) 2022 Michael Mclaughlin, MIT Expat Licence.




Anzeige