section_path: Applications/Derangements
section_name: Derangements
paragraph_text: Derangements
  
  Another application of e, also discovered in part by Jacob Bernoulli along with Pierre Remond de Montmort, is in the problem of derangements, also known as the hat check problem: n guests are invited to a party and, at the door, the guests all check their hats with the butler, who in turn places the hats into n boxes, each labelled with the name of one guest. But the butler has not asked the identities of the guests, and so puts the hats into boxes selected at random. The problem of de Montmort is to find the probability that none of the hats gets put into the right box. This probability, denoted by p n {\displaystyle p_{n}\!}, is:
  
  As n tends to infinity, p approaches 1/ e. Furthermore, the number of ways the hats can be placed into the boxes so that none of the hats are in the right box is n !/ e, rounded to the nearest integer, for every positive n.