Hat-Check Problem/Examples/8

From ProofWiki
Jump to navigation Jump to search

Example of Hat-Check Problem

$p_8 = \dfrac {2119} {5760}$


Proof

When $n = 8$, there are eight hats to hand back.

Hence:

\(\ds p_8\) \(=\) \(\ds \dfrac {!8} {8!}\)
\(\ds \) \(=\) \(\ds \dfrac {\ds 8! \sum_{k \mathop = 0}^8 \dfrac {\paren {-1}^k } {k!} } {8!}\) Definition of Subfactorial
\(\ds \) \(=\) \(\ds \dfrac {8! \paren {1 - 1 + \dfrac 1 {2!} - \dfrac 1 {3!} + \dfrac 1 {4!} - \dfrac 1 {5!} + \dfrac 1 {6!} - \dfrac 1 {7!} + \dfrac 1 {8!} } } {8! }\)
\(\ds \) \(=\) \(\ds \dfrac {14\,833} {40\,320}\)
\(\ds \) \(=\) \(\ds \dfrac {2119} {5760}\) canceling $7$


$p_8$ is roughly $0.0000025$ (or less than $\dfrac 1 {9!}$) away from the estimate of $\dfrac 1 e$.

$\blacksquare$